Minimize the cost of checking for api worker exit
A recent change to oslo allows the configuration of the interval that ProcessLauncher waits between checks of child exit. The default interval of 0.01s resulted in the neutron service consuming unnecessary cpu cycles checking whether api workers had exited (5% cpu on idle in a VM). This patch extends the interval to 1s to minimize the cost of the checks. Change-Id: I0407ccb2db65cd3839586faff15e70dbc35f005e Closes-bug: #1095346
This commit is contained in:
parent
a2220fad2c
commit
439567325a
@ -211,7 +211,9 @@ class Server(object):
|
||||
self._server = self.pool.spawn(self._run, application,
|
||||
self._socket)
|
||||
else:
|
||||
self._launcher = ProcessLauncher()
|
||||
# Minimize the cost of checking for child exit by extending the
|
||||
# wait interval past the default of 0.01s.
|
||||
self._launcher = ProcessLauncher(wait_interval=1.0)
|
||||
self._server = WorkerService(self, application)
|
||||
self._launcher.launch_service(self._server, workers=workers)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user