linkerd / linkerd/linkerd2

Evaluate Prometheus resource usage

Open
#2,980 12 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/telemetry pinned
Dominant language
Go
Stars
11.5k
Forks
1.4k
Avg merge
3d 22h
Merged PRs (30d)
53

Description

Background

In #2922 a user reported a linkerd-prometheus pod using 30GB mem and 10GB ephemeral storage. Many factors contribute to Prometheus' resource usage, including:

  • total time series (prometheus_tsdb_head_series == ~500k == ~300 linkerd proxies x ~1700 metrics/proxy)
  • scrape_interval: 10s
  • --storage.tsdb.retention.time=6h
  • read load (via linkerd dashboard and Grafana)

Current state

Replicating the above set up with Prometheus v2.10.0 decreased steady state memory usage from 10GB -> 5GB, and high read-load from 12GB -> 8GB, this change will ship in #2979.

Proposal

Evaluate Prometheus resource usage, the goal being one or more of these outcomes:

  1. Linkerd default install changes
    • upgrade to Prometheus 2.11 when WAL compression lands
    • decrease set of metrics exported from proxy (or drop during collection)
    • optimize reads from linkerd dashboard and Grafana (via recording rules and/or fewer queries per page)
    • modify storage.tsdb.retention.time
    • modify storage.tsdb.retention.size
    • modify scrape interval
    • ephemeral storage limits
  2. Linkerd user tunable settings (via linkerd install)
    • storage.tsdb.retention.time
    • storage.tsdb.retention.size
    • scrape interval
    • ephermal storage limits
  3. Document to the user how best to manage resource usage. This could involve modifying the linkerd-prometheus installation to use persistent volumes, etc. (https://github.com/linkerd/linkerd2/issues/2922#issuecomment-504113048)

/cc @jamesallen-vol @suever @complex64 (thanks for the user reports!)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Prometheus resource factors and the proposed Linkerd install settings, including retention, scrape interval, and ephemeral storage. Examine the linkerd dashboard and Grafana read load described in the issue. Done means producing a concrete default change, user-tunable setting, or resource-management guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
grafana, kubernetes, prometheus
Domain
observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.