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

Thanos store failed to fetch old data #2158

Closed
satyabhama opened this issue Feb 20, 2020 · 9 comments
Closed

Thanos store failed to fetch old data #2158

satyabhama opened this issue Feb 20, 2020 · 9 comments
Labels

Comments

@satyabhama
Copy link

Thanos store component is continuously throwing below error when we are trying to fetch old data from S3 via Thanos query and stroe component
level=warn ts=2020-02-20T08:13:42.014710592Z caller=bucket.go:326 msg="loading block failed" id=01E0X0RPKQ45SC35Y34RSSMDVV err="new bucket block: load index cache: download index file: copy object to file: write =/thanos/store/01E0X0RPKQ45SC35Y34RSSMDVV/index: no space left on device"

Also we are not able to see old data even though it is present in s3.

@kakkoyun
Copy link
Member

Hey @satyabhama, As far as I can tell from your logs, you don't have enough space left on your disk where you run your thanos store, it couldn't download the index for the block. Could you please check that?

@satyabhama
Copy link
Author

Hey @kakkoyun We increased the memory according to this before only, now memory utilization is less than 75% still we are getting this error.

@bwplotka
Copy link
Member

It's not memory, it's disk space.

@kakkoyun
Copy link
Member

But from your logs, it seems like a disk issue

download index file: copy object to file: write =/thanos/store/01E0X0RPKQ45SC35Y34RSSMDVV/index: no space left on device"

This happens before building the index in-memory, so try checking the disk.

@satyabhama
Copy link
Author

Could you please help us to check disk space, where exactly we need to configure

@bwplotka
Copy link
Member

We don't have access to your machine. It's not something you can configure in Thanos. It will use the amount of disk which is needed by amount of your data.

In the next release, we have a new experimental feature called index-header which will use much less disk space.

@satyabhama
Copy link
Author

hey @bwplotka how much disk space is needed if 700 GB data is there in s3 bucket

@bwplotka
Copy link
Member

bwplotka commented Mar 2, 2020

It always depends on your cardinality, amount of blocks etc.

For https://github.com/thanos-io/thanos/releases/tag/v0.11.0-rc.1 and with:

#1952 Store Gateway: Implemented binary index header. This significantly reduces resource consumption (memory, CPU, net bandwidth) for startup and data loading processes as well as baseline memory. This means that adding more blocks into object storage, without querying them will use almost no resources. This, however, still means that querying large amounts of data will result in high spikes of memory and CPU use as before, due to simply fetching large amounts of metrics data. Since we fixed baseline, we are now focusing on query performance optimizations in separate initiatives. To enable experimental index-header mode run store with hidden experimental.enable-index-header flag.

Disk usage should be marginal, PLUS it does not need to be persistent. E.g. For each block, you have in the system with let's say 0.5-5GB index file, for a reasonable number of symbols and its length, and cardinality (e.g. million of series), I would expect like 100MB index-header file and that's it.

@stale
Copy link

stale bot commented Apr 1, 2020

This issue/PR has been automatically marked as stale because it has not had recent activity. Please comment on status otherwise the issue will be closed in a week. Thank you for your contributions.

@stale stale bot added the stale label Apr 1, 2020
@stale stale bot closed this as completed Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants