Fix an issue with high cpu usage caused by ironic-python-agent
Currently running of ipa-centos8-stable-ussuri image causes 100% cpu usage while cleaning. Proposed change fixes this behavior and significantly speeds up cleaning. Change-Id: I2ba9a69f22b11830d8ff1bc346b17bf1a52f25b0 Story: #2007696 Task: #39809
This commit is contained in:
parent
f108b7a2d0
commit
952489020e
@ -381,7 +381,7 @@ class IronicPythonAgent(base.ExecuteCommandMixin):
|
|||||||
self.heartbeater.start()
|
self.heartbeater.start()
|
||||||
try:
|
try:
|
||||||
while self.serve_api:
|
while self.serve_api:
|
||||||
eventlet.sleep(0)
|
eventlet.sleep(0.1)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
LOG.info('Caught keyboard interrupt, exiting')
|
LOG.info('Caught keyboard interrupt, exiting')
|
||||||
self.api.stop()
|
self.api.stop()
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Fixes an issue with high cpu usage caused by ironic-python-agent greenthread
|
||||||
|
eventlent implementation.
|
||||||
|
|
||||||
|
Using eventlet.sleep(0.1) instead of eventlet.sleep(0) gives other processes
|
||||||
|
of IPA more cpu time to run.
|
Loading…
x
Reference in New Issue
Block a user