Scaling

One 4-vCPU Metrics writer sustains 599,000 samples/s; a 2-vCPU writer sustains 406,000.

Sizing

WriterPlan each writer at
2 vCPU, 6Gi300,000 samples/s
4 vCPU, 6Gi450,000 samples/s
text
writers = ceil(peak samples/s / 599,000 / 0.75)   # 4 vCPU
writers = ceil(peak samples/s / 406,000 / 0.75)   # 2 vCPU
yaml
spec:
  writer:
    replicas: 2
    resources:
      requests: { cpu: "4", memory: 6Gi }
      limits: { cpu: "4", memory: 6Gi }
  • Each writer owns one shard. Add writers, not cores: 6 vCPU sustains only 7% more than 4.
  • Set requests equal to limits. Memory must be at least 6 GiB; peak RSS in the test was 1.7 GiB at 500,000 series.
  • Scale out on 429s or memory above 65% of the limit, not CPU.

Measured capacity

Fig. — One Metrics writer by CPU limit
2 vCPU406,000 samples/s
knee 477,500
4 vCPU599,000 samples/s
knee 705,000
6 vCPU644,000 samples/s
knee 757,500
WriterValidatedKneep99Mean CPUPeak RSS
2 vCPU / 8 GiB406,000, 10 MiB/s477,500161 ms1.10.9 GiB
4 vCPU / 12 GiB599,000, 14 MiB/s705,00060 ms1.81.2 GiB
6 vCPU / 16 GiB644,000, 15 MiB/s757,50070 ms1.91.7 GiB
Solid: validated rate. Hatched: knee. Release v0.3.29.
  • Workload: Snappy remote-write, 5,000 samples per request, 500,000 stable series, about 25 bytes per sample. High series churn lowers these rates.
  • Environment: m8i.2xlarge, us-east-2, S3 Standard, 64 concurrent connections.
  • Validated: 10-minute soak with under 0.1% of requests rejected and p99 under 1 s.
  • Knee: the highest rate in a 15-minute ramp with under 2% of requests rejected and p99 under 1 s.

Runner · method