Weird apache status values with nginx

Maxim Dounin mdounin at
Fri Jul 20 09:50:56 UTC 2012


On Thu, Jul 19, 2012 at 11:52:00AM -0400, migue76 wrote:

> Thanks for your explanation Maxim.
> I think the results are not correct because I switch off nginx and
> values come correct again. I swich on nginx and I get weird values. That
> is why.
> You said:
> >The fact that Apache's cpu usage is different from what you have
> >without nginx might have many reasons. Possible ones are ranging
> >from incorrect Apache configuration which causes neeedless process
> >startup/shutdown (which now happens more often due to low worker
> >process utilization) to just a simple fact that your system
> >handles more requests now (and consumes more CPU as a result) due
> >to no longer being limited by some other resource.
> Any tip, clue or url to start investigating about this?

I would try to calculate something like "cpu seconds per request" 
metric and if it doesn't match previously seen values - start digging 
where additional cpu seconds go.  Playing with Apache settings 
like MaxClients/MaxSpareServers/MinSpareServers might be helpfull, 
as well as monitoring various things like system fork rate and so on.

Note though that some difference is normal, e.g. due to the fact 
that nginx doesn't use keepalive to upstream servers by default.

Maxim Dounin

More information about the nginx mailing list