Open
Conversation
…or policy Make logstore chunk size adjuastable
33dfe0d to
7bb727c
Compare
sanebay
approved these changes
Feb 12, 2026
|
|
||
| auto chunk = volc->m_chunks[*volc->m_next_chunk_index]; | ||
| *volc->m_next_chunk_index = ((*volc->m_next_chunk_index) + 1); | ||
| if (chunk && chunk->available_blks() > 0) { return chunk->get_internal_chunk(); } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix perf issue
1- Increase and configurable log chunk size : The size of journal chunk size was 32MB which makes frequent append_chunk() to be called every 1.5 seconds. This results in constant growth of journal flush latency from 16us to 150us after 20hours run. After making it to large size i.e., 2GB, the journal flush latency reduced to 16 us and getting invariant for long run.
2- changing chunk selector policy: For each alloc buf, chunk selector chose the next available chunk so that block allocation distributed across all chunks. This caused performance degradation for read since it is going to be completely random. The policy is changed to First Fit algorithm, hence a block from a new chunk will be allocated when the current chunk has no availablity. The perf test shows the read latency reduces from 85 us to 40 us.