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

Rounds chunk bytes to kb in tsdb and includes benchmarking script #5479

Merged
merged 3 commits into from
Feb 25, 2022

Conversation

owen-d
Copy link
Member

@owen-d owen-d commented Feb 25, 2022

ref #5428. This gains us about ~5% space reduction over storing raw byte count.

Results:

benchmarks:

name                     old time/op    new time/op    delta
Query/match_ns-4           2.40µs ± 0%    2.42µs ± 0%   ~     (p=1.000 n=1+1)
Query/match_ns_regexp-4    2.42µs ± 0%    2.39µs ± 0%   ~     (p=1.000 n=1+1)

name                     old alloc/op   new alloc/op   delta
Query/match_ns-4            80.0B ± 0%     80.0B ± 0%   ~     (all equal)
Query/match_ns_regexp-4     80.0B ± 0%     80.0B ± 0%   ~     (all equal)

name                     old allocs/op  new allocs/op  delta
Query/match_ns-4             4.00 ± 0%      4.00 ± 0%   ~     (all equal)
Query/match_ns_regexp-4      4.00 ± 0%      4.00 ± 0%   ~     (all equal)

sizing:

-rw-r--r-- 1 owen users 40M Feb 25 10:47 /tmp/loki-scratch/loki-ops-tsdb
-rw-r--r-- 1 owen users 38M Feb 25 11:23 /tmp/loki-scratch/loki-ops-tsdb-experiment

@owen-d owen-d requested a review from a team as a code owner February 25, 2022 16:28
Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@owen-d owen-d merged commit 0a5e01b into grafana:main Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants