Golden template
Freeze once. Instantiate N.
A golden is an artifact of an image, not of a machine. N copies restore from the same file and the kernel shares its pages.
kling save plantilla goldenkling run -from golden -name g1kling templateOutput
golden golden snapshot (80M of memory)instantiate with: kling run -from golden
a3f9... g1 instantiated from golden in 34 ms
NAME IMAGE CPU/MEM MEMORY DISK INSTANCES AGEgolden default 1/256MiB 80M 80M 10 21sDensity
Section titled “Density”| 10 from a golden | 10 cold | |
|---|---|---|
| Added RAM | +68 MiB | +824 MiB |
| Per machine | 6.8 MiB | 82 MiB |
| Time per machine | ~40 ms | ~2.6 s |
On a 4 GB host: 142 microVMs in 3.9 GB, and an explained refusal at number 143 instead of an OOM.
Save only when it is useful
Section titled “Save only when it is useful”kling save waits for the guest to answer before freezing (-wait, 60 s). A golden taken too early restores in 26 ms and then never answers.
By default it freezes with a warm child process: the golden does not pay the runtime’s startup (300-500 ms of node). -warm=false trades latency for disk.
In the repo: README: golden snapshots · docs/estabilidad.md