Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 ability to limit max num of samples / concurrent queries #798
store: add ability to limit max num of samples / concurrent queries #798
Changes from 43 commits
1bc1f59
e87f763
1ab1dc6
d7c3ade
12db24a
9d0b8a7
9727072
d9c733a
c4ce735
30eef19
194394d
2e51c2e
58a14fa
4d1b7ed
3ae3733
b149f74
e79c56d
1d07515
38a093b
7b13f7e
4540394
3e532fe
cff979c
e7ea64b
23c7368
da575e4
e390846
24e8e1f
4012eca
e7be55d
3e8150d
5ec5ce9
810a131
541f180
ae8e425
de8a234
07b4658
61d6ecd
70b115d
36f1153
9b74bbe
82bdb3c
4d8420f
590b9a6
3f40bac
f4734e5
d6c1534
1147acd
1d0fad3
ef4a51e
48141fd
c9a7d83
d71f1d8
280a8ca
11c4b18
31a8346
6e98dfd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets do a phased rollout of this ... can we have 0 mean off ... that way we can phase rollout to people by ensuring we warn them that we will be setting a sensible default and they should ensure their system can deal with it or set it explicitly for their needs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, perhaps most users won't want this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe align the flags with how prom has flags?
grpc-sample-limit
>{query|store|storage}.grpc.read-sample-limit
?See
storage.remote.read-sample-limit
https://github.com/prometheus/prometheus/blob/master/cmd/prometheus/main.go#L206There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above
grpc-concurrent-limit
>query.grpc.max-concurrency
?See
query.max-concurrency
https://github.com/prometheus/prometheus/blob/master/cmd/prometheus/main.go#L233There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will rename to
store.grpc.max-concurrency
as we are talking about Thanos Store here :PThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused. You say it cannot be bigger than 120 but default is 50000000 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It means that the upper-bound of samples per chunk is 120. Maybe we should move this part into parentheses in the former sentence:
NOTE: efficiency we take 120 as the number of samples in a chunk (it cannot be bigger than that), so the actual number of samples might be lower, even though maximum could be hit.
Would it be clearer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone could tell that's too verbose, but I actually like this 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 someone will definitely start wondering why 120 is here just like I have at the beginning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think this is fine 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prometheus' team use
prometheus_engine_queries_concurrent_max
. Naming is hard but I figure we could be consistent with them ?https://github.com/prometheus/prometheus/blob/8155cc49924cd48ec552506b4e5519ebafa8b722/promql/engine.go#L234-L239
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Should rename this to
thanos_bucket_store_queries_concurrent_max
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Samples limiter which
>samplesLimiter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could perhaps move this to the top along with
maxSamplesPerChunk
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No necessarily as it only is used here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
queries_in_flight
>thanos_store_queries_in_flight_total
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gate_seconds
>thanos_store_gate_duration_seconds
?