What label cardinality is considered "high"?

787 views
Skip to first unread message

gma...@outbrain.com

unread,
Jan 24, 2017, 11:02:13 PM1/24/17
to Prometheus Users
Hello everyone,

I can't seem to get a clear answer, or even an assessment, to the question of how many label values is too high?
The docs state:
Do not use labels to store dimensions with high cardinality (many different label values)

Does anyone here know if there's a magic number? Or maybe it's just a guideline to not use a set of values that's unbound by size?

Thanks

Brian Brazil

unread,
Jan 25, 2017, 3:58:01 AM1/25/17
to gma...@outbrain.com, Prometheus Users
I'd generally advise to have no more than a handful of metrics with a cardinality above 10, as once it's above 10 it's only going to grow over time. Hundreds to thousands is definitely high.

Brian
 

Thanks

The above terms reflect a potential business arrangement, are provided solely as a basis for further discussion, and are not intended to be and do not constitute a legally binding obligation. No legally binding obligations will be created, implied, or inferred until an agreement in final form is executed in writing by all parties involved.

This email and any attachments hereto may be confidential or privileged.  If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. Thanks.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/493713a4-eb2a-4953-82b7-7cfeb26ef28e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

gma...@outbrain.com

unread,
Jan 25, 2017, 4:00:12 AM1/25/17
to Prometheus Users, gma...@outbrain.com
Thanks


On Wednesday, January 25, 2017 at 10:58:01 AM UTC+2, Brian Brazil wrote:
On 25 January 2017 at 04:02, <gma...@outbrain.com> wrote:
Hello everyone,

I can't seem to get a clear answer, or even an assessment, to the question of how many label values is too high?
The docs state:
Do not use labels to store dimensions with high cardinality (many different label values)

Does anyone here know if there's a magic number? Or maybe it's just a guideline to not use a set of values that's unbound by size?

I'd generally advise to have no more than a handful of metrics with a cardinality above 10, as once it's above 10 it's only going to grow over time. Hundreds to thousands is definitely high.

Brian
 

Thanks

The above terms reflect a potential business arrangement, are provided solely as a basis for further discussion, and are not intended to be and do not constitute a legally binding obligation. No legally binding obligations will be created, implied, or inferred until an agreement in final form is executed in writing by all parties involved.

This email and any attachments hereto may be confidential or privileged.  If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person. Thanks.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To post to this group, send email to promethe...@googlegroups.com.



--

gma...@outbrain.com

unread,
Jan 25, 2017, 5:44:36 AM1/25/17
to Prometheus Users, gma...@outbrain.com
I'm having more thoughts on this...

Could you please elaborate on what exactly will be problematic when the label cardinality will be too high?
Also - is the cardinality calculated per metric or generally in the system?
Meaning - if I have two metrics with the same label, will the cardinality for the label be a sum of the number of values of both metrics?

Thanks again...

fli...@outbrain.com

unread,
Jan 25, 2017, 10:33:01 AM1/25/17
to Prometheus Users, gma...@outbrain.com
Hi,

From our experience and thinking saying that 100 label values is a high number means Prometheus cant be used in an environments that have more then a 100 servers / services ? i don't think thats the case.

As a guide line it makes sense so things remain under control but in reality numbers are way higher. 

Just to be clear were using Prometheus heavily with great success on a very large number of services and we have use cases with label values in the hundreds.

Thx

Brian Brazil

unread,
Jan 25, 2017, 10:34:45 AM1/25/17
to Gil Fliker, Prometheus Users, gma...@outbrain.com
On 25 January 2017 at 15:33, <fli...@outbrain.com> wrote:
Hi,

From our experience and thinking saying that 100 label values is a high number means Prometheus cant be used in an environments that have more then a 100 servers / services ? i don't think thats the case.

The general presumption is that you're multiplying this number by 1k servers, as someone out there probably will have that many.

Brian
 
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/f66eabd8-dd80-4846-9b1e-4438daba6804%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages