You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Pravesh Rai <pr...@gmail.com> on 2010/08/20 07:03:14 UTC

[users@httpd] Apache 2.2.15 memory usage

Hi All,

Found that, on Windows x86 & x64 setup, memory consumption (by
httpd.exe) gets increased with time, under stress conditions. Is there way,
through configuration settings, to control this resource usage ?

Thanks,
PR

Re: [users@httpd] Apache 2.2.15 memory usage

Posted by "William A. Rowe Jr." <wr...@rowe-clan.net>.
On 8/20/2010 5:42 AM, MegaBrutal wrote:
> Sorry, I was wrong. MaxSpareServers is only available in the prefork
> MPM module. Windows binaries on the other hand are compiled with
> mpm_winnt:
> http://httpd.apache.org/docs/2.2/mod/mpm_winnt.html
> 
> Look up MaxMemFree, MaxRequestsPerChild, ThreadLimit, ThreadsPerChild
> directives. All of these are available in mpm_winnt and allow you to
> fine tune Apache's memory consumption.

Given the problem description, MaxMemFree should work well to bring things
back in line.  If using MaxRequestsPerChild, remember it will interrupt the
server completely for a short time (as it restarts) each time that limit
is hit, so set it upwards of 100000 connections per child.

---------------------------------------------------------------------
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 2.2.15 memory usage

Posted by MegaBrutal <me...@gmail.com>.
Sorry, I was wrong. MaxSpareServers is only available in the prefork
MPM module. Windows binaries on the other hand are compiled with
mpm_winnt:
http://httpd.apache.org/docs/2.2/mod/mpm_winnt.html

Look up MaxMemFree, MaxRequestsPerChild, ThreadLimit, ThreadsPerChild
directives. All of these are available in mpm_winnt and allow you to
fine tune Apache's memory consumption.

Thanks for your question, though. At least, today I've learnt some new
stuffs about Apache. :D

Regards,
MegaBrutal


2010/8/20 MegaBrutal <me...@gmail.com>:
> Hello,
>
> Read this document:
> http://httpd.apache.org/docs/2.2/misc/perf-tuning.html
>
> My guess is that child processes consume extra memory, as the server
> creates them when there are many clients connected simultenously. Note
> that it's a perfomance optimization: child processes will be there
> ready to handle clients when they arrive as soon as possible. Though
> you could control how many child processes may hang around idle with
> the MaxSpareServers directive:
> http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers
>
> Note that if you really restrict that, the server may lose performance
> (ie. get slower), because then it needs to create the necessary child
> processes when clients connect.
>
> It's also possible that Apache caches some files those requested
> pretty often, but AFAIK this feature is not on by default so you must
> have manually configured it, so most likely you would know about it
> then.
>
> Regards,
> MegaBrutal
>
>
> 2010/8/20 Pravesh Rai <pr...@gmail.com>:
>> Hi All,
>>
>> Found that, on Windows x86 & x64 setup, memory consumption (by
>> httpd.exe) gets increased with time, under stress conditions. Is there way,
>> through configuration settings, to control this resource usage ?
>>
>> Thanks,
>> PR
>

---------------------------------------------------------------------
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 2.2.15 memory usage

Posted by MegaBrutal <me...@gmail.com>.
Hello,

Read this document:
http://httpd.apache.org/docs/2.2/misc/perf-tuning.html

My guess is that child processes consume extra memory, as the server
creates them when there are many clients connected simultenously. Note
that it's a perfomance optimization: child processes will be there
ready to handle clients when they arrive as soon as possible. Though
you could control how many child processes may hang around idle with
the MaxSpareServers directive:
http://httpd.apache.org/docs/2.2/mod/prefork.html#maxspareservers

Note that if you really restrict that, the server may lose performance
(ie. get slower), because then it needs to create the necessary child
processes when clients connect.

It's also possible that Apache caches some files those requested
pretty often, but AFAIK this feature is not on by default so you must
have manually configured it, so most likely you would know about it
then.

Regards,
MegaBrutal


2010/8/20 Pravesh Rai <pr...@gmail.com>:
> Hi All,
>
> Found that, on Windows x86 & x64 setup, memory consumption (by
> httpd.exe) gets increased with time, under stress conditions. Is there way,
> through configuration settings, to control this resource usage ?
>
> Thanks,
> PR

---------------------------------------------------------------------
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