On Nov 17, 1:37 pm, Phoenix Rising <[email protected]> wrote: > The first application is a public-facing e-commerce website. It has > ZERO performance issues - things load incredibly fast (both in terms > of end-user experience and milliseconds of rendering time on the > server side [visible through production.log]), but out of the 8GB of > memory allocated to the machine, the application is using all but > about 200 megs. > > The second application is a much lower traffic internal maintenance/ > outage reporting system used by several departments in the company. > We originally had given it 2GB of memory, and it consumed nearly every > bit of that, but squeezed that down to 512megs just to see what would > happen (since that system isn't public-facing). Just as before, it > consumed all 512 megs. > > Now here's the funny thing: doing a process list in top and ordering > by memory usage, ruby takes AT MOST 1.0% of memory and spawns at most > 3-4 processes.
If you yourself are seeing that the Ruby processes aren't using all of the memory, why are you thinking the Ruby application is using all of the memory? As some others have said, ***basically*** the total memory usage reported by top and free is that which the kernel has allocated (and will never give back); from that the kernel gives memory to processes as requested/available. You say you're running Passenger: have you used passenger-memory-stats to actually get the accurate look at the memory usage of the Ruby app and Apache? As a bit of a better system memory usage indicator, what does the -/+ buffers/cache column of free say? That shows the amount of memory total that the kernel actually is freely able to allocate to processes. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

