71ad4713cc
The thread pool regulates itself: when idle, it kills threads until empty, when in demand, it creates new threads until full. This behaviour doesn't play well with latency sensitive workloads where the price of creating a new thread is too high. For example, when paired with qemu's '-mlock', or using safety features like SafeStack, creating a new thread has been measured take multiple milliseconds. In order to mitigate this let's introduce a new 'EventLoopBase' property to set the thread pool size. The threads will be created during the pool's initialization or upon updating the property's value, remain available during its lifetime regardless of demand, and destroyed upon freeing it. A properly characterized workload will then be able to configure the pool to avoid any latency spikes. Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Acked-by: Markus Armbruster <armbru@redhat.com> Message-id: 20220425075723.20019-4-nsaenzju@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> |
||
---|---|---|
.. | ||
accounting.h | ||
aio_task.h | ||
aio-wait.h | ||
aio.h | ||
block_backup.h | ||
block_int-common.h | ||
block_int-global-state.h | ||
block_int-io.h | ||
block_int.h | ||
block-common.h | ||
block-copy.h | ||
block-global-state.h | ||
block-hmp-cmds.h | ||
block-io.h | ||
block.h | ||
blockjob_int.h | ||
blockjob.h | ||
dirty-bitmap.h | ||
export.h | ||
fuse.h | ||
nbd.h | ||
nvme.h | ||
qapi.h | ||
qdict.h | ||
raw-aio.h | ||
replication.h | ||
reqlist.h | ||
snapshot.h | ||
thread-pool.h | ||
throttle-groups.h | ||
write-threshold.h |