-
Notifications
You must be signed in to change notification settings - Fork 893
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
Avoid excessive reallocation in row compressors #6638
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6638 +/- ##
==========================================
- Coverage 80.04% 80.01% -0.03%
==========================================
Files 190 190
Lines 37179 37135 -44
Branches 9450 9433 -17
==========================================
- Hits 29761 29715 -46
- Misses 3003 3016 +13
+ Partials 4415 4404 -11 ☔ View full report in Codecov by Sentry. |
@svenklemm, @erimatnor: please review this pull request.
|
simple8brle_compressor_init(&compressor->bits_used_per_xor); | ||
bit_array_init(&compressor->xors); | ||
bit_array_init(&compressor->xors, | ||
/* expected_bits = */ GLOBAL_MAX_ROWS_PER_COMPRESSION * 12); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wny 12
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typical value we observe for some data sets. I'll add a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Memory operations can add up to tens of percents of the total compression CPU load. To reduce the need for them, reserve for the expected array sizes when initializing the compressor.
Memory operations can add up to tens of percents of the total
compression CPU load. To reduce the need for them, reserve for the
expected array sizes when initializing the compressor.
Based on measurements in this issue: https://github.com/timescale/Support-Dev-Collab/issues/1498#issuecomment-1936607692
We don't have a dataset which reproduces it well in tsbench, but I think it's a safe change anyway: https://grafana.ops.savannah-dev.timescale.com/d/fasYic_4z/compare-akuzm?orgId=1&var-branch=All&var-run1=3238&var-run2=3239&var-threshold=0.02&var-use_historical_thresholds=true&var-threshold_expression=2.5%20%2A%20percentile_cont%280.90%29&var-exact_suite_version=true
Disable-check: force-changelog-file