Hi,
I have a question about how to efficiently organize metrics )))
Let's assume we have 1 system parameter - CPU usage, which can be supposed as user time, system time, idle time, etc... (10 values).
So here we can use 2 approaches to organize these values into metrics.
1) Use one metric, one label, and 10 unique values for this label. for example:
cpu_usage: mode=user;
cpu_usage: mode=system;
cpu_usage: mode=softirq;
and so on...
2) Use ten separate metrics, with no labels: cpu_usage_user, cpu_usage_system, cpu_usage_idle, etc...
The question is what approach is more cost-effective from prometheus point of view? Which way does take less space in TSDB and take less resources in expressions' calculations?
It seems to me, the first approach is more convenient when need to write expressions, because it simpler to write 'mode=~"user|system|something_else"', than sum separate metrics. But the second approach potentially doesn't consider storing extra labels (fix me if i wrong here), so theoretically we can avoid extra-JOINs in TSDB when calculating expressions.
Thanks