aalhamad
aalhamad

Reputation: 5

Thin server taking up too much memory (rails)

Gents,
I'm running thin server with one rails app on centos 5.5. I'm watching my server and noticed that thin server is taking up 148MB of memory, one instance (one server at port:3000), no traffic. Is that normal?

Thank you.

Upvotes: 0

Views: 782

Answers (1)

David Schwartz
David Schwartz

Reputation: 182819

This seems to be a measure of physical memory. The page says:

This page will show summary information about CPU usage information, load averages, physical memory, disk utilization and network I/O.

Well, that sounds perfectly normal to me. Physical memory is an unsavable resource. That is, if you use 10MB less today, it's not like you can use 10MB more tomorrow. So unless memory is in short supply, it is a complete waste of effort to try to recover memory. So if the memory isn't needed elsewhere, it might as well be here.

I would be concerned only if the machine was tight on memory and memory was needed elsewhere. Then the fact that this process kept that memory, even when it was needed elsewhere, would indicate a resource problem.

Say you get $1,000 a week to give to your kids and you can't save money from week to week. If you only have one kid, you just give him the $1,000.

You can't do any better than that. Even if he only needs $10, why bother trying to split the money? You just make more work for himself if next week he needs $20, then may be $50, and maybe sometimes in the middle of the week he has to come back for more. Just give it all to him and it's perfect.

But if you have another kid who needs $500 a month and one of them is getting the whole $1,000, then that indicates a problem.

So, for unsavable resources, "waste" is only a problem if there's a shortage. Otherwise, "waste" is the most efficient usage.

Upvotes: 1

Related Questions