You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Rose, John B" <jb...@utk.edu> on 2013/08/20 22:26:04 UTC

[users@httpd] What is the impact of setting ServerLimit higher than MaxClients?

What is the impact of setting the ServerLimit to a value significantly more than your MaxClients value? Say with a MaxClients set to 512 and ServerLimit of 2000?




Re: [users@httpd] What is the impact of setting ServerLimit higher than MaxClients?

Posted by Jeff Trawick <tr...@gmail.com>.
On Tue, Aug 20, 2013 at 5:30 PM, Rose, John B <jb...@utk.edu> wrote:

>  Can you expand on this a bit?
>
>  "But you could measure actual shm use with diff values."
>

ServerLimit controls the size of the scoreboard.

The scoreboard is shared memory (the "shm" abbreviation above).

Measure shared memory use by httpd using some tool.  I used System Monitor
on recent Ubuntu. For a 64-bit build of httpd 2.4 with the worker MPM with
(exaggerated since it needs for multiple threads per process), changing
ServerLimit from 5000 to 20000 increased shared memory use of the parent
httpd from about 80MB to 306 MB.

I'd guess you're using a lot less than 80MB with ServerLimit 2000 and
prefork.


>
>  Thanks
>
>   From: Jeff Trawick <tr...@gmail.com>
> Reply-To: "users@httpd.apache.org" <us...@httpd.apache.org>
> Date: Tuesday, August 20, 2013 5:13 PM
>
> To: "users@httpd.apache.org" <us...@httpd.apache.org>
> Subject: Re: [users@httpd] What is the impact of setting ServerLimit
> higher than MaxClients?
>
>   On Aug 20, 2013 5:05 PM, "Rose, John B" <jb...@utk.edu> wrote:
> >
> > Thanks for replying.
> >
> > Yes, it is prefork MPM.
> >
> > Reading this in the Apache documentation …
> >
> > "Do not set the value of this directive any higher than what you might
> want to set MaxClients to."
> >
> > It also says …
> >
> > "Special care must be taken when using this directive. If ServerLimit is
> set to a value much higher than necessary, extra, unused shared memory will
> be allocated"
> >
> > What is classified as "much higher?"
> >
> > Is there a negative (or positive) impact of any kind of, for example,
> setting ServerLimit to 2000 and MaxClients to 512?
>
> Unclear what much higher means, especially on a modern machine.  I'd be
> extremely surprised if 2000 has any noticeable impact.  But you could
> measure actual shm use with diff values.
> >
> > http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit
> >
> > Thanks
> >
> >
> > From: Jeff Trawick <tr...@gmail.com>
> > Reply-To: "users@httpd.apache.org" <us...@httpd.apache.org>
> > Date: Tuesday, August 20, 2013 4:50 PM
> > To: "users@httpd.apache.org" <us...@httpd.apache.org>
> > Subject: Re: [users@httpd] What is the impact of setting ServerLimit
> higher than MaxClients?
> >
> > On Aug 20, 2013 4:26 PM, "Rose, John B" <jb...@utk.edu> wrote:
> > >
> > > What is the impact of setting the ServerLimit to a value significantly
> more than your MaxClients value? Say with a MaxClients set to 512 and
> ServerLimit of 2000?
> > >
> >
> > Assuming prefork MPM:
> >
> > You can increase maxclients across graceful restart, up to serverlimit
> >
> > Threaded MPMs: comparing maxclients vs server limit doesn't work without
> also accounting for threadsperchild
> >
> > >
> > >
>



-- 
Born in Roswell... married an alien...
http://emptyhammock.com/

Re: [users@httpd] What is the impact of setting ServerLimit higher than MaxClients?

Posted by "Rose, John B" <jb...@utk.edu>.
Can you expand on this a bit?

"But you could measure actual shm use with diff values."

Thanks

From: Jeff Trawick <tr...@gmail.com>>
Reply-To: "users@httpd.apache.org<ma...@httpd.apache.org>" <us...@httpd.apache.org>>
Date: Tuesday, August 20, 2013 5:13 PM
To: "users@httpd.apache.org<ma...@httpd.apache.org>" <us...@httpd.apache.org>>
Subject: Re: [users@httpd] What is the impact of setting ServerLimit higher than MaxClients?


On Aug 20, 2013 5:05 PM, "Rose, John B" <jb...@utk.edu>> wrote:
>
> Thanks for replying.
>
> Yes, it is prefork MPM.
>
> Reading this in the Apache documentation …
>
> "Do not set the value of this directive any higher than what you might want to set MaxClients to."
>
> It also says …
>
> "Special care must be taken when using this directive. If ServerLimit is set to a value much higher than necessary, extra, unused shared memory will be allocated"
>
> What is classified as "much higher?"
>
> Is there a negative (or positive) impact of any kind of, for example, setting ServerLimit to 2000 and MaxClients to 512?

