Optimizing and Debugging Prometheus
Even as we scale Prometheus out to multiple replicas and possibly even shards, there will still be performance issues that we need to know how to identify and address. Consequently, this chapter will focus on how we can go about optimizing Prometheus to make the most of the resources it has and how to debug issues when they arise.
In this chapter, we’re going to cover the following main topics:
- Controlling cardinality
- Recording rules
- Scrape jitter
- Using pprof
- Query logging
- Tuning garbage collection
Let’s get started!