httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57543] New: Large amount of semaphores and shm segments created with multiple vhosts and proxy balances pools. Possibly wasted.
Date Fri, 06 Feb 2015 17:03:22 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=57543

            Bug ID: 57543
           Summary: Large amount of semaphores and shm segments created
                    with multiple vhosts and proxy balances pools.
                    Possibly wasted.
           Product: Apache httpd-2
           Version: 2.4.10
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: mod_proxy_balancer
          Assignee: bugs@httpd.apache.org
          Reporter: federico.mennite@lifeware.ch

Hi,
it seems that apache 2.4 creates a number of semaphores and shm segments larger
than needed.

With a configuration of 50 virtual hosts, each having their own couple of proxy
balancer pools, you can easily get more than 5000 semaphores and 5000 shm
segments created.
I had to tune the kernel parameters "sem arrays" and "shmmni" in order to
accomodate that.

I tried different configurations in order to understand deeply this behavior
and I finally came up with the following conclusions:
- all the vhosts containing at least one ProxyPass directive have a proportial
correlation with the total amount of the above resources used.
- all occurrences of the Proxy balancer directive have a proportial correlation
with the total amount of the above resources used.
- it doesnt seem to matter how the balancer pools are tied(configured) to each
vhost. It seems enough to have any of the above conditions met one or multiple
times. This is what makes me think that there's some kind of wasting reources
bug here.

I've came up with forumla to estimate the amount of semaphores and shm segments
required to start up apache without failures:
shm segments = (A + 1) * (B + 1)
semaphores = (A + 2 ) * B
A is the number of vhosts with at least one ProxyPass directive
B is the number of Proxy balancer pools

More observations
- With such a configuration and fairly old box apache takes one minute to
start:
about 30 seconds are needed to create the shm segments and additional 30
seconds are needed to create the semaphores.
- During that time apache tries to process the incoming http requests failing,
sometime crashing a child process

Please let me know if you need more information.

Regards,
Federico

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


Mime
View raw message