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

agent: make the global hash lookup table smaller #13262

Merged
merged 2 commits into from Dec 31, 2023

Conversation

bboreham
Copy link
Member

@bboreham bboreham commented Dec 7, 2023

This is the same change made in #13040, plus subsequent improvements, applied to agent-mode code.

Brought in some tests too, adapted for the different API.

Copy link
Member

@jesusvazquez jesusvazquez left a comment

Choose a reason for hiding this comment

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

This is looking good to me @bboreham I understand that running prombench wont yield any results here because this is agent code but I let you chose if you want to run it anyway.

Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

LGTM, have you benchmarked it somewhere? I bet you did, do you mind sharing screenshots for future reference? (:

@bboreham
Copy link
Member Author

I added a benchmark:

name            old time/op    new time/op    delta
CreateSeries-8     593ns ± 5%     526ns ± 5%  -11.20%  (p=0.002 n=6+6)

name            old alloc/op   new alloc/op   delta
CreateSeries-8      254B ± 1%      177B ± 6%  -30.19%  (p=0.004 n=5+6)

name            old allocs/op  new allocs/op  delta
CreateSeries-8      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.002 n=6+6)

@bboreham
Copy link
Member Author

Got a lint error from a file I didn't change, so rebased and force-pushed.

@bboreham
Copy link
Member Author

Lint error should be fixed by #13343

This is the same change made in prometheus#13040, plus subsequent improvements,
applied to agent-mode code.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Based on the one in tsdb/head_test.go.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
@bboreham bboreham merged commit 756202a into prometheus:main Dec 31, 2023
24 checks passed
@bboreham bboreham deleted the agent-serieshashmap branch December 31, 2023 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants