Skip to content

Commit

Permalink
Change report_interval from 4 to 30, agent_down_time from 9 to 75
Browse files Browse the repository at this point in the history
report_interval is how often an agent sends out a heartbeat to the
service. The Neutron service responds to these 'report_state' RPC
messages by updating the agent's heartbeat DB record.
The last heartbeat is then compared to the configured
agent_down_time to determine if the agent is up or down.
The agent's status is used when scheduling networks on DHCP
and L3 agents.

In the spirit of sane defaults suited for production, these values
should be bumped to reduce the load on the Neutron service
dramatically, freeing up CPU time to perform intensive operations.

DocImpact
Closes-Bug: #1293083

(cherry picked from commit e13d19c)
Change-Id: I77bcf8f66f74ba55513c989caead1f96c92b9832
Conflicts:
	neutron/agent/common/config.py
  • Loading branch information
assafmuller authored and rossella committed Apr 14, 2014
1 parent 545cb34 commit 3569aba
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions etc/neutron.conf
Expand Up @@ -213,7 +213,7 @@ notification_driver = neutron.openstack.common.notifier.rpc_notifier
# =========== items for agent management extension =============
# Seconds to regard the agent as down; should be at least twice
# report_interval, to be sure the agent is down for good
# agent_down_time = 9
# agent_down_time = 75
# =========== end of items for agent management extension =====

# =========== items for agent scheduler extension =============
Expand Down Expand Up @@ -304,7 +304,7 @@ notification_driver = neutron.openstack.common.notifier.rpc_notifier
# =========== items for agent management extension =============
# seconds between nodes reporting state to server; should be less than
# agent_down_time, best if it is half or less than agent_down_time
# report_interval = 4
# report_interval = 30

# =========== end of items for agent management extension =====

Expand Down
2 changes: 1 addition & 1 deletion neutron/agent/common/config.py
Expand Up @@ -32,7 +32,7 @@
]

AGENT_STATE_OPTS = [
cfg.IntOpt('report_interval', default=4,
cfg.IntOpt('report_interval', default=30,
help=_('Seconds between nodes reporting state to server; '
'should be less than agent_down_time, best if it '
'is half or less than agent_down_time.')),
Expand Down
2 changes: 1 addition & 1 deletion neutron/db/agents_db.py
Expand Up @@ -31,7 +31,7 @@

LOG = logging.getLogger(__name__)
cfg.CONF.register_opt(
cfg.IntOpt('agent_down_time', default=9,
cfg.IntOpt('agent_down_time', default=75,
help=_("Seconds to regard the agent is down; should be at "
"least twice report_interval, to be sure the "
"agent is down for good.")))
Expand Down
2 changes: 1 addition & 1 deletion neutron/tests/unit/nec/test_nec_agent.py
Expand Up @@ -197,7 +197,7 @@ def sleep_mock(*args, **kwargs):
def test_report_state_installed(self):
self.loopingcall.assert_called_once_with(self.agent._report_state)
instance = self.loopingcall.return_value
instance.start.assert_called_once_with(interval=4)
self.assertTrue(instance.start.called)

def _check_report_state(self, cur_ports, num_ports, fail_mode,
first=False):
Expand Down

0 comments on commit 3569aba

Please sign in to comment.