Browse code

Apache Keystone Template: reduce the number of processes to 3

Now Apache2 has 5 dedicated processes for Keystone Admin and 5 for
Keystone Public. As each Apache process consumes some memory and
we arbitrarly decided 5 was a good number more than 2 years ago,
maybe now (with the recent memory pressure we feel) is a good time
to reconcider.

With 5 processes our peakmem_tracker.py script reports a max RSS size
for the "wsgi:keystone-ad" and "wsgi:keystone-pu" processes of
2 (public and admin) * 5 (number of processes) * 90 Mo (RSS of each
process) = 900 Mo.

With 3 processes, the overall max RSS for Keystone is
2 * 3 * 90 = 540 Mo.

Note that this is RSS memory, but using the "smem" linux command on
my laptop, I noticed that the USS (Unique set size, i.e RSS excluding
shared memory) is around 80Mo per process. So reducing the number of
processes will actually reduce memory consumption.

Change-Id: Iba72d94aa15ecaa87c0115ad26d6bpeakmem_tracker62d5b3bea0a

Jordan Pittier authored on 2017/03/15 21:27:20
Showing 1 changed files
... ...
@@ -7,7 +7,7 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)"
7 7
 </Directory>
8 8
 
9 9
 <VirtualHost *:%PUBLICPORT%>
10
-    WSGIDaemonProcess keystone-public processes=5 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
10
+    WSGIDaemonProcess keystone-public processes=3 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
11 11
     WSGIProcessGroup keystone-public
12 12
     WSGIScriptAlias / %KEYSTONE_BIN%/keystone-wsgi-public
13 13
     WSGIApplicationGroup %{GLOBAL}
... ...
@@ -21,7 +21,7 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)"
21 21
 </VirtualHost>
22 22
 
23 23
 <VirtualHost *:%ADMINPORT%>
24
-    WSGIDaemonProcess keystone-admin processes=5 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
24
+    WSGIDaemonProcess keystone-admin processes=3 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
25 25
     WSGIProcessGroup keystone-admin
26 26
     WSGIScriptAlias / %KEYSTONE_BIN%/keystone-wsgi-admin
27 27
     WSGIApplicationGroup %{GLOBAL}