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

How to calculate disk resource will consume #2146

Closed
wangweihong opened this Issue Nov 2, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@wangweihong
Copy link

wangweihong commented Nov 2, 2016

For example , I scrape a target every 5 second and store data in a 40GB disk. I want to calculate how long will it spend to consume all my disk resource. What should I do?

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Nov 2, 2016

That also depends on the amount of samples you have per scrape. And on the compressibility of your sample data. Typical production data takes 3 to 4 bytes per sample on disk, plus some baseline space for the indices. You could also configure varbit encoding, see https://prometheus.io/blog/2016/05/08/when-to-use-varbit-chunks/ , which might compress down to 1.3 bytes/sample (at the price of query performance).

@wangweihong

This comment has been minimized.

Copy link
Author

wangweihong commented Nov 3, 2016

@beorn7 Thanks for your reply. I'm new to prometheus and don't know where to get the amount of samples. I set up prometheus to monitor itself and try to find some infos of sample , but I don't know what its metrics mean. Can you please tell me where to get the amount of samples and the docs about promethus's metrics?

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Nov 3, 2016

If you go to the /metrics endpoint of a prometheus server, you see all the metrics with doc strings.
The metric you are looking for is prometheus_local_storage_ingested_samples_total.

@elluvium

This comment has been minimized.

Copy link

elluvium commented Oct 29, 2018

I'm using openshift/prometheus:v2.2.1 image with local target and there is no such metric prometheus_local_storage_ingested_samples_total. What I'm doing wrong?

@beorn7

This comment has been minimized.

Copy link
Member

beorn7 commented Oct 29, 2018

You are using Prometheus 2.x, which is very different from Prometheus 1.x. Remember, this ticket was closed 2 years ago. I guess now you would use prometheus_tsdb_head_samples_appended_total.

It makes more sense to ask questions like this on the prometheus-users mailing list rather than in a GitHub issue. (A closed GitHub issue is even less suited.) On the mailing list, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.

@elluvium

This comment has been minimized.

Copy link

elluvium commented Oct 29, 2018

Ok, got it. Much appreciate for your answer even on closed ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.