An update on this situation.  Typo has seen a great deal of
development in the last two weeks.  Running the latest svn as of today
seems to yield *much* more stable memory usage patterns.  Even after
hitting my site with a few passes of ab and httperf, the memory usage
per server instance is only 35-37MB.  Much better than the 4X that
amount that I had been seeing.

It appears that Typo fixed something (or else the newer version of
Rails they're including in svn did).  Either way, it looks like I'm
much better off now.  Thanks for the suggestions and guidance, and
keep up the great work.

-Jason

On 6/29/06, Jason Burks <[EMAIL PROTECTED]> wrote:
> Zed,
>
> Thanks for the feedback, I'll give it a try and report results.  I'm
> on vacation all of next week and may not be able to send anything
> until I return.
>
> Also, thanks for the correction on Mongrel contributors, and thanks to
> all of your for a great little app server.
>
> -Jason
>
> On 6/29/06, Zed Shaw <[EMAIL PROTECTED]> wrote:
> > On Thu, 2006-06-29 at 08:14 -0400, Jason Burks wrote:
> > > Hello all,
> > >
> > > I'm new to Mongrel and am very impressed with what I see so far.  This
> > > thing beats FastCGI hands down, and is even simpler to use than SCGI.
> > > Great job Zed!  Thanks for all the hard work.
> > >
> > Thanks Jason, don't forget that Luis did a lot of work too and other
> > folks like _why, Rick Olsen, and many others contributed code or
> > documentation.  Just wanted to throw that in since many times people say
> > I rock, but really it's all the people helping out that make Mongrel
> > rock.
> >
> > > I am a bit surprised at the memory usage patterns though.  I'm not
> > > sure if I'm doing something wrong (most likely I am), or if this is a
> > > problem with the app I'm running (Typo trunk), but after the initial
> > > mongrel_rails startup, each server uses about 22MB of memory.
> > > However, after serving pages for a day or so, that memory usage will
> > > have increased from 22MB to ~40MB.  If I leave the server running, it
> > > just keeps climbing.  My memory usage with FastCGI was pretty stable
> > > at about 22-24MB per dispatcher, regardless of how long they'd been
> > > running.  I'm far from a high-traffic site, so this is a bit
> > > unexpected.
> >
> > So, with memory usage you've got a few things potentially going on:
> >
> > 1) Ruby's GC just isn't all that great.  With FastCGI they actually had
> > this lame "run the GC after X requests" thing, but Mongrel's just Ruby
> > (mostly) so having that just seems wrong.
> > 2) Typo actually does have a leak.  This is pretty unlikely since you
> > say it ran under fastcgi.  I'm still betting on #1.
> > 3) Mongrel has a leak.  Probably not, there's not a lot in Mongrel to
> > leak, and many people use it without any problems.
> >
> > So, what I'd recommend is actually installing Monit and configuring it
> > to watch your Mongrel processes for memory and CPU usage.  Monit will
> > actually e-mail you when they reach certain limits and can even restart
> > them.  Let this run for a while and keep the e-mails that monit sends so
> > you can get a sense of how long before your application start to use too
> > much ram.
> >
> > I'm thinking your issue is #1 (GC) so the ram will increase and then
> > just go down, which is normal.
> >
> > Finally, try just throwing in a call to force the GC to run after
> > certain requests and that might help you prove/disprove the above.
> >
> >
> > --
> > Zed A. Shaw
> > http://www.zedshaw.com/
> > http://mongrel.rubyforge.org/
> > http://www.railsmachine.com/ -- Need Mongrel support?
> >
> > _______________________________________________
> > Mongrel-users mailing list
> > [email protected]
> > http://rubyforge.org/mailman/listinfo/mongrel-users
> >
>
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to