Unclear what much higher means, especially on a modern machine.  I'd be extremely surprised if 2000 has any noticeable impact.  But you could measure actual shm use with diff values.
>
> http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit
>
> Thanks
>
>
> From: Jeff Trawick <tr...@gmail.com>>
> Reply-To: "users@httpd.apache.org<ma...@httpd.apache.org>" <us...@httpd.apache.org>>
> Date: Tuesday, August 20, 2013 4:50 PM
> To: "users@httpd.apache.org<ma...@httpd.apache.org>" <us...@httpd.apache.org>>
> Subject: Re: [users@httpd] What is the impact of setting ServerLimit higher than MaxClients?
>
> On Aug 20, 2013 4:26 PM, "Rose, John B" <jb...@utk.edu>> wrote:
> >
> > What is the impact of setting the ServerLimit to a value significantly more than your MaxClients value? Say with a MaxClients set to 512 and ServerLimit of 2000?
> >
>
> Assuming prefork MPM:
>
> You can increase maxclients across graceful restart, up to serverlimit
>
> Threaded MPMs: comparing maxclients vs server limit doesn't work without also accounting for threadsperchild
>
> >
> >

Re: [users@httpd] What is the impact of setting ServerLimit higher than MaxClients?

Posted by Jeff Trawick <tr...@gmail.com>.
On Aug 20, 2013 5:05 PM, "Rose, John B" <jb...@utk.edu> wrote:
>
> Thanks for replying.
>
> Yes, it is prefork MPM.
>
> Reading this in the Apache documentation …
>
> "Do not set the value of this directive any higher than what you might
want to set MaxClients to."
>
> It also says …
>
> "Special care must be taken when using this directive. If ServerLimit is
set to a value much higher than necessary, extra, unused shared memory will
be allocated"
>
> What is classified as "much higher?"
>
> Is there a negative (or positive) impact of any kind of, for example,
setting ServerLimit to 2000 and MaxClients to 512?

Unclear what much higher means, especially on a modern machine.  I'd be
extremely surprised if 2000 has any noticeable impact.  But you could
measure actual shm use with diff values.
>
> http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit
>
> Thanks
>
>
> From: Jeff Trawick <tr...@gmail.com>
> Reply-To: "users@httpd.apache.org" <us...@httpd.apache.org>
> Date: Tuesday, August 20, 2013 4:50 PM
> To: "users@httpd.apache.org" <us...@httpd.apache.org>
> Subject: Re: [users@httpd] What is the impact of setting ServerLimit
higher than MaxClients?
>
> On Aug 20, 2013 4:26 PM, "Rose, John B" <jb...@utk.edu> wrote:
> >
> > What is the impact of setting the ServerLimit to a value significantly
more than your MaxClients value? Say with a MaxClients set to 512 and
ServerLimit of 2000?
> >
>
> Assuming prefork MPM:
>
> You can increase maxclients across graceful restart, up to serverlimit
>
> Threaded MPMs: comparing maxclients vs server limit doesn't work without
also accounting for threadsperchild
>
> >
> >

Re: [users@httpd] What is the impact of setting ServerLimit higher than MaxClients?

Posted by "Rose, John B" <jb...@utk.edu>.
Thanks for replying.

Yes, it is prefork MPM.

Reading this in the Apache documentation …

"Do not set the value of this directive any higher than what you might want to set MaxClients<http://httpd.apache.org/docs/2.2/mod/mpm_common.html#maxclients> to."

It also says …

"Special care must be taken when using this directive. If ServerLimit is set to a value much higher than necessary, extra, unused shared memory will be allocated"

What is classified as "much higher?"

Is there a negative (or positive) impact of any kind of, for example, setting ServerLimit to 2000 and MaxClients to 512?

http://httpd.apache.org/docs/2.2/mod/mpm_common.html#serverlimit

Thanks


From: Jeff Trawick <tr...@gmail.com>>
Reply-To: "users@httpd.apache.org<ma...@httpd.apache.org>" <us...@httpd.apache.org>>
Date: Tuesday, August 20, 2013 4:50 PM
To: "users@httpd.apache.org<ma...@httpd.apache.org>" <us...@httpd.apache.org>>
Subject: Re: [users@httpd] What is the impact of setting ServerLimit higher than MaxClients?


On Aug 20, 2013 4:26 PM, "Rose, John B" <jb...@utk.edu>> wrote:
>
> What is the impact of setting the ServerLimit to a value significantly more than your MaxClients value? Say with a MaxClients set to 512 and ServerLimit of 2000?
>

Assuming prefork MPM:

You can increase maxclients across graceful restart, up to serverlimit

Threaded MPMs: comparing maxclients vs server limit doesn't work without also accounting for threadsperchild

>
>

Re: [users@httpd] What is the impact of setting ServerLimit higher than MaxClients?

Posted by Jeff Trawick <tr...@gmail.com>.
On Aug 20, 2013 4:26 PM, "Rose, John B" <jb...@utk.edu> wrote:
>
> What is the impact of setting the ServerLimit to a value significantly
more than your MaxClients value? Say with a MaxClients set to 512 and
ServerLimit of 2000?
>

Assuming prefork MPM:

You can increase maxclients across graceful restart, up to serverlimit

Threaded MPMs: comparing maxclients vs server limit doesn't work without
also accounting for threadsperchild

>
>