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

[DocDB] Aggregate WAL log write header and data into one call #11035

Closed
fritshoogland-yugabyte opened this issue Jan 8, 2022 · 1 comment
Closed
Assignees
Labels
area/docdb YugabyteDB core features

Comments

@fritshoogland-yugabyte
Copy link

Description

Currently for a WAL write the header belonging to the WAL data is written completely separately from the actual data, leading to two system calls.

This happens in WriteableLogSegment::WriteEntryBatch: https://sourcegraph.com/github.com/yugabyte/[email protected]/-/blob/src/yb/consensus/log_util.cc?L863:28
(line 881+884)

It would be a performance optimization to combine the two. This also would make the log_append_latency statistic truly account for the number of write calls.

@fritshoogland-yugabyte
Copy link
Author

@spolitov the statistics log_append_latency and log_bytes_logged only account for the what I see as second write, which is probably the actual WAL data, and the first one being something like a header. It would be good to have these reflect what actually is performed at the OS level.

spolitov added a commit that referenced this issue Jan 26, 2022
…ices in WritableLogSegment::WriteEntryBatch

Summary:
Currently, we call writable_file_->Append twice in WritableLogSegment::WriteEntryBatch.
It could be replaced with writable_file_->AppendSlices to minimize the amount of system calls.

Test Plan: Jenkins

Reviewers: rthallam

Reviewed By: rthallam

Subscribers: kannan, fhoogland, ybase, bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D14963
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features
Projects
None yet
Development

No branches or pull requests

4 participants