You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Dan Trainor <in...@hostinthebox.net> on 2005/04/03 09:21:56 UTC

[users@httpd] Questions about MinSpareServers, MaxSpareServers, StartServers

Hello, all -

I've recently seen an error that I have not come across before, and it 
is as follows:

[Sat Apr  2 19:16:57 2005] [info] server seems busy, (you may need to 
increase StartServers, or Min/MaxSpareServers), spawning 8 children, 
there are 23 idle, and 85 total children

I understand it, however, it doesn't seem to matter what I set 
StartServers, MinSpareServers, or MaxSpareServers to.  I still get these 
errors, regardless of what I change them to.

I noticed that Apache only spawns new servers in two's compliment 
fashion, so I've changed these values accordingly:

MinSpareServers 32
MaxSpareServers 48
StartServers 64

This machine is more than capable of doing 1024 connections, as modified 
to do so by HARD_SERVER_LIMIT 1024 in src/include/httpd.h, so I am not 
worried about setting these values extremely high.  I am curious, 
however, as to why my settings don't seem to take effect.

Anyone have any input?

Thanks!
-dant


---------------------------------------------------------------------
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] Questions about MinSpareServers, MaxSpareServers, StartServers

Posted by Joshua Slive <js...@gmail.com>.
On Apr 3, 2005 6:47 PM, Dan Trainor <in...@hostinthebox.net> wrote:
> I understand your argument, but these values are far from similar.

They are similar enough that any moderate load swing will result in
killing or creating processes, which is exactly what you want to
avoid.

> 
> I guess I'm just looking for high performance information concerning
> Apache, this being v1.3.33.

Documentation applying to the prefork mpm in 2.0 (which is what I
pointed you to) is also applicable to 1.3 in most cases.

(But if you really want performance, you should be using 2.0 anyway.)

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] Questions about MinSpareServers, MaxSpareServers, StartServers

Posted by Dan Trainor <in...@hostinthebox.net>.
Joshua Slive wrote:
> On Apr 3, 2005 5:37 PM, Dan Trainor <in...@hostinthebox.net> wrote:
> 
>>Joshua Slive wrote:
>>
>>>On Apr 3, 2005 3:21 AM, Dan Trainor <in...@hostinthebox.net> wrote:
>>>
>>>
>>>>Hello, all -
>>>>
>>>>I've recently seen an error that I have not come across before, and it
>>>>is as follows:
>>>>
>>>>[Sat Apr  2 19:16:57 2005] [info] server seems busy, (you may need to
>>>>increase StartServers, or Min/MaxSpareServers), spawning 8 children,
>>>>there are 23 idle, and 85 total children
>>>>
>>>>I understand it, however, it doesn't seem to matter what I set
>>>>StartServers, MinSpareServers, or MaxSpareServers to.  I still get these
>>>>errors, regardless of what I change them to.
>>>>
>>>>I noticed that Apache only spawns new servers in two's compliment
>>>>fashion, so I've changed these values accordingly:
>>>>
>>>>MinSpareServers 32
>>>>MaxSpareServers 48
>>>>StartServers 64
>>>
>>>
>>Joshua -
>>
>>I understand what the settings mean.  My reasoning behind these settings
>>is that Apache would be able to quicker respond to a request if it
>>already had a child waiting for the connection.  If for some reason this
>>site got an additional 40 hits in one instant, Apache would deal with
>>those by sending them to children, and then when that is established, it
>>would create more children in anticipation for new connections.
>>
>>Regardless, where might I be able to find more information about this
>>error?  I'm very curious now.
> 
> 
> There is some additional comments on this stuff here:
> http://httpd.apache.org/docs-2.0/misc/perf-tuning.html#runtime
> 
> The problem with your settings is the lack of flexibility you are
> giving to apache.  Setting Max/MinSpareServers to similar values will
> always result in apache needing to fork and kill processes frequently.
>  If you want to have lots of spare serving capacity available, then
> all you need to do is increase MaxSpareServers (and perhaps
> StartServers if you want this capacity available immediately).
> 
> Joshua.

I understand your argument, but these values are far from similar.

I guess I'm just looking for high performance information concerning 
Apache, this being v1.3.33.

Thanks for your help
-dant


---------------------------------------------------------------------
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] Questions about MinSpareServers, MaxSpareServers, StartServers

