Costgraph is a tool that provides recommendations for the requests and limits of containers in a Kubernetes cluster. The recommendations are based on the historical utilisation of the resources in the cluster. The algorithm used by Costgraph is as follows:
Costgraph works by:
Fetching a maximum of 45 days metric data from Prometheus on resource utilisation with a 5-minute granularity.
Aggregating the fetch information by container and node, each metric is partitioned by namespace.
Filtering is done on the data retrieved to remove outliers and optimise the stable trend of the captured window.
We use the filtered data to generate recommendations for the requests and limits.
The generated recommendations are computed per container and node per each namespace the application runs.
Each recommendation is deployed to parquet and the resulting files are ingested into Postgres.
All pricing information on Costgraph is provided through OpenCost. The list of providers supported can be found on the OpenCost pageOnce the CPU and Memory values are computed, the values are multiplied by the per-hour CPU and Memory pricing to obtain the pricing results.