Scaling
One 4-vCPU Metrics writer sustains 599,000 samples/s; a 2-vCPU writer sustains 406,000.
Sizing
| Writer | Plan each writer at |
|---|---|
| 2 vCPU, 6Gi | 300,000 samples/s |
| 4 vCPU, 6Gi | 450,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 vCPUyaml
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
| Writer | Validated | Knee | p99 | Mean CPU | Peak RSS |
|---|---|---|---|---|---|
| 2 vCPU / 8 GiB | 406,000, 10 MiB/s | 477,500 | 161 ms | 1.1 | 0.9 GiB |
| 4 vCPU / 12 GiB | 599,000, 14 MiB/s | 705,000 | 60 ms | 1.8 | 1.2 GiB |
| 6 vCPU / 16 GiB | 644,000, 15 MiB/s | 757,500 | 70 ms | 1.9 | 1.7 GiB |
- 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.