From 3d6557279fc473ac15a837a1cb887a84eedcc30e Mon Sep 17 00:00:00 2001 From: Vasyl Saienko Date: Wed, 26 Jun 2019 17:01:35 +0300 Subject: [PATCH] Set threads=1 for wsgi applications Due to Python's GIL [1], we can't use multiple threads for running OpenStack services without a performance penalty, since the execution ends up serialized, which defeats the purpose. Instead, we should use several processes, since this approach doesn't have this limitation. [1] https://wiki.python.org/moin/GlobalInterpreterLock This patch updates processes and threads accordingly for: aodh panko nova Related issue was fixed in different deployment tools like puppet https://bugs.launchpad.net/puppet-keystone/+bug/1602530 Change-Id: Ia8eb4a1f3ed826e206edb94c680f40bcec44e9d7 --- aodh/values.yaml | 2 +- nova/values.yaml | 2 +- panko/values.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aodh/values.yaml b/aodh/values.yaml index 720cdbbde4..97da060285 100644 --- a/aodh/values.yaml +++ b/aodh/values.yaml @@ -391,7 +391,7 @@ conf: CustomLog /dev/stdout proxy env=forwarded - WSGIDaemonProcess aodh processes=1 threads=2 user=aodh group=aodh display-name=%{GROUP} + WSGIDaemonProcess aodh processes=2 threads=1 user=aodh group=aodh display-name=%{GROUP} WSGIProcessGroup aodh WSGIScriptAlias / /var/www/cgi-bin/aodh/aodh-api WSGIApplicationGroup %{GLOBAL} diff --git a/nova/values.yaml b/nova/values.yaml index 815541db8a..8fc8574357 100644 --- a/nova/values.yaml +++ b/nova/values.yaml @@ -1189,7 +1189,7 @@ conf: CustomLog /dev/stdout proxy env=forwarded - WSGIDaemonProcess placement-api processes=1 threads=4 user=nova group=nova display-name=%{GROUP} + WSGIDaemonProcess placement-api processes=4 threads=1 user=nova group=nova display-name=%{GROUP} WSGIProcessGroup placement-api WSGIScriptAlias / /var/www/cgi-bin/nova/nova-placement-api WSGIApplicationGroup %{GLOBAL} diff --git a/panko/values.yaml b/panko/values.yaml index cc56a8bab4..5229fa5b06 100644 --- a/panko/values.yaml +++ b/panko/values.yaml @@ -205,7 +205,7 @@ conf: CustomLog /dev/stdout proxy env=forwarded - WSGIDaemonProcess panko processes=1 threads=2 user=panko group=panko display-name=%{GROUP} + WSGIDaemonProcess panko processes=2 threads=1 user=panko group=panko display-name=%{GROUP} WSGIProcessGroup panko WSGIScriptAlias / /var/www/cgi-bin/panko/panko-api WSGIApplicationGroup %{GLOBAL}