2e59f7b0b3
Currently nodepool has one thread per server creation or deletion. Each of those waits for the cloud by regularly getting the server list and checking if their instance is active or gone. On a busy nodepool this leads to severe thread contention when the server list gets large and/or there are many parallel creations/deletions in progress. This can be improved by offloading the waiting to a single thread that regularly retrieves the server list and compares that to the list of waiting server creates/deletes. The calling threads are then waiting until the central thread wakes them up to proceed their task. The waiting threads are waiting for the event outside of the GIL and thus are not contributing to the thread contention problem anymore. An alternative approach would be to redesign the threading to be less threaded but this would be a much more complex redesign. Thus this change keeps the many threads approach but makes them wait much more lightweight which shows a substantial improvement during load testing in a test environment. Change-Id: I5525f2558a4f08a455f72e6b5479f27684471dc7 |
||
---|---|---|
.. | ||
__init__.py | ||
config.py | ||
handler.py | ||
provider.py |