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

Raftstore: async-io brings more minor IOs when writing raft logs. #16907

Closed
LykxSassinator opened this issue Apr 23, 2024 · 3 comments
Closed
Assignees
Labels
affects-8.1 type/enhancement Type: Issue - Enhancement

Comments

@LykxSassinator
Copy link
Contributor

Development Task

Previous work in #16615 shows that the performance on write workloads can be improved as expected by enabling async-io as default.

However, we find that async-io will make side effects to the log batching mechanism, which will make each batch of writing smaller than disabling async-io, according to the metrics from RaftEngine. And smaller batch will make it cannot reach the threshold of compression. Then, it will increase the costs on IO bandwidth (nearly ~10%).

enable async-io disable async-io
image image

And when we increase the threads of async-io, the smaller batching gives higher costs on IOPS.

RaftEngine - bytes / written IOPS on Disk
image image

Finally, by reducing the raft-engine.batch-compression-threshold to 4kb from 8kb(default), the costs on async-io can be eliminated as expected.

So, we should give a more reasonable setting on the compression threshold after enabling async-io.

@cfzjywxk
Copy link
Collaborator

/cc @Yui-Song The previous regression issue related summary and improvement is followed in this issue.

@LykxSassinator LykxSassinator self-assigned this May 8, 2024
ti-chi-bot bot pushed a commit that referenced this issue May 9, 2024
…ics on it. (#16906)

ref #16907

This pr contains:
- Reduce the default compression threshold in RaftEngine to `4kb` as default if users do not manually set it.
- Add relevant metrics on the compression ratio of RaftEngine.write.

Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
ti-chi-bot pushed a commit to ti-chi-bot/tikv that referenced this issue May 9, 2024
ref tikv#16907

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot bot pushed a commit that referenced this issue May 9, 2024
…ics on it. (#16906) (#16967)

ref #16907

This pr contains:
- Reduce the default compression threshold in RaftEngine to `4kb` as default if users do not manually set it.
- Add relevant metrics on the compression ratio of RaftEngine.write.

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>

Co-authored-by: lucasliang <nkcs_lykx@hotmail.com>
@kennedy8312
Copy link

@LykxSassinator Are there any pending tasks for this issue? Shall we close this one?

@LykxSassinator
Copy link
Contributor Author

Yep, as #16967 has been merged to v8.1, this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-8.1 type/enhancement Type: Issue - Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants