diff --git a/lib/cinder b/lib/cinder index ce13b86d84..1e7f9c41e7 100644 --- a/lib/cinder +++ b/lib/cinder @@ -307,6 +307,9 @@ function configure_cinder { iniset $CINDER_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME iniset $CINDER_CONF keystone_authtoken admin_password $SERVICE_PASSWORD + if [ -n "$API_WORKERS" ]; then + iniset $CINDER_CONF DEFAULT osapi_volume_workers "$API_WORKERS" + fi } # create_cinder_accounts() - Set up common required cinder accounts diff --git a/lib/glance b/lib/glance index 7a28b68717..47dd38d90f 100644 --- a/lib/glance +++ b/lib/glance @@ -131,6 +131,10 @@ function configure_glance { # sections. iniset $GLANCE_API_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/ + if [ -n "$API_WORKERS" ]; then + iniset $GLANCE_API_CONF DEFAULT workers "$API_WORKERS" + fi + # Store the images in swift if enabled. if is_service_enabled s-proxy; then iniset $GLANCE_API_CONF DEFAULT default_store swift diff --git a/lib/nova b/lib/nova index b3a586cca7..367b916a88 100644 --- a/lib/nova +++ b/lib/nova @@ -516,6 +516,12 @@ function create_nova_conf { iniset $NOVA_CONF DEFAULT ec2_dmz_host "$EC2_DMZ_HOST" iniset_rpc_backend nova $NOVA_CONF DEFAULT iniset $NOVA_CONF glance api_servers "$GLANCE_HOSTPORT" + + if [ -n "$API_WORKERS" ]; then + iniset $NOVA_CONF DEFAULT osci_compute_workers "$API_WORKERS" + iniset $NOVA_CONF DEFAULT ec2_workers "$API_WORKERS" + iniset $NOVA_CONF DEFAULT metadata_workers "$API_WORKERS" + fi } function init_nova_cells { diff --git a/stackrc b/stackrc index e0711326cc..b7862887ba 100644 --- a/stackrc +++ b/stackrc @@ -505,6 +505,11 @@ UNDO_REQUIREMENTS=${UNDO_REQUIREMENTS:-True} # Allow the use of an alternate protocol (such as https) for service endpoints SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http} +# Sets the maximum number of workers for various services and can restrict +# the memory used where there are a large number of CPUs present +# (the default number of workers for many services is the number of CPUs) +# API_WORKERS=4 + # Local variables: # mode: shell-script # End: