[Mongrel] Debugging high CPU with Mongrel

Dallas DeVries dallas.devries at gmail.com
Wed Dec 6 18:13:13 EST 2006


Thanks Konstantin,

We will give that a try (apache+mod_proxy).  We try to cache everything
(using fragment caching) we can.  Gets to be tens of thousands of files
quickly(never too many in one directory).  It just seemed bizarre to us that
load goes way up periodically( and only recently) and that removing our
cache directory fixes this.  Just restarting mongrel seemingly has no effect
until we do remove the cache.   Anyways we will try with a clean install and
use apache.  Thanks for the info.

Cheers,
Dallas

On 12/6/06, kigsteronline at mac.com <kigsteronline at mac.com> wrote:
>
> Not sure I have an answer to your question, but we are running
> mongrel (x5) and apache 2.0 (mod_proxy_balancer) also separately from
> the database, on a single 2-CPU low-end server with about 30K page
> hits a day, with no caching at all, and the load on the box is nearly
> zero all the time.
>
> I see that you are using pen which is a TCP based load balancer?
> Does it server your static files, or does mongrel do that?
>
> If you are serving static files with mongrel I can see how you can be
> overloading your box so easily.   We have 40+ apache processes in
> front of mongrel which serve two purposes:
>
> 1. they serve static files very quickly and free up mongrel to only
> handle actual RoR actions
> 2. they push the data over the network, so that slow clients do not
> hold up scarce mongrel processes.
>
> Also note that each apache process is abount 2-3Mb.  Our mongrel is
> about 80Mb in comparison. Again, it's a lot cheaper to server as much
> content as possible without hitting mongrel.
>
> Hope this helps,
> Konstantin
>
>
>
> On Dec 6, 2006, at 1:56 PM, Dallas DeVries wrote:
>
> > I'm running a site that gets ~30k to 40k page hits per day.  In the
> > last 4 days my mongrel processes have been jumping into high CPU
> > usage a couple of times a day to the point where my site becomes
> > unresponsive (database on a diff machine with no load).  The only
> > way for me to resolve the problem and reduce load on the machine is
> > to delete my rails cache directory (I have plenty of space and I'm
> > not hitting any filesystem limit in terms of # of files and
> > directories).  I initially thought it was the DOS vulnerability
> > posted a couple of days ago but I upgraded to ruby 1.8.5p2 with
> > mongrel 0.3.18 and we are still experiencing the same problem
> > multiple times a day.
> >
> > Is there some way to debug where in our application/rails/mongrel
> > the cpu is getting spiked from?  I'm just not sure how to proceed
> > further in debugging this.
> >
> > Pen
> > Mongrel 0.3.18 ( 5 running )
> > ruby 1.8.5p2
> >
> > Thanks,
> > Dallas
> >
> >
> >
> > _______________________________________________
> > Mongrel-users mailing list
> > Mongrel-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/mongrel-users
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061206/4e05ebf6/attachment-0001.html 


More information about the Mongrel-users mailing list