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-gateway: merged series from different blocks concurrently #4596

Closed
dimitarvdimitrov opened this issue Mar 27, 2023 · 1 comment · Fixed by #7456
Closed

store-gateway: merged series from different blocks concurrently #4596

dimitarvdimitrov opened this issue Mar 27, 2023 · 1 comment · Fixed by #7456
Assignees

Comments

@dimitarvdimitrov
Copy link
Contributor

dimitarvdimitrov commented Mar 27, 2023

Before series streaming was introduced the work for fetching series was done concurrently for all the blocks in the requests. After the changes in #3355 the series of each block are merged serially in mergedSeriesChunkRefsSet. The merged set checks each of its two items one after the other by calling ensureItemAvailableToRead for each (code). In reality ensureItemAvailableToRead may involve fetching the series from the bucket and/or the cache and can block for considerable amount of time.

This may become a problem for requests that query more than 2-3 blocks. Below is a tempo trace to visualize the delay that serially merging series can introduce. In this particular request the initial 16 preloadSeries could have happened concurrently.
Screenshot 2023-02-01 at 13 14 15

@ying-jeanne ying-jeanne self-assigned this Apr 6, 2023
@ying-jeanne ying-jeanne removed their assignment Jun 6, 2023
@wilfriedroset
Copy link
Collaborator

We might have encountered something similar with mimir 2.11.
We can see something similar in our traces where mimir's store-gateway lookup in the indexes from the object storage sequentially while querying the ckunks in parallel. In fact the store-gateway could lookup in parallel within the same index but the index list is processed in parallel. After discussing with @dimitarvdimitrov this could be related to this issue.
Capture d’écran 2024-02-07 à 15 30 15

See: https://grafana.slack.com/archives/C039863E8P7/p1707316840756999

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants