Victoria Metrics DB supports the option--selfScrapeInterval to collect metrics from the DB itself. Right now it will collect 598 values for each interval (v1.48.0). So the first question I ask myself is: do I really need all of them? Certainly not and thus the next question: How can I reduce, what gets actually collected? And finally: there are lot of metrics, which probably change its value never ever, or very rarely, e.g. once a year, only (like most of the 108 flag* values). Should I care about them? How many space gets really consumed in memory and on disk lets say per year with a scrape interval of 5s for such constant values?
VictoriaMetrics provides very efficient compression for time series with constant values - they are usually compressed by 1000 times and more according to rough estimations. Let's calculate how much storage space is needed for storing a constant time series with 5s scrape interval. Such a time series will contain 3600*24*365/5=6.3 millions of samples. Each uncompressed sample occupies 16 bytes - 8 bytes for timestamp in milliseconds and 8 bytes for floating-point value. This means that uncompressed time series would occupy 6.3M*16b=100Mb of storage space. The time series will occupy less than 100Kb of storage space after the compression.
As for reducing the number of stored time series, this can be done with relabeling. See this article for details on how to remove unneeded time series via relabeling.
Excellent. This helps a lot, especially when starting to get into touch/plan with vm{db,agent} (prometheus terms/configs).
Thanx a lot!