From 06f2ea2b962ffafeb415770d7eec5ee7886ee3b5 Mon Sep 17 00:00:00 2001 From: Armando Migliaccio Date: Thu, 2 Feb 2017 16:47:00 -0800 Subject: [PATCH] Cut back on the number of workers ran for neutron The dedicated RPC worker is overkill in single or multinode devstack deployments. Also metadata API workers was left default, which meant they were as many as the CPU cores. Related-bug: 1656386 Change-Id: Ibbf7787dfa48e13a51f961f3e0ee2b8f49964759 --- lib/neutron | 1 + lib/neutron-legacy | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/neutron b/lib/neutron index f6c705c2b0..9b032b72e2 100644 --- a/lib/neutron +++ b/lib/neutron @@ -219,6 +219,7 @@ function configure_neutron_new { iniset $NEUTRON_META_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL iniset $NEUTRON_META_CONF DEFAULT nova_metadata_ip $SERVICE_HOST + iniset $NEUTRON_META_CONF DEFAULT metadata_workers $API_WORKERS iniset $NEUTRON_META_CONF agent root_helper_daemon "$NEUTRON_ROOTWRAP_DAEMON_CMD" # TODO(dtroyer): remove the v2.0 hard code below diff --git a/lib/neutron-legacy b/lib/neutron-legacy index 5ec61f9645..af91470e65 100644 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy @@ -359,6 +359,10 @@ function configure_mutnauq { fi iniset $NEUTRON_CONF DEFAULT api_workers "$API_WORKERS" + # devstack is not a tool for running uber scale OpenStack + # clouds, therefore running without a dedicated RPC worker + # for state reports is more than adequate. + iniset $NEUTRON_CONF DEFAULT rpc_state_report_workers 0 } function create_nova_conf_neutron { @@ -788,6 +792,7 @@ function _configure_neutron_metadata_agent { iniset $Q_META_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL iniset $Q_META_CONF_FILE DEFAULT nova_metadata_ip $Q_META_DATA_IP + iniset $Q_META_CONF_FILE DEFAULT metadata_workers $API_WORKERS iniset $Q_META_CONF_FILE AGENT root_helper "$Q_RR_COMMAND" if [[ "$Q_USE_ROOTWRAP_DAEMON" == "True" ]]; then iniset $Q_META_CONF_FILE AGENT root_helper_daemon "$Q_RR_DAEMON_COMMAND"