You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Srikanth S <sr...@googlemail.com> on 2006/09/25 16:06:53 UTC

[users@httpd] Apache utilzating Very High CPU

Hi,

We are currently using Apache version 1.3.28 on Solaris 8 Box with 2
CPUs.  Recently, we conducted load test on our environment and we saw
that Apache process is using very high CPU & eventually becoming
bottleneck for high load.

Currently, here are our parameters

MaxClient 512
Start Server 5
MaxSpareServers 10
MinSpareServers 5
KeepAliveTimeOut 7

Any help in this area is highly appriciated

Srikanth

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache utilzating Very High CPU

Posted by Joshua Slive <jo...@slive.ca>.
On 9/25/06, Srikanth S <sr...@googlemail.com> wrote:
> Hi,
>
> Thanks for the reply..
>
> Another information is, when the load test is being conducted we are
> constantly getting the below error_log file of Apache
>
> [info]server seems busy ( you may need to increase startServer,
> min/maxspareservers) spawning 8 children, there are 0 idle & total 237
> total children
>
> What is the optimal value we need to set for
> StartServer/MinSpareServer/MaxSpareServer for below hardware
> configuration
>
> 2 (900 MHz) CPU/8GB RAM/4GB SWAP

The StartServer/MinSpareServers/MaxSpareServers directives are not
very important on real servers.  It is really only on benchmark tests
where you are going to see an effect.

Again, the optimal setting depends on the specifics of your benchmark
and what you have included in apache.  In general, you want a big
enough gap between Min and MaxSpareServers so that apache doesn't have
to continually fork and kill children to keep in the appropriate
range.  StartServers is usually set equal to MinSpareServers, but can
be set higher if you know that you are going to have a big load on the
server right away.

Probably the optimal setting for general benchmarking would be to set
StartServers and MaxSpareServers equal to MaxClients and
MinSpareServers equal to 1.  That way apache would prefork everything
it needs right at the beginning and never kill anything.  But make
sure that this fits in physical memory.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache utilzating Very High CPU

Posted by Srikanth S <sr...@googlemail.com>.
Hi,

Thanks for the reply..

Another information is, when the load test is being conducted we are
constantly getting the below error_log file of Apache

[info]server seems busy ( you may need to increase startServer,
min/maxspareservers) spawning 8 children, there are 0 idle & total 237
total children

What is the optimal value we need to set for
StartServer/MinSpareServer/MaxSpareServer for below hardware
configuration

2 (900 MHz) CPU/8GB RAM/4GB SWAP

Srikanth

On 25/09/06, Joshua Slive <jo...@slive.ca> wrote:
> On 9/25/06, Srikanth S <sr...@googlemail.com> wrote:
> > Hi,
> >
> > We are currently using Apache version 1.3.28 on Solaris 8 Box with 2
> > CPUs.  Recently, we conducted load test on our environment and we saw
> > that Apache process is using very high CPU & eventually becoming
> > bottleneck for high load.
> >
> > Currently, here are our parameters
> >
> > MaxClient 512
> > Start Server 5
> > MaxSpareServers 10
> > MinSpareServers 5
> > KeepAliveTimeOut 7
> >
> > Any help in this area is highly appriciated
>
> Well, you could start by using a version of apache that has had active
> development within the past 5 years or so.  2.2.3 comes to mind.
>
> But in real world conditions, it is highly unusual for apache to be
> cpu-constrained in any version.  For benchmarks, it all depends on how
> you construct your tests.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] How to limit the number of connections

Posted by Joshua Slive <jo...@slive.ca>.
On 9/25/06, James Sherwood <js...@rgisolutions.com> wrote:
> We launched a new site today and the connections are CRAZY.
>
> Is there a way in apache to limit the amount of connections per virtual host
> or just limit the amount of connections period?

There are various modules at http://modules.apache.org/ that can do
this.  Which one is best depends on your apache version and specific
requirements.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] How to limit the number of connections

Posted by James Sherwood <js...@rgisolutions.com>.
We launched a new site today and the connections are CRAZY.

Is there a way in apache to limit the amount of connections per virtual host 
or just limit the amount of connections period?

Thanks,
James 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache utilzating Very High CPU

Posted by Joshua Slive <jo...@slive.ca>.
On 9/25/06, Srikanth S <sr...@googlemail.com> wrote:
> Hi,
>
> We are currently using Apache version 1.3.28 on Solaris 8 Box with 2
> CPUs.  Recently, we conducted load test on our environment and we saw
> that Apache process is using very high CPU & eventually becoming
> bottleneck for high load.
>
> Currently, here are our parameters
>
> MaxClient 512
> Start Server 5
> MaxSpareServers 10
> MinSpareServers 5
> KeepAliveTimeOut 7
>
> Any help in this area is highly appriciated

Well, you could start by using a version of apache that has had active
development within the past 5 years or so.  2.2.3 comes to mind.

But in real world conditions, it is highly unusual for apache to be
cpu-constrained in any version.  For benchmarks, it all depends on how
you construct your tests.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org