Posted by Joshua Slive <js...@gmail.com>.
On Apr 3, 2005 5:37 PM, Dan Trainor <in...@hostinthebox.net> wrote:
> Joshua Slive wrote:
> > On Apr 3, 2005 3:21 AM, Dan Trainor <in...@hostinthebox.net> wrote:
> >
> >>Hello, all -
> >>
> >>I've recently seen an error that I have not come across before, and it
> >>is as follows:
> >>
> >>[Sat Apr  2 19:16:57 2005] [info] server seems busy, (you may need to
> >>increase StartServers, or Min/MaxSpareServers), spawning 8 children,
> >>there are 23 idle, and 85 total children
> >>
> >>I understand it, however, it doesn't seem to matter what I set
> >>StartServers, MinSpareServers, or MaxSpareServers to.  I still get these
> >>errors, regardless of what I change them to.
> >>
> >>I noticed that Apache only spawns new servers in two's compliment
> >>fashion, so I've changed these values accordingly:
> >>
> >>MinSpareServers 32
> >>MaxSpareServers 48
> >>StartServers 64
> >
> >
> 
> Joshua -
> 
> I understand what the settings mean.  My reasoning behind these settings
> is that Apache would be able to quicker respond to a request if it
> already had a child waiting for the connection.  If for some reason this
> site got an additional 40 hits in one instant, Apache would deal with
> those by sending them to children, and then when that is established, it
> would create more children in anticipation for new connections.
> 
> Regardless, where might I be able to find more information about this
> error?  I'm very curious now.

There is some additional comments on this stuff here:
http://httpd.apache.org/docs-2.0/misc/perf-tuning.html#runtime

The problem with your settings is the lack of flexibility you are
giving to apache.  Setting Max/MinSpareServers to similar values will
always result in apache needing to fork and kill processes frequently.
 If you want to have lots of spare serving capacity available, then
all you need to do is increase MaxSpareServers (and perhaps
StartServers if you want this capacity available immediately).

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] Questions about MinSpareServers, MaxSpareServers, StartServers

Posted by Dan Trainor <in...@hostinthebox.net>.
Joshua Slive wrote:
> On Apr 3, 2005 3:21 AM, Dan Trainor <in...@hostinthebox.net> wrote:
> 
>>Hello, all -
>>
>>I've recently seen an error that I have not come across before, and it
>>is as follows:
>>
>>[Sat Apr  2 19:16:57 2005] [info] server seems busy, (you may need to
>>increase StartServers, or Min/MaxSpareServers), spawning 8 children,
>>there are 23 idle, and 85 total children
>>
>>I understand it, however, it doesn't seem to matter what I set
>>StartServers, MinSpareServers, or MaxSpareServers to.  I still get these
>>errors, regardless of what I change them to.
>>
>>I noticed that Apache only spawns new servers in two's compliment
>>fashion, so I've changed these values accordingly:
>>
>>MinSpareServers 32
>>MaxSpareServers 48
>>StartServers 64
> 
> 


Joshua -

I understand what the settings mean.  My reasoning behind these settings 
is that Apache would be able to quicker respond to a request if it 
already had a child waiting for the connection.  If for some reason this 
site got an additional 40 hits in one instant, Apache would deal with 
those by sending them to children, and then when that is established, it 
would create more children in anticipation for new connections.

Regardless, where might I be able to find more information about this 
error?  I'm very curious now.

Thanks
-dant


---------------------------------------------------------------------
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] Questions about MinSpareServers, MaxSpareServers, StartServers

Posted by Joshua Slive <js...@gmail.com>.
On Apr 3, 2005 3:21 AM, Dan Trainor <in...@hostinthebox.net> wrote:
> Hello, all -
> 
> I've recently seen an error that I have not come across before, and it
> is as follows:
> 
> [Sat Apr  2 19:16:57 2005] [info] server seems busy, (you may need to
> increase StartServers, or Min/MaxSpareServers), spawning 8 children,
> there are 23 idle, and 85 total children
> 
> I understand it, however, it doesn't seem to matter what I set
> StartServers, MinSpareServers, or MaxSpareServers to.  I still get these
> errors, regardless of what I change them to.
> 
> I noticed that Apache only spawns new servers in two's compliment
> fashion, so I've changed these values accordingly:
> 
> MinSpareServers 32
> MaxSpareServers 48
> StartServers 64

With these settings, you are asking apache to constantly maintain
between 32 and 48 INACTIVE child processes.  This means that apache
will need to constantly fork and kill children to stay in this range
as load changes, resulting in messages like the one in your error log.

To fix this, you should drastically reduce MinSpareServers (and
perhaps increase MaxSpareServers) so that the range of "acceptable"
conditions is larger.  I doubt it is ever advisable to have
MinSpareServers greater than 10.

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