-
Notifications
You must be signed in to change notification settings - Fork 492
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
safekeeper: increase segment size #9687
Comments
Benchmarks with 128 MB segments on a MacBook (compared to 16 MB segments):
|
Ran the benchmark on a When increasing the segment size from 16 MB to 128 MB, we only see a marginal 8% improvement at large writes with fsync enabled:
The run with fsync disabled also saw minor improvements, but it's already saturating the hardware:
The large discrepancy compared with the macOS results (200% improvement) is mostly down to fsync latencies. On my MacBook with macOS, an 8-byte write+fsync write takes 4.1 ms -- on the However, even with 256 MB segments and 8 MB append sizes, we're still capping out at 700 MB/s. We may be hitting some other bottleneck instead. Maybe the segment size will matter once we resolve this other bottleneck, or with faster disk. Worth exploring further. I ran these benchmarks on a Hetzner node with a local SSD as well, results were similar. |
Fsync costs when closing and initializing segments significantly affect WAL ingestion throughput. Increasing the segment size would amortize these costs.
Local experiments on my MacBook show that increasing the segment size from 16 MB to 128 MB yields a 200% improvement in throughput for large appends.
The text was updated successfully, but these errors were encountered: