Tune apache connection limits down

We are facing memory pressure in gate testing. Apache is fairly large so
tune its connection limits down to try and squeeze out more useable
memory. THis should be fine for dev envs, also tlsproxy is not enabled
by default so we can check that this tuning works well on a subset of
jobs before making it default everywhere.

Data comparisons done with gate-tempest-dsvm-neutron-full-ubuntu-xenial
jobs.

Old: http://logs.openstack.org/37/447037/2/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/721fc6f/logs/screen-peakmem_tracker.txt.gz
       PID   %MEM             RSS       PPID       TIME     NLWP WCHAN                     COMMAND
     20504    0.2           16660      19589   00:00:00       34 -                         /usr/sbin/apache2 -k start
     20505    0.2           16600      19589   00:00:00       34 -                         /usr/sbin/apache2 -k start
     20672    0.2           16600      19589   00:00:00       34 -                         /usr/sbin/apache2 -k start
     20503    0.1           14388      19589   00:00:00       34 -                         /usr/sbin/apache2 -k start
     19589    0.1            9964          1   00:00:00        1 -                         /usr/sbin/apache2 -k start
Total RSS: 74212

New: http://logs.openstack.org/41/446741/1/check/gate-tempest-dsvm-neutron-full-ubuntu-xenial/fa4d2e6/logs/screen-peakmem_tracker.txt.gz
       PID   %MEM             RSS       PPID       TIME     NLWP WCHAN                     COMMAND
      8036    0.1           15316       8018   00:00:01       34 -                         /usr/sbin/apache2 -k start
      8037    0.1           15228       8018   00:00:01       34 -                         /usr/sbin/apache2 -k start
      8018    0.1            8584          1   00:00:00        1 -                         /usr/sbin/apache2 -k start
Total RSS: 39128

Note RSS here is in KB. Total difference is 35084KB or about
34MB. Not the biggest change, but we seem to be functional and it
almost halves the apache overhead.

Change-Id: If82fa347db140021197a215113df4ce38fb4fd17
This commit is contained in:
Clark Boylan 2017-03-16 14:06:58 -07:00
parent 07d612e460
commit 8cf9acd577
1 changed files with 13 additions and 12 deletions

25
lib/tls
View File

@ -457,29 +457,30 @@ function tune_apache_connections {
# MaxClients: maximum number of simultaneous client connections
# MaxRequestsPerChild: maximum number of requests a server process serves
#
# The apache defaults are too conservative if we want reliable tempest
# testing. Bump these values up from ~400 max clients to 1024 max clients.
# We want to be memory thrifty so tune down apache to allow 256 total
# connections. This should still be plenty for a dev env yet lighter than
# apache defaults.
<IfModule mpm_worker_module>
# Note that the next three conf values must be changed together.
# MaxClients = ServerLimit * ThreadsPerChild
ServerLimit 32
ServerLimit 8
ThreadsPerChild 32
MaxClients 1024
StartServers 3
MinSpareThreads 96
MaxSpareThreads 192
MaxClients 256
StartServers 2
MinSpareThreads 32
MaxSpareThreads 96
ThreadLimit 64
MaxRequestsPerChild 0
</IfModule>
<IfModule mpm_event_module>
# Note that the next three conf values must be changed together.
# MaxClients = ServerLimit * ThreadsPerChild
ServerLimit 32
ServerLimit 8
ThreadsPerChild 32
MaxClients 1024
StartServers 3
MinSpareThreads 96
MaxSpareThreads 192
MaxClients 256
StartServers 2
MinSpareThreads 32
MaxSpareThreads 96
ThreadLimit 64
MaxRequestsPerChild 0
</IfModule>