Skip to main content
Engineering utilities
KBY Engineering Utilities

Kubernetes Resource & Runtime Profiler

Generate conservative Node.js, Go, or Java runtime starting policies for a supplied Kubernetes CPU and memory limit, with explicit caveats.

Accuracy contract: The flags follow documented runtime controls, but the headroom percentages are explicit starting heuristics that require workload measurement.

Inputs

Defined calculation contract

Exact output

Calculation result

2 cores
Container CPU Limit
2048 MiB
Container Memory Limit
Node.js (V8)
Runtime
2
Planning thread ceiling
1433 MiB
Runtime memory ceiling
615 MiB
Process headroom

Starting configuration

These conservative runtime policies leave headroom inside the container limit; they do not guarantee that the whole process will remain below the cgroup limit.

NODE_OPTIONS="--max-old-space-size=1433"No universal CPU flag — tune worker pools from measurements
Memory policy
70% V8 old-space ceiling / 30% process headroom
CPU policy
2 CPU is a cgroup time quota; 2 is only the nearest whole-thread planning ceiling.
  • max-old-space-size limits V8 old space, not total Node.js process memory.
  • UV_THREADPOOL_SIZE depends on blocking I/O and native work, not CPU limit alone.

Deterministic v2026.08.1 — Principal · 4 min