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: Ifd7ec428442da08d9aa85718b7b8553ca75c1b5c
This commit is contained in:
parent
27e5956b13
commit
f039a52f8f
|
@ -51,7 +51,7 @@
|
|||
#
|
||||
# [*workers*]
|
||||
# Number of WSGI workers to spawn.
|
||||
# Optional. Defaults to 1
|
||||
# Optional. Defaults to $::os_workers
|
||||
#
|
||||
# [*ssl_cert*]
|
||||
# (optional) Path to SSL certificate
|
||||
|
@ -95,7 +95,7 @@
|
|||
#
|
||||
# [*threads*]
|
||||
# (optional) The number of threads for the vhost.
|
||||
# Defaults to $::os_workers
|
||||
# Defaults to 1
|
||||
#
|
||||
# [*wsgi_application_group*]
|
||||
# (optional) The application group of the WSGI script.
|
||||
|
@ -218,7 +218,7 @@ class keystone::wsgi::apache (
|
|||
$public_path = '/',
|
||||
$admin_path = '/',
|
||||
$ssl = true,
|
||||
$workers = 1,
|
||||
$workers = $::os_workers,
|
||||
$ssl_cert = undef,
|
||||
$ssl_key = undef,
|
||||
$ssl_cert_admin = undef,
|
||||
|
@ -228,7 +228,7 @@ class keystone::wsgi::apache (
|
|||
$ssl_crl_path = undef,
|
||||
$ssl_crl = undef,
|
||||
$ssl_certs_dir = undef,
|
||||
$threads = $::os_workers,
|
||||
$threads = 1,
|
||||
$priority = '10',
|
||||
$wsgi_application_group = '%{GLOBAL}',
|
||||
$wsgi_pass_authorization = 'On',
|
||||
|
|
|
@ -64,8 +64,8 @@ describe 'keystone::wsgi::apache' do
|
|||
'wsgi_daemon_process_options' => {
|
||||
'user' => 'keystone',
|
||||
'group' => 'keystone',
|
||||
'processes' => '1',
|
||||
'threads' => '42',
|
||||
'processes' => '42',
|
||||
'threads' => '1',
|
||||
'display-name' => 'keystone-admin',
|
||||
},
|
||||
'wsgi_process_group' => 'keystone_admin',
|
||||
|
@ -95,8 +95,8 @@ describe 'keystone::wsgi::apache' do
|
|||
'wsgi_daemon_process_options' => {
|
||||
'user' => 'keystone',
|
||||
'group' => 'keystone',
|
||||
'processes' => '1',
|
||||
'threads' => '42',
|
||||
'processes' => '42',
|
||||
'threads' => '1',
|
||||
'display-name' => 'keystone-main',
|
||||
},
|
||||
'wsgi_process_group' => 'keystone_main',
|
||||
|
@ -143,7 +143,7 @@ describe 'keystone::wsgi::apache' do
|
|||
'user' => 'keystone',
|
||||
'group' => 'keystone',
|
||||
'processes' => '37',
|
||||
'threads' => '42',
|
||||
'threads' => '1',
|
||||
'display-name' => 'keystone-admin',
|
||||
},
|
||||
'wsgi_process_group' => 'keystone_admin',
|
||||
|
@ -167,7 +167,7 @@ describe 'keystone::wsgi::apache' do
|
|||
'user' => 'keystone',
|
||||
'group' => 'keystone',
|
||||
'processes' => '37',
|
||||
'threads' => '42',
|
||||
'threads' => '1',
|
||||
'display-name' => 'keystone-main',
|
||||
},
|
||||
'wsgi_process_group' => 'keystone_main',
|
||||
|
@ -284,7 +284,7 @@ describe 'keystone::wsgi::apache' do
|
|||
'user' => 'keystone',
|
||||
'group' => 'keystone',
|
||||
'processes' => '37',
|
||||
'threads' => '42',
|
||||
'threads' => '1',
|
||||
'display-name' => 'keystone-main',
|
||||
},
|
||||
'wsgi_process_group' => 'keystone_main',
|
||||
|
|
Loading…
Reference in New Issue