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
Querier doesn't put back bytes in the reusable chunk pool #6038
Comments
Relevant PR I did for this a year ago: prometheus-junkyard/tsdb#427, I ended up concluding that it wasn't really worthwhile. I ran into some subtle bugs that can happen depending on where you try to put chunks back into the pool. Putting a chunk back during close is only slightly helpful since all the intermediate chunks would not be put back. |
From a quick search, I found only these 2 places which calls Line 801 in 5ecef35
Line 928 in 5ecef35
And the chunk pool is passed on by the |
Stumbled upon this while working on head chunks on disk - this would apply to Head as well once we have that work upstream. I'll be attempting to put back into the pool during iteration. |
@codesome Is this still relevant? |
Yes. Chunks are only taken out of pool for queries on the blocks. Same is the case with mmapping chunks now. I attempted fixing it but it was very tricky. I haven't attempted further after that. |
Still relevant, hence reopening |
closing for no activity |
The chunk dir reader uses a pool but never puts anything back to the pool
prometheus/tsdb/chunks/chunks.go
Line 469 in 5ecef35
I think putting back should happen in the Close method
prometheus/tsdb/chunks/chunks.go
Lines 436 to 438 in 5ecef35
cc @codesome this might be interesting to you since you did some memory optimizations recently 😺
The text was updated successfully, but these errors were encountered: