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

Improve composing index-header by pulling only required pieces of index. #1711

Closed
bwplotka opened this issue Nov 4, 2019 · 2 comments · Fixed by #1952
Closed

Improve composing index-header by pulling only required pieces of index. #1711

bwplotka opened this issue Nov 4, 2019 · 2 comments · Fixed by #1952

Comments

@bwplotka
Copy link
Member

bwplotka commented Nov 4, 2019

Orthogonal to sparse file proposal we may need to explore composing index-cache/index-header from parts of the index.

We do not compose the block only when:

  • No index-cache.json is in the local filesystem
  • No index-cache.json is in object storage.

Currently, we create index-cache by mmaping whole index file which might cause excessive resource usage, especially if we syncronize many blocks at the same time without locally cached objects.

The proposal is to do pull pieces of the index. To do so we need TOC which is at the end of the file as well as other pieces. This might mean changes in object store API: https://github.com/thanos-io/thanos/pull/1567/files#diff-c4e16588aa4d5a179f37f9a55308eb7eR245

If the process will be quick enough to do per request, we might move out of startup towards request time for this, improving startup time.

@bwplotka bwplotka changed the title Improve composing index-header by pulling only pieces of index. Improve composing index-header by pulling only required pieces of index. Nov 10, 2019
@bwplotka
Copy link
Member Author

bwplotka commented Dec 2, 2019

This is well suitable to be designed and done together with: #942

@stale
Copy link

stale bot commented Jan 11, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 11, 2020
@stale stale bot closed this as completed Jan 18, 2020
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.

1 participant