-
Notifications
You must be signed in to change notification settings - Fork 524
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-gateway: wait for query gate after loading blocks #5507
store-gateway: wait for query gate after loading blocks #5507
Conversation
A surge in lazy loading index headers can saturate the query concurrency limit and effectively block any other queries from even starting. This was evident in a recent similar incident where the request rate on the full query path was impacted by store-gateways lazy-loading blocks. Below are screenshots of request rate, latency, lazy loading latency and query gate latency reported by store-gateways. We already have a concurrency gate for lazy loading index headers added by Heather, which prevents from overloading the disk. If we decouple the query gate and the header loading gate, queries that require loading many index headers will be waiting on a separate gate and not impact queries which are querying already loaded blocks. #### Note to reviewers This is a draft PR because I suspect it will conflict with the changes in stream-store, so I will rebase it after merging that PR first. Signed-off-by: Dimitar Dimitrov <[email protected]>
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.
Makes sense to me 👍
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.
looks good to me!
Signed-off-by: Dimitar Dimitrov <[email protected]>
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.
Makes a lot of sense
A surge in lazy loading index headers can saturate the query concurrency limit and effectively block any other queries from even starting. This was evident in a recent similar incident where the request rate on the full query path was impacted by store-gateways lazy-loading blocks. During the time between 00:00 and 00:30 99.2% of queries were issues for the last 12 hours only.
Below are screenshots of request rate, latency, lazy loading latency and query gate latency reported by store-gateways.
We already have a concurrency gate for lazy loading index headers added by @heatheryuan , which prevents from overloading the disk. If we decouple the query gate and the header loading gate, queries that require loading many index headers will be waiting on a separate gate and not impact queries which are querying already loaded blocks.
Notes to reviewers
if
because the query gate is either a noop gate or a real gate, but never nil.