[Mongrel] Mongrel using way more memory on production than staging
Chris Taggart
lists at ruby-forum.com
Wed Oct 3 09:12:01 EDT 2007
Chris Taggart wrote:
> Wayne E. Seguin wrote:
>> This is something like what I use, modify to your own designs:
>>
>> mkdir ~/src
>>
>> package=ruby
>>
>> cd ~/src && curl -O
>> ftp://ftp.ruby-lang.org/pub/ruby/stable-snapshot.tar.gz
>>
>> tar zxf stable-snapshot.tar.gz && cd ruby && ./configure
>> --prefix=/usr/local
>> --disable-pthread --with-readline-dir=/usr/local
>>
>> make && sudo make install && cd ~/src
>
> OK. Will try a few things out tomorrow and report back.
Update on what I've tried/found out so far.
Set up a testbed xen server instance on the same box (AMD64x2) as my
mongrel clusters. It's not quite a direct comparison as I compiled Ruby
from source, whereas the staging server was installed from binaries via
apt-get.
I then ran stand alone mongrel in the same production environment with
the same data on both server, and threw various requests at it via curl.
The results are here:
http://spreadsheets.google.com/pub?key=pHDcT1cywdrovBLlL7QV8Ow
but briefly:
-- on startup (before any requests have been made), the testbed (64-bit)
server uses 87% more memory than the staging one (78MB vs 42MB)
-- on the first request, both increase memory usage by 17%, and then
both gradually climb by varying percentages, though the testbed's mem
usage is always 80-95% more than the 32-bit staging server.
-- memory usage increases inconsistently, sometimes staying the same
when the requests are repeated, sometimes increasing. I'm wondering if
this could be a memory leak to do with caching (which might explain why
it wasn't showing up when I was httperf'ing the staging server).
There's obviously more work to be done here, but all comments and
suggestions are welcome. This is new territory for me, so I may be
missing something completely obvious.
Cheers
Chris
--
Posted via http://www.ruby-forum.com/.
More information about the Mongrel-users
mailing list