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: Document --chunk-pool-size better #2057

Merged
merged 1 commit into from
Feb 6, 2020
Merged

Conversation

daixiang0
Copy link
Member

Signed-off-by: Xiang Dai [email protected]
Fix #2042

Copy link
Member

@squat squat left a comment

Choose a reason for hiding this comment

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

Hmm this change makes the comment more confusing IMO

@daixiang0
Copy link
Member Author

@squat how about Maximum size of concurrently allocatable bytes for chunks in memory, not cache.?

@daixiang0 daixiang0 requested a review from squat January 29, 2020 08:29
@GiedriusS
Copy link
Member

@squat how about Maximum size of concurrently allocatable bytes for chunks in memory, not cache.?

Not sure about the , not cache. part because I can imagine there will be a question about what kind of cache are we exactly talking about but otherwise sounds good. It seems to me like the goal here is to put emphasis on the fact that we are talking about the memory in general. Let's see what @squat and others think.

@squat
Copy link
Member

squat commented Jan 29, 2020

I agree with @GiedriusS 👍

@daixiang0
Copy link
Member Author

I think it means some fixed memory during thanos running, not the cache memory.

@bwplotka
Copy link
Member

That's the problem @daixiang0. It's not a fixed memory. It does not allocate that much as you put, it's only use a maximum of configured memory for reusable bytes pool. And if it will go beyond that for chunks it will fail the request. In theory. In practice, I really could not see our:

// ErrPoolExhausted is returned if a pool cannot provide the request bytes.
var ErrPoolExhausted = errors.New("pool exhausted")

But that's another story (:

@daixiang0
Copy link
Member Author

@bwplotka does it mean that memory leak or the speed of system clean cache memory is faster than thanos consumes?

@bwplotka
Copy link
Member

No, it means opposite: garbage collection (cleaning) is slower than our allocations, even though we don't need some memory. That's why we pool memory.

@daixiang0 daixiang0 requested review from bwplotka, FUSAKLA and squat and removed request for bwplotka and squat February 3, 2020 05:06
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.

Thank you! LGTM 👍

@bwplotka bwplotka merged commit a79edc7 into thanos-io:master Feb 6, 2020
@daixiang0 daixiang0 deleted the pool branch February 7, 2020 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store: Document --chunk-pool-size better
4 participants