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

store: add chunk pooling #7771

Merged
merged 1 commit into from
Sep 23, 2024
Merged

store: add chunk pooling #7771

merged 1 commit into from
Sep 23, 2024

Conversation

GiedriusS
Copy link
Member

Pool byte slices inside of aggrchunks.

@GiedriusS GiedriusS force-pushed the chk_pooling branch 4 times, most recently from 04aa016 to ac23997 Compare September 23, 2024 06:15
Pool byte slices inside of aggrchunks.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
Comment on lines +141 to +145
var returnChunksSlicePool = sync.Pool{
New: func() interface{} {
r := make([]*storepb.AggrChunk, 0)
return &r
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can use the pool.BucketedPool and avoid casts down the road and the need to add a new explicit mutex?

Copy link
Member Author

@GiedriusS GiedriusS Sep 23, 2024

Choose a reason for hiding this comment

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

What min/max sizes and factor would you suggest? It's hard to make a judgment here :/

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, you got a point as well. Kinda hard to estimate average chunks touched by queries. Let's leave it like this then.

Copy link
Contributor

@pedro-stanaka pedro-stanaka left a comment

Choose a reason for hiding this comment

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

LG

@GiedriusS GiedriusS merged commit a2113fd into main Sep 23, 2024
22 checks passed
@GiedriusS GiedriusS deleted the chk_pooling branch September 23, 2024 07:39
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