apache wsgi: Exchange defaults for workers and threads
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 Change-Id: I0dedcec2a7bb9983e66878e89dc651cb08939f4f
This commit is contained in:
committed by
zhongshengping
parent
b2b4da370e
commit
df638e2526
@@ -46,7 +46,7 @@
|
||||
#
|
||||
# [*workers*]
|
||||
# Number of WSGI workers to spawn.
|
||||
# Optional. Defaults to 1
|
||||
# Optional. Defaults to $::os_workers
|
||||
#
|
||||
# [*priority*]
|
||||
# (optional) The priority for the vhost.
|
||||
@@ -54,7 +54,7 @@
|
||||
#
|
||||
# [*threads*]
|
||||
# (optional) The number of threads for the vhost.
|
||||
# Defaults to $::os_workers
|
||||
# Defaults to 1
|
||||
#
|
||||
# [*wsgi_process_display_name*]
|
||||
# (optional) Name of the WSGI process display-name.
|
||||
@@ -106,7 +106,7 @@ class nova::wsgi::apache_api (
|
||||
$bind_host = undef,
|
||||
$path = '/',
|
||||
$ssl = true,
|
||||
$workers = 1,
|
||||
$workers = $::os_workers,
|
||||
$ssl_cert = undef,
|
||||
$ssl_key = undef,
|
||||
$ssl_chain = undef,
|
||||
@@ -115,7 +115,7 @@ class nova::wsgi::apache_api (
|
||||
$ssl_crl = undef,
|
||||
$ssl_certs_dir = undef,
|
||||
$wsgi_process_display_name = undef,
|
||||
$threads = $::os_workers,
|
||||
$threads = 1,
|
||||
$priority = '10',
|
||||
$access_log_file = false,
|
||||
$access_log_format = false,
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#
|
||||
# [*workers*]
|
||||
# Number of WSGI workers to spawn.
|
||||
# Optional. Defaults to 1
|
||||
# Optional. Defaults to $::os_workers
|
||||
#
|
||||
# [*priority*]
|
||||
# (optional) The priority for the vhost.
|
||||
@@ -52,7 +52,7 @@
|
||||
#
|
||||
# [*threads*]
|
||||
# (optional) The number of threads for the vhost.
|
||||
# Defaults to $::os_workers
|
||||
# Defaults to 1
|
||||
#
|
||||
# [*wsgi_process_display_name*]
|
||||
# (optional) Name of the WSGI process display-name.
|
||||
@@ -104,7 +104,7 @@ class nova::wsgi::apache_placement (
|
||||
$bind_host = undef,
|
||||
$path = '/placement',
|
||||
$ssl = true,
|
||||
$workers = 1,
|
||||
$workers = $::os_workers,
|
||||
$ssl_cert = undef,
|
||||
$ssl_key = undef,
|
||||
$ssl_chain = undef,
|
||||
@@ -113,7 +113,7 @@ class nova::wsgi::apache_placement (
|
||||
$ssl_crl = undef,
|
||||
$ssl_certs_dir = undef,
|
||||
$wsgi_process_display_name = undef,
|
||||
$threads = $::os_workers,
|
||||
$threads = 1,
|
||||
$priority = '10',
|
||||
$ensure_package = 'present',
|
||||
$access_log_file = false,
|
||||
|
||||
@@ -23,9 +23,9 @@ describe 'nova::wsgi::apache_api' do
|
||||
:path => '/',
|
||||
:servername => facts[:fqdn],
|
||||
:ssl => true,
|
||||
:threads => facts[:os_workers],
|
||||
:threads => 1,
|
||||
:user => 'nova',
|
||||
:workers => 1,
|
||||
:workers => facts[:os_workers],
|
||||
:wsgi_daemon_process => 'nova-api',
|
||||
:wsgi_process_group => 'nova-api',
|
||||
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
||||
@@ -77,7 +77,7 @@ describe 'nova::wsgi::apache_api' do
|
||||
:path => '/',
|
||||
:servername => 'dummy.host',
|
||||
:ssl => false,
|
||||
:threads => facts[:os_workers],
|
||||
:threads => 1,
|
||||
:user => 'nova',
|
||||
:workers => 37,
|
||||
:wsgi_daemon_process => 'nova-api',
|
||||
|
||||
@@ -28,9 +28,9 @@ describe 'nova::wsgi::apache_placement' do
|
||||
:path => '/placement',
|
||||
:servername => facts[:fqdn],
|
||||
:ssl => true,
|
||||
:threads => facts[:os_workers],
|
||||
:threads => 1,
|
||||
:user => 'nova',
|
||||
:workers => 1,
|
||||
:workers => facts[:os_workers],
|
||||
:wsgi_daemon_process => 'placement-api',
|
||||
:wsgi_process_group => 'placement-api',
|
||||
:wsgi_script_dir => platform_params[:wsgi_script_path],
|
||||
@@ -88,7 +88,7 @@ describe 'nova::wsgi::apache_placement' do
|
||||
:servername => 'dummy.host',
|
||||
:ssl => false,
|
||||
:workers => 37,
|
||||
:threads => facts[:os_workers],
|
||||
:threads => 1,
|
||||
:user => 'nova',
|
||||
:wsgi_daemon_process => 'placement-api',
|
||||
:wsgi_process_display_name => 'placement-api',
|
||||
|
||||
Reference in New Issue
Block a user