Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to low-latency local loglet configuration #1546

Merged
merged 2 commits into from
May 24, 2024
Merged

Default to low-latency local loglet configuration #1546

merged 2 commits into from
May 24, 2024

Conversation

AhmedSoliman
Copy link
Contributor

@AhmedSoliman AhmedSoliman commented May 22, 2024

Default to low-latency local loglet configuration

This PR changes the default configuration of the local loglet to disable time-based batching. Most users's first impressions and general use will expect interactive low-latency experience and we want this to be the default case.
A major performance win is the change in local loglet implementation. Tokio has 1ms timer resolution, so even if batching duration is set to zero, the runtime will still sleep an arbitrary amound between 0 and 1ms to resume the stream. The change switches to chunking ready items by default if time-based batching is zero. This results in 6X lower append path latency in my tests (even with fdatasync running on fast nvme)


Stack created with Sapling. Best reviewed with ReviewStack.

Copy link

github-actions bot commented May 22, 2024

Test Results

 99 files  ±0   99 suites  ±0   8m 5s ⏱️ +20s
 83 tests ±0   83 ✅ ±0  0 💤 ±0  0 ❌ ±0 
212 runs  ±0  212 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 06e9ce4. ± Comparison against base commit c768db1.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Nice improvements 🚀 +1 for merging.

This PR changes the default configuration of the local loglet to disable time-based batching. Most users's first impressions and general use will expect interactive low-latency experience and we want this to be the default case.
A major performance win is the change in local loglet implementation. Tokio has 1ms timer resolution, so even if batching duration is set to zero, the runtime will still sleep an arbitrary amound between 0 and 1ms to resume the stream. The change switches to chunking ready items by default if time-based batching is zero. This results in 6X lower append path latency in my tests (even with fdatasync running on fast nvme)
@AhmedSoliman AhmedSoliman merged commit 06e9ce4 into main May 24, 2024
11 checks passed
@AhmedSoliman AhmedSoliman deleted the pr1546 branch May 24, 2024 18:01
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.

None yet

2 participants