[Mongrel] Mongrel using way more memory on production than staging. Any ideas why?
dee.zsombor at gmail.com
Tue Oct 2 10:56:11 EDT 2007
Chris T wrote:
> No, the production box is Athlon64 X2 3800, the staging one i386
> (actually a Pentium 4 I had lying around). However the ruby libraries
> were built the same way:
> sudo apt-get install ruby1.8 libzlib-ruby rdoc irb ruby1.8-dev
> On production:
> #ruby -v
> ruby 1.8.5 (2006-08-25) [x86_64-linux]
> On staging:
> #ruby -v
> ruby 1.8.5 (2006-08-25) [i486-linux]
This explains it well, pointers are 8 byte long on 64 bit while only 4
byte long on 32 bit. Each ruby object is essentially a pointer (plus some
other magic encoded in the byte alignment and misc other data). A ruby
process is bound to be more heavy on 64 bit.
You can use a 64 bit db server and keep the application servers 32, this
should give some benefits while trading in some uniformity.
Company - http://primalgrasp.com
Thoughts - http://deezsombor.blogspot.com
More information about the Mongrel-users