Skip to content

Commit e13d19c

Browse files
committedMar 18, 2014
Change report_interval from 4 to 30, agent_down_time from 9 to 75
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 Change-Id: I77bcf8f66f74ba55513c989caead1f96c92b9832
1 parent b76c9e8 commit e13d19c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed
 

‎etc/neutron.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ notification_driver = neutron.openstack.common.notifier.rpc_notifier
225225
# =========== items for agent management extension =============
226226
# Seconds to regard the agent as down; should be at least twice
227227
# report_interval, to be sure the agent is down for good
228-
# agent_down_time = 9
228+
# agent_down_time = 75
229229
# =========== end of items for agent management extension =====
230230

231231
# =========== items for agent scheduler extension =============
@@ -385,7 +385,7 @@ notification_driver = neutron.openstack.common.notifier.rpc_notifier
385385
# =========== items for agent management extension =============
386386
# seconds between nodes reporting state to server; should be less than
387387
# agent_down_time, best if it is half or less than agent_down_time
388-
# report_interval = 4
388+
# report_interval = 30
389389

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

‎neutron/agent/common/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
]
3333

3434
AGENT_STATE_OPTS = [
35-
cfg.FloatOpt('report_interval', default=4,
35+
cfg.FloatOpt('report_interval', default=30,
3636
help=_('Seconds between nodes reporting state to server; '
3737
'should be less than agent_down_time, best if it '
3838
'is half or less than agent_down_time.')),

‎neutron/db/agents_db.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
LOG = logging.getLogger(__name__)
3535
cfg.CONF.register_opt(
36-
cfg.IntOpt('agent_down_time', default=9,
36+
cfg.IntOpt('agent_down_time', default=75,
3737
help=_("Seconds to regard the agent is down; should be at "
3838
"least twice report_interval, to be sure the "
3939
"agent is down for good.")))

‎neutron/tests/unit/nec/test_nec_agent.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def sleep_mock(*args, **kwargs):
196196
def test_report_state_installed(self):
197197
self.loopingcall.assert_called_once_with(self.agent._report_state)
198198
instance = self.loopingcall.return_value
199-
instance.start.assert_called_once_with(interval=4)
199+
self.assertTrue(instance.start.called)
200200

201201
def _check_report_state(self, cur_ports, num_ports, fail_mode,
202202
first=False):

0 commit comments

Comments
 (0)
Please sign in to comment.