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: I116df85f259528d547a958850b9c3793d01e2a45
This commit is contained in:
parent
23baad4a6a
commit
7a137e2355
|
@ -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
|
||||
#
|
||||
# [*ssl_cert*]
|
||||
# [*ssl_key*]
|
||||
|
@ -105,7 +105,7 @@ define heat::wsgi::apache (
|
|||
$bind_host = undef,
|
||||
$path = '/',
|
||||
$ssl = true,
|
||||
$workers = 1,
|
||||
$workers = $::os_workers,
|
||||
$ssl_cert = undef,
|
||||
$ssl_key = undef,
|
||||
$ssl_chain = undef,
|
||||
|
@ -113,7 +113,7 @@ define heat::wsgi::apache (
|
|||
$ssl_crl_path = undef,
|
||||
$ssl_crl = undef,
|
||||
$ssl_certs_dir = undef,
|
||||
$threads = $::os_workers,
|
||||
$threads = 1,
|
||||
$priority = '10',
|
||||
$vhost_custom_fragment = undef,
|
||||
$access_log_file = false,
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#
|
||||
# [*workers*]
|
||||
# Number of WSGI workers to spawn.
|
||||
# Optional. Defaults to 1
|
||||
# Optional. Defaults to $::os_workers
|
||||
#
|
||||
# [*priority*]
|
||||
# (optional) The priority for the vhost.
|
||||
|
@ -49,7 +49,7 @@
|
|||
#
|
||||
# [*threads*]
|
||||
# (optional) The number of threads for the vhost.
|
||||
# Defaults to $::os_workers
|
||||
# Defaults to 1
|
||||
#
|
||||
# [*ssl_cert*]
|
||||
# [*ssl_key*]
|
||||
|
@ -85,7 +85,7 @@ class heat::wsgi::apache_api (
|
|||
$bind_host = undef,
|
||||
$path = '/',
|
||||
$ssl = true,
|
||||
$workers = 1,
|
||||
$workers = $::os_workers,
|
||||
$ssl_cert = undef,
|
||||
$ssl_key = undef,
|
||||
$ssl_chain = undef,
|
||||
|
@ -93,7 +93,7 @@ class heat::wsgi::apache_api (
|
|||
$ssl_crl_path = undef,
|
||||
$ssl_crl = undef,
|
||||
$ssl_certs_dir = undef,
|
||||
$threads = $::os_workers,
|
||||
$threads = 1,
|
||||
$priority = '10',
|
||||
$custom_wsgi_process_options = {},
|
||||
) {
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#
|
||||
# [*workers*]
|
||||
# Number of WSGI workers to spawn.
|
||||
# Optional. Defaults to 1
|
||||
# Optional. Defaults to $::os_workers
|
||||
#
|
||||
# [*priority*]
|
||||
# (optional) The priority for the vhost.
|
||||
|
@ -49,7 +49,7 @@
|
|||
#
|
||||
# [*threads*]
|
||||
# (optional) The number of threads for the vhost.
|
||||
# Defaults to $::os_workers
|
||||
# Defaults to 1
|
||||
#
|
||||
# [*ssl_cert*]
|
||||
# [*ssl_key*]
|
||||
|
@ -85,7 +85,7 @@ class heat::wsgi::apache_api_cfn (
|
|||
$bind_host = undef,
|
||||
$path = '/',
|
||||
$ssl = true,
|
||||
$workers = 1,
|
||||
$workers = $::os_workers,
|
||||
$ssl_cert = undef,
|
||||
$ssl_key = undef,
|
||||
$ssl_chain = undef,
|
||||
|
@ -93,7 +93,7 @@ class heat::wsgi::apache_api_cfn (
|
|||
$ssl_crl_path = undef,
|
||||
$ssl_crl = undef,
|
||||
$ssl_certs_dir = undef,
|
||||
$threads = $::os_workers,
|
||||
$threads = 1,
|
||||
$priority = '10',
|
||||
$custom_wsgi_process_options = {},
|
||||
) {
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#
|
||||
# [*workers*]
|
||||
# Number of WSGI workers to spawn.
|
||||
# Optional. Defaults to 1
|
||||
# Optional. Defaults to $::os_workers
|
||||
#
|
||||
# [*priority*]
|
||||
# (optional) The priority for the vhost.
|
||||
|
@ -49,7 +49,7 @@
|
|||
#
|
||||
# [*threads*]
|
||||
# (optional) The number of threads for the vhost.
|
||||
# Defaults to $::os_workers
|
||||
# Defaults to 1
|
||||
#
|
||||
# [*ssl_cert*]
|
||||
# [*ssl_key*]
|
||||
|
@ -85,7 +85,7 @@ class heat::wsgi::apache_api_cloudwatch (
|
|||
$bind_host = undef,
|
||||
$path = '/',
|
||||
$ssl = true,
|
||||
$workers = 1,
|
||||
$workers = $::os_workers,
|
||||
$ssl_cert = undef,
|
||||
$ssl_key = undef,
|
||||
$ssl_chain = undef,
|
||||
|
@ -93,7 +93,7 @@ class heat::wsgi::apache_api_cloudwatch (
|
|||
$ssl_crl_path = undef,
|
||||
$ssl_crl = undef,
|
||||
$ssl_certs_dir = undef,
|
||||
$threads = $::os_workers,
|
||||
$threads = 1,
|
||||
$priority = '10',
|
||||
$custom_wsgi_process_options = {},
|
||||
) {
|
||||
|
|
|
@ -11,14 +11,14 @@ describe 'heat::wsgi::apache_api_cfn' do
|
|||
:bind_host => nil,
|
||||
:path => '/',
|
||||
:ssl => true,
|
||||
:workers => 1,
|
||||
:workers => facts[:os_workers],
|
||||
:ssl_cert => nil,
|
||||
:ssl_key => nil,
|
||||
:ssl_chain => nil,
|
||||
:ssl_ca => nil,
|
||||
:ssl_crl_path => nil,
|
||||
:ssl_certs_dir => nil,
|
||||
:threads => facts[:os_workers],
|
||||
:threads => 1,
|
||||
:priority => 10,
|
||||
:custom_wsgi_process_options => {},
|
||||
:access_log_file => false,
|
||||
|
|
|
@ -11,14 +11,14 @@ describe 'heat::wsgi::apache_api_cloudwatch' do
|
|||
:bind_host => nil,
|
||||
:path => '/',
|
||||
:ssl => true,
|
||||
:workers => 1,
|
||||
:workers => facts[:os_workers],
|
||||
:ssl_cert => nil,
|
||||
:ssl_key => nil,
|
||||
:ssl_chain => nil,
|
||||
:ssl_ca => nil,
|
||||
:ssl_crl_path => nil,
|
||||
:ssl_certs_dir => nil,
|
||||
:threads => facts[:os_workers],
|
||||
:threads => 1,
|
||||
:priority => 10,
|
||||
:custom_wsgi_process_options => {}, )
|
||||
}
|
||||
|
|
|
@ -11,14 +11,14 @@ describe 'heat::wsgi::apache_api' do
|
|||
:bind_host => nil,
|
||||
:path => '/',
|
||||
:ssl => true,
|
||||
:workers => 1,
|
||||
:workers => facts[:os_workers],
|
||||
:ssl_cert => nil,
|
||||
:ssl_key => nil,
|
||||
:ssl_chain => nil,
|
||||
:ssl_ca => nil,
|
||||
:ssl_crl_path => nil,
|
||||
:ssl_certs_dir => nil,
|
||||
:threads => facts[:os_workers],
|
||||
:threads => 1,
|
||||
:priority => 10,
|
||||
:custom_wsgi_process_options => {},
|
||||
:access_log_file => false,
|
||||
|
|
Loading…
Reference in New Issue