Pod Memory Request Calculator
Estimate a pod's memory request from its baseline footprint plus per-connection memory overhead scaled by average concurrent connections.
Inputs
Idle memory footprint with zero active connections (runtime, buffers, caches).
Additional memory held per active connection (buffers, session state).
Typical number of simultaneously open connections per pod.
Recommended Memory Request
278MiB
Recommended Memory Request
0.27GiB
Connection-Driven Memory
150.0MiB
Share Driven by Connections
54.0%
Step by step
Connection memory = per-connection × avg connections
1.5MiB × 100
= 150.0MiB
Memory request = baseline + connection memory
128MiB + 150.0MiB
= 278.0MiB
How it works
Many network-facing services (proxies, API gateways, connection-pooling databases) have memory usage that scales with concurrency rather than staying flat. Modeling the request as a fixed baseline plus a per-connection cost captures that relationship far better than a single flat number, and makes it obvious how much headroom you need as traffic grows.
Formula
memoryRequest = baseline + (perConnectionMemory × avgConnections)
- B
- Baseline memory footprint in MiB (idle, zero connections)
- C_m
- Additional memory per active connection in MiB
- N
- Average concurrent connections
- M
- Recommended memory request in MiB
Frequently Asked Questions
How do I measure per-connection memory overhead?
Load-test the service at two different concurrency levels, record total memory usage at each, and divide the difference in memory by the difference in connection count to isolate the marginal per-connection cost.
Should I use average or peak connections for sizing requests?
Use average for the request (since it drives scheduling and bin-packing) and use peak connections when sizing the corresponding memory limit, to avoid OOMKills during connection spikes.
What if usage doesn't scale linearly with connections?
If memory grows faster than linearly (e.g. due to buffering or backpressure), model a higher effective per-connection value based on your peak-concurrency measurements rather than a light-load average.