Skip to content

Fix perf issue #156

Open
shosseinimotlagh wants to merge 1 commit intoeBay:mainfrom
shosseinimotlagh:fix_chunk_selector
Open

Fix perf issue #156
shosseinimotlagh wants to merge 1 commit intoeBay:mainfrom
shosseinimotlagh:fix_chunk_selector

Conversation

@shosseinimotlagh
Copy link
Contributor

@shosseinimotlagh shosseinimotlagh commented Feb 9, 2026

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.

…or policy

Make logstore chunk size adjuastable
Copy link
Contributor

@sanebay sanebay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


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(); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants