Use (# of CPUs) glance workers by default
The config docs have historically recommended that the number of glance workers should be set to the number of CPUs available for best performance, so we should make this the default. Commit 75c96a48fc7e5dfb59d8258142b01422f81b0253 did the same thing in Nova in Icehouse and the plan is to do the same thing for Cinder and Trove workers. The config files are updated to match the help string in the code. There is no upgrade impact since glance-api.conf previously hard-coded the workers value to 1 so anyone upgrading to this will still get whatever value was set in glance-api.conf prior to this change. DocImpact: glance workers will now be equal to the number of CPUs available by default if not explicitly specified in glance-api.conf and/or glance-registry.conf. UpgradeImpact: There is no upgrade impact to glance-api workers since glance-api.conf previously hard-coded the workers value to 1 so anyone upgrading to tihs will still get whatever value was set in glance-api.conf prior to this change. There is an upgrade impact to the glance-registry workers since glance-registry.conf did not hard-code the workers value to 1 before change I0cee0d284eef9ce5dcb26720499f2c4d31eaca0f, which is overwritten here. So anyone upgrading to this change that does not have workers specified in glance-registry.conf will now be running multiple workers by default when they restart the glance registry service. Closes-Bug: #1333325 Change-Id: I6795c6e22268bb3fb67331edc7af641aefa904cc
This commit is contained in:
parent
dde2cbafd3
commit
cb7b189f4c
@ -167,7 +167,7 @@ performance (especially if using SSL with compression enabled). Typically
|
||||
it is recommended to have one worker process per CPU. The value `0`
|
||||
will prevent any new processes from being created.
|
||||
|
||||
Optional. Default: ``1``
|
||||
Optional. Default: The number of CPUs available will be used by default.
|
||||
|
||||
* ``db_auto_create=False``
|
||||
|
||||
|
@ -55,12 +55,10 @@ backlog = 4096
|
||||
# package, it is also possible to use: glance.db.registry.api
|
||||
# data_api = glance.db.sqlalchemy.api
|
||||
|
||||
# Number of Glance API worker processes to start.
|
||||
# On machines with more than one CPU increasing this value
|
||||
# may improve performance (especially if using SSL with
|
||||
# compression turned on). It is typically recommended to set
|
||||
# this value to the number of CPUs present on your machine.
|
||||
workers = 1
|
||||
# The number of child process workers that will be
|
||||
# created to service API requests. The default will be
|
||||
# equal to the number of CPUs available. (integer value)
|
||||
#workers = None
|
||||
|
||||
# Maximum line size of message headers to be accepted.
|
||||
# max_header_line may need to be increased when using large tokens
|
||||
|
@ -29,12 +29,10 @@ backlog = 4096
|
||||
# package.
|
||||
#data_api = glance.db.sqlalchemy.api
|
||||
|
||||
# Number of Glance Registry worker processes to start.
|
||||
# On machines with more than one CPU increasing this value
|
||||
# may improve performance (especially if using SSL with
|
||||
# compression turned on). It is typically recommended to set
|
||||
# this value to the number of CPUs present on your machine.
|
||||
workers = 1
|
||||
# The number of child process workers that will be
|
||||
# created to service Registry requests. The default will be
|
||||
# equal to the number of CPUs available. (integer value)
|
||||
#workers = None
|
||||
|
||||
# Enable Registry API versions individually or simultaneously
|
||||
#enable_v1_registry = True
|
||||
|
@ -47,6 +47,7 @@ from glance.common import utils
|
||||
from glance.openstack.common import gettextutils
|
||||
from glance.openstack.common import jsonutils
|
||||
import glance.openstack.common.log as logging
|
||||
from glance.openstack.common import processutils
|
||||
|
||||
|
||||
bind_opts = [
|
||||
@ -74,9 +75,10 @@ socket_opts = [
|
||||
]
|
||||
|
||||
eventlet_opts = [
|
||||
cfg.IntOpt('workers', default=1,
|
||||
cfg.IntOpt('workers', default=processutils.get_worker_count(),
|
||||
help=_('The number of child process workers that will be '
|
||||
'created to service requests.')),
|
||||
'created to service requests. The default will be '
|
||||
'equal to the number of CPUs available.')),
|
||||
cfg.StrOpt('eventlet_hub', default='poll',
|
||||
help=_('Name of eventlet hub to use. Traditionally, we have '
|
||||
'only supported \'poll\', however \'selects\' may be '
|
||||
|
Loading…
Reference in New Issue
Block a user