Verified Commit d18e4921 authored by anarcat's avatar anarcat
Browse files

fix calculations for long term prometheus metrics (team#40330)

For some reason, the math was off by quite a bit. I redid the math
using the formulas above the table and qalculate. I also added
examples for 1min scrape intervals, to compare with what we have.
parent 33490e6e
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -1008,19 +1008,21 @@ A few more samples calculations:
| Frequency | Retention period | Storage used |
|-----------|------------------|--------------|
|   5 second|           30 days|       100 GiB|
|  15 second|           30 days|        20 GiB|
|  15 second|            1 year|       240 GiB|
|      5 min|            1 year|        12 GiB|
|  15 second|           30 days|        33 GiB|
|  15 second|            1 year|       400 GiB|
|      1 min|            1 year|       100 GiB|
|      1 min|           10 year|      1000 GiB|
|      5 min|            1 year|        20 GiB|
|      5 min|            5 year|        60 GiB|
|      5 min|           10 year|       120 GiB|
|     15 min|            1 year|         4 GiB|
|     15 min|            5 year|        20 GiB|
|     15 min|           10 year|        40 GiB|
|     15 min|          100 year|       400 GiB|
|     1 hour|            1 year|         1 GiB|
|     1 hour|            5 year|         5 GiB|
|     1 hour|           10 year|        10 GiB|
|     1 hour|          100 year|       100 GiB|
|      5 min|           10 year|       100 GiB|
|     15 min|            1 year|         7 GiB|
|     15 min|            5 year|        33 GiB|
|     15 min|           10 year|        66 GiB|
|     15 min|          100 year|       662 GiB|
|     1 hour|            1 year|         2 GiB|
|     1 hour|            5 year|         8 GiB|
|     1 hour|           10 year|        17 GiB|
|     1 hour|          100 year|       167 GiB|

Another option would be to use another backend for prometheus metrics,
something like [TimescaleDB](https://www.timescale.com), see [this blog post](https://blog.timescale.com/blog/sql-nosql-data-storage-for-prometheus-devops-monitoring-postgresql-timescaledb-time-series-3cde27fd1e07/) for more