Browse code

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

Clark Boylan authored on 2017/03/17 06:06:58
Showing 1 changed files
... ...
@@ -457,29 +457,30 @@ function tune_apache_connections {
457 457
 # MaxClients: maximum number of simultaneous client connections
458 458
 # MaxRequestsPerChild: maximum number of requests a server process serves
459 459
 #
460
-# The apache defaults are too conservative if we want reliable tempest
461
-# testing. Bump these values up from ~400 max clients to 1024 max clients.
460
+# We want to be memory thrifty so tune down apache to allow 256 total
461
+# connections. This should still be plenty for a dev env yet lighter than
462
+# apache defaults.
462 463
 <IfModule mpm_worker_module>
463 464
 # Note that the next three conf values must be changed together.
464 465
 # MaxClients = ServerLimit * ThreadsPerChild
465
-ServerLimit          32
466
+ServerLimit           8
466 467
 ThreadsPerChild      32
467
-MaxClients         1024
468
-StartServers          3
469
-MinSpareThreads      96
470
-MaxSpareThreads     192
468
+MaxClients          256
469
+StartServers          2
470
+MinSpareThreads      32
471
+MaxSpareThreads      96
471 472
 ThreadLimit          64
472 473
 MaxRequestsPerChild   0
473 474
 </IfModule>
474 475
 <IfModule mpm_event_module>
475 476
 # Note that the next three conf values must be changed together.
476 477
 # MaxClients = ServerLimit * ThreadsPerChild
477
-ServerLimit          32
478
+ServerLimit           8
478 479
 ThreadsPerChild      32
479
-MaxClients         1024
480
-StartServers          3
481
-MinSpareThreads      96
482
-MaxSpareThreads     192
480
+MaxClients          256
481
+StartServers          2
482
+MinSpareThreads      32
483
+MaxSpareThreads      96
483 484
 ThreadLimit          64
484 485
 MaxRequestsPerChild   0
485 486
 </IfModule>