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
This commit is contained in:
Vasyl Saienko 2019-06-26 17:01:35 +03:00
parent 2d6b643396
commit 3d6557279f
3 changed files with 3 additions and 3 deletions

View File

@ -391,7 +391,7 @@ conf:
CustomLog /dev/stdout proxy env=forwarded
<VirtualHost *:{{ tuple "alarming" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}>
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}

View File

@ -1189,7 +1189,7 @@ conf:
CustomLog /dev/stdout proxy env=forwarded
<VirtualHost *:{{ tuple "placement" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}>
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}

View File

@ -205,7 +205,7 @@ conf:
CustomLog /dev/stdout proxy env=forwarded
<VirtualHost *:{{ tuple "event" "internal" "api" . | include "helm-toolkit.endpoints.endpoint_port_lookup" }}>
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}