httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: [users@httpd] Apache 2.4 create a huge amount of shared memory segments
Date Thu, 18 Dec 2014 23:11:52 GMT
On Fri, Dec 19, 2014 at 12:06 AM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> If you can manage to recompile the APR library used by your Apache 2.4
> (you probably did that already since 2.4 does not seem to be the
> version packaged with RHEL 6.4), you can use "./configure
> --enable-posix-shm ..." to use another shared memory mechanism than
> the default one (IPC SysV) which is limited to 32K segments (system
> wide).
> The number of segments would then be limited by the usual number of
> file descriptors per process (ulimit -n).
>
> Unfortunately, there no equivalent to the Mutex directive for shared
> memories, this can't be changed by httpd's configuration (as far as I
> know).

Oups, this leading part was not meant to be sent, and is rephrased
anyway below according to message, more accurately.
Please ignore it...


>
> On Thu, Dec 18, 2014 at 2:30 PM, Sylvain Goulmy <sygoulmy@gmail.com> wrote:
>>
>> I also noticed that a single proxy_balancer creates almost 350 shm on the
>> system.
>>
>> Is it normal that a single proxy_balancer creates so many shm ?
>
> How many VirtualHost(s) do you use in your configuration?
> Also, how do you declare the balancer(s), in each VirtualHost or in
> the main section using BalancerInherit on?
>
>>
>> Do i really have to increase the memory segment on my system in huge
>> proportion to handle all my proxy_balancers ?
>
> The number of IPC SysV shared-memory segments is limited to 32768 on
> linux (system wide), and you are already above with 100 * 350, so you
> would need to use another SHM mechanism.
> Unfortunately, there no equivalent to the Mutex directive for shared
> memories, AFAIK this can't be changed by httpd's configuration.
> So you would have to recompile the APR library used by your Apache 2.4
> (you probably did that already since RHEL 6.4 does not seem to package
> 2.4 by default), and do for example "./configure --enable-posix-shm
> ..." to use another shared-memory mechanism.
> The number of segments would then be limited by the usual number of
> file descriptors per process (ulimit -n).
>
> However 350 shm per balancer looks weird to me, your configuration may
> do something not optimal...
>
> Regards,
> Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message