From fe1d3d6a7b3faa804800292c48f6ed2d75157963 Mon Sep 17 00:00:00 2001 From: Jordan Pittier Date: Wed, 15 Mar 2017 13:27:20 +0100 Subject: [PATCH] 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 --- files/apache-keystone.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/apache-keystone.template b/files/apache-keystone.template index 84dc273200..128436027d 100644 --- a/files/apache-keystone.template +++ b/files/apache-keystone.template @@ -7,7 +7,7 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)" - WSGIDaemonProcess keystone-public processes=5 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV% + WSGIDaemonProcess keystone-public processes=3 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV% WSGIProcessGroup keystone-public WSGIScriptAlias / %KEYSTONE_BIN%/keystone-wsgi-public WSGIApplicationGroup %{GLOBAL} @@ -21,7 +21,7 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)" - WSGIDaemonProcess keystone-admin processes=5 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV% + WSGIDaemonProcess keystone-admin processes=3 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV% WSGIProcessGroup keystone-admin WSGIScriptAlias / %KEYSTONE_BIN%/keystone-wsgi-admin WSGIApplicationGroup %{GLOBAL}