Add sync_power_state_pool_size option

The sync_power_state_pool_size option allows to set
the number of greenthreads available for use to sync power states.

It can be used to reduce the number of concurrent requests
made to the hypervisor or system with real instance power states
for performance reasons.

Closes-bug: #1621987
Change-Id: I9cf900314d71c44ec51eb190c102ddc60e13a767
This commit is contained in:
Mathieu Gagné 2016-09-09 00:35:50 -04:00 committed by Matt Riedemann
parent d3dfd7f696
commit 386812e287
3 changed files with 21 additions and 1 deletions

View File

@ -512,7 +512,8 @@ class ComputeManager(manager.Manager):
self.scheduler_client = scheduler_client.SchedulerClient()
self._resource_tracker_dict = {}
self.instance_events = InstanceEvents()
self._sync_power_pool = eventlet.GreenPool()
self._sync_power_pool = eventlet.GreenPool(
size=CONF.sync_power_state_pool_size)
self._syncs_in_progress = {}
self.send_instance_updates = CONF.scheduler_tracks_instance_changes
if CONF.max_concurrent_builds != 0:

View File

@ -375,6 +375,15 @@ Possible values:
* If value is 0, then one attempt is made.
* Any negative value is treated as 0.
* For any value > 0, total attempts are (value + 1)
"""),
cfg.IntOpt('sync_power_state_pool_size',
default=1000,
help="""
Number of greenthreads available for use to sync power states.
Possible values:
* Any positive integer representing greenthreads count.
""")
]

View File

@ -0,0 +1,10 @@
---
other:
- New configuration option sync_power_state_pool_size
has been added to set the number of greenthreads available
for use to sync power states. Default value (1000) matches
the previous implicit default value provided by Greenpool.
This option can be used to reduce the number of concurrent requests
made to the hypervisor or system with real instance power states
for performance reasons.