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

Optimize segmentwise recompression #7482

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

antekresic
Copy link
Contributor

@antekresic antekresic commented Nov 22, 2024

With the recent change to compression schema, we can optimize segmentwise recompression and target only batches which are affected to be recompressed or compress tuples which don't belong to any batch without any decompression. This means narrowing down the amount of that we need to decompress and recompress, ultimately speeding up the operation and generating less bloat in the compressed chunk.

Benchmark with improvements (2-3x in certain cases):
https://grafana.ops.savannah-dev.timescale.com/d/fasYic_4z/compare-akuzm?orgId=1&var-branch=All&var-run1=3959&var-run2=3960&var-threshold=0&var-use_historical_thresholds=true&var-threshold_expression=2.5%20%2A%20percentile_cont%280.90%29&var-exact_suite_version=false

@antekresic antekresic self-assigned this Nov 22, 2024
@erimatnor
Copy link
Contributor

Do we have benchmarks to confirm that this is faster?

@antekresic antekresic force-pushed the antekresic/optimize_recompression branch 3 times, most recently from 79b16f5 to a1b8376 Compare November 26, 2024 12:24
With the recent change to compression schema, we can optimize
segmentwise recompression and target only batches which are
affected to be recompressed or compress tuples which don't
belong to any batch without any decompression. This means
narrowing down the amount of that we need to decompress
and recompress, ultimately speeding up the operation and
generating less bloat in the compressed chunk.
@antekresic antekresic force-pushed the antekresic/optimize_recompression branch from a1b8376 to ae32773 Compare November 28, 2024 09:22
@antekresic antekresic marked this pull request as ready for review November 28, 2024 10:47
@antekresic antekresic added compression enhancement An enhancement to an existing feature for functionality labels Nov 28, 2024
@antekresic antekresic added this to the TimescaleDB 2.18.0 milestone Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compression enhancement An enhancement to an existing feature for functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants