This repository has been archived by the owner on Jun 23, 2022. It is now read-only.
perf(slog): Use a special thread pool for slog write callback #568
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Write callback tasks of 'Shared-log' and 'Private log' are both in the thread pool
THREAD_POOL_DEFAULT
. However, when data disk (aka plog disk) has a high load(for example, when pegasus is running background compaction), the plog's callback will spend a long time flushing the data to disk, thus results in that shared log callback being blocked, which has a heavy impact on user writes latency.This patch split the thread pools of 'shared log' and 'private log' callback, and add new thread pool to serve the shared log's callback, which achieve obvious optimization. See the result as follow (5 replica server, 3*30thread ycsb client, value_length=1KB):
Before:
P99
P999
After:
P99
P999
NOTE: