Skip to content

Improve compressed WAL write throughput#14828

Open
moonsphere wants to merge 1 commit into
facebook:mainfrom
moonsphere:optimize-wal-compression
Open

Improve compressed WAL write throughput#14828
moonsphere wants to merge 1 commit into
facebook:mainfrom
moonsphere:optimize-wal-compression

Conversation

@moonsphere

@moonsphere moonsphere commented Jun 6, 2026

Copy link
Copy Markdown

Summary:

  • Add a prepared WAL record path so compressed WAL write groups can precompress outside the single WAL emission path.
  • For normal zstd-compressed WAL write groups, merge the WriteBatch once, split the merged logical WAL payload across group threads for zstd precompression, then emit one logical WAL record to preserve recovery semantics.
  • Add WAL precompression stats/perf context counters and coverage for prepared compressed WAL records and DB write group recovery.

Tests:

  • make -j4 log_test db_write_test statistics_test perf_context_test
  • ./log_test --gtest_filter='CompressionLogTest'
  • ./db_write_test --gtest_filter='ParallelCompressedWALPrecompression'
  • ./statistics_test
  • ./perf_context_test --gtest_filter='PerfContext'
@meta-cla

meta-cla Bot commented Jun 6, 2026

Copy link
Copy Markdown

Hi @moonsphere!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@moonsphere moonsphere force-pushed the optimize-wal-compression branch from 567fc08 to d3cab73 Compare June 6, 2026 16:26
@meta-cla meta-cla Bot added the CLA Signed label Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant