#!/usr/bin/env python3 """Where the minutes go when a new inference replica starts: a budget you can redo with your numbers. Every input is a flag. The defaults are the article's example: gpt-oss-120b on one B200 with vLLM, engine stages from NVIDIA Snapshot's published benchmark (vLLM 0.31.0, weights already on fast shared storage), image size from Docker Hub (vllm/vllm-openai:v0.33.0, amd64, compressed), pod start from LinkedIn's Firepool paper (image already on the node). Transfer rates are assumptions: change them to yours. python3 cold_start_budget.py python3 cold_start_budget.py --weights-gb 913 --engine-s 908 --restore-s 40 # DeepSeek-V4-Pro NVFP4, 8 GPUs """ import argparse def main(): ap = argparse.ArgumentParser() ap.add_argument("--pod-s", type=float, default=30, help="schedule + container start, image cached (Firepool: 20-35 s)") ap.add_argument("--image-gb", type=float, default=9.74, help="compressed image size") ap.add_argument("--registry-gbps", type=float, default=0.2, help="image pull rate, GB/s (pull + unpack)") ap.add_argument("--weights-gb", type=float, default=65.25) ap.add_argument("--hub-gbps", type=float, default=0.5, help="weights from the model hub, GB/s") ap.add_argument("--bucket-gbps", type=float, default=2.0, help="weights from an in-region bucket, GB/s") ap.add_argument("--engine-s", type=float, default=172.8, help="engine init with weights on fast storage (Snapshot: vLLM, gpt-oss-120b, B200)") ap.add_argument("--compile-s", type=float, default=88.47, help="of which compilation, autotuning and graph capture") ap.add_argument("--compile-saved-s", type=float, default=30, help="what a warm compile cache removes: the compile part only (capture and profiling stay); " "about a third of that phase, as measured on one GB10 (vLLM 0.33.0, init engine 93 -> 62 s)") ap.add_argument("--restore-s", type=float, default=10.09, help="Snapshot restore of the same engine") a = ap.parse_args() image = a.image_gb / a.registry_gbps hub = a.weights_gb / a.hub_gbps bucket = a.weights_gb / a.bucket_gbps rows = [ ("Nothing cached: pull image, weights from the hub, full init", a.pod_s + image + hub + a.engine_s), ("Image on the node, weights from an in-region bucket, full init", a.pod_s + bucket + a.engine_s), ("Image and weights on the node, full init (Snapshot's cold start)", a.pod_s + a.engine_s), ("... plus a warm compile cache (the compile part of init saved)", a.pod_s + a.engine_s - a.compile_saved_s), ("Restore from a snapshot (image on the node)", a.pod_s + a.restore_s), ("Warm pod already running: route to it", 0.0), ] print(f"image pull {image:5.0f} s | weights from hub {hub:5.0f} s, from bucket {bucket:5.0f} s | " f"engine init {a.engine_s:5.0f} s (compile + graphs {a.compile_s:.0f} s) | restore {a.restore_s:.0f} s") for label, s in rows: print(f"{s:7.0f} s {s / 60:5.1f} min {label}") if __name__ == "__main__": main()