<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Runai-Streamer on lo0 — Tech Blog</title><link>https://blog.lo0.es/en/tags/runai-streamer/</link><description>Recent content in Runai-Streamer on lo0 — Tech Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Sun, 07 Jun 2026 08:30:00 +0200</lastBuildDate><atom:link href="https://blog.lo0.es/en/tags/runai-streamer/index.xml" rel="self" type="application/rss+xml"/><item><title>The pantry lift: from disk to HBM, or why the kitchen opens late</title><link>https://blog.lo0.es/en/posts/pantry-lift-from-disk-to-hbm-why-the-kitchen-opens-late/</link><pubDate>Sun, 07 Jun 2026 08:30:00 +0200</pubDate><guid>https://blog.lo0.es/en/posts/pantry-lift-from-disk-to-hbm-why-the-kitchen-opens-late/</guid><description>&lt;blockquote>
&lt;p>This is a trip down to the basement. The &lt;a href="https://blog.lo0.es/en/posts/nvlink-nvswitch-nccl-cable-every-token-crosses/">under the engine&lt;/a> series optimised the &lt;strong>hot path&lt;/strong>, what happens with every token once you are already serving. This post looks at the journey that comes &lt;strong>before&lt;/strong> serving: how the weights climb from disk to HBM. It is the first of a pair on the two things that happen outside the API and that almost nobody times: &lt;strong>model loading&lt;/strong> (this one) and &lt;a href="https://blog.lo0.es/en/posts/sms-cuda-streams-cuda-graphs-inference/">execution on the silicon&lt;/a> (the next one).&lt;/p>
&lt;/blockquote>
&lt;h2 id="tldr">TL;DR&lt;/h2>
&lt;p>Before an inference pod generates its first token, it has to &lt;strong>push the whole model into HBM&lt;/strong>. A Llama-70B in FP16 is &lt;strong>140 GB&lt;/strong> travelling along a path nobody draws: &lt;strong>disk → page cache → host buffer → PCIe → HBM&lt;/strong>. Intuition fails here: HBM is not the bottleneck, it moves 3.35 TB/s and swallows 140 GB in &lt;strong>42 ms&lt;/strong>; the bottleneck is the &lt;strong>supply chain&lt;/strong>. The Gen5 NVMe disk reads at ~14 GB/s (10 s for 140 GB); PCIe Gen5 copies host→GPU at ~50 GB/s (2.8 s); and the &lt;strong>default safetensors loader&lt;/strong>, which deserialises tensor by tensor and bounces every byte through a CPU buffer, inflates all of that up to &lt;strong>30-60 s&lt;/strong>. That time is the &lt;strong>cold start&lt;/strong>, and it is the hidden tax paid by &lt;a href="https://blog.lo0.es/en/posts/llm-inference-autoscaling-kubernetes-hpa-keda/">autoscaling&lt;/a> (scale-from-zero), by &lt;a href="https://blog.lo0.es/en/posts/canary-blue-green-shadow-llm-models/">canary/blue-green&lt;/a> and by &lt;a href="https://blog.lo0.es/en/posts/disaggregated-serving-prefill-decode-specialised-pods/">disaggregated serving&lt;/a> every time a pod is born. There are three families of solution, &lt;strong>GPUDirect Storage&lt;/strong> (direct DMA disk→HBM, no bounce through the CPU), &lt;strong>fastsafetensors&lt;/strong> (4.8-7.5× over the default loader) and the &lt;strong>Run:ai Model Streamer&lt;/strong> (concurrent reads that saturate the disk), plus the simplest lever of all: &lt;strong>move fewer bytes&lt;/strong> (FP8 is half of FP16). This post explains the path, the maths, the 10 knobs, and the cruellest trap: &lt;em>&amp;ldquo;the second time it loaded fast&amp;rdquo;&lt;/em> is not your loader being good, it is the &lt;strong>page cache&lt;/strong> lying to you. On the generic 4×H100 SXM cluster.&lt;/p>
&lt;h2 id="where-you-are-the-basement-before-opening">Where you are: the basement, before opening&lt;/h2>
&lt;div class="diagram" style="max-width:560px;margin:1.2rem auto;">
&lt;svg viewBox="0 0 560 340" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="The loading path: from disk to HBM, before the hot path of the token">
&lt;text x="280" y="24" text-anchor="middle" font-family="sans-serif" font-size="13" font-weight="700" fill="currentColor">The loading path · before the first token&lt;/text>
&lt;rect x="120" y="40" width="320" height="40" rx="6" fill="currentColor" fill-opacity="0.05" stroke="#888" stroke-width="1.3"/>
&lt;text x="280" y="65" text-anchor="middle" font-family="sans-serif" font-size="12" fill="currentColor">HBM · 80 GB, 3.35 TB/s — the destination, never the bottleneck&lt;/text>
&lt;rect x="120" y="86" width="320" height="40" rx="6" fill="currentColor" fill-opacity="0.05" stroke="#888" stroke-width="1.3"/>
&lt;text x="280" y="111" text-anchor="middle" font-family="sans-serif" font-size="12" fill="currentColor">PCIe Gen5 x16 · ~50 GB/s host→GPU (H2D)&lt;/text>
&lt;rect x="120" y="132" width="320" height="58" rx="6" fill="#dceede" stroke="#3c8c54" stroke-width="3"/>
&lt;text x="280" y="156" text-anchor="middle" font-family="sans-serif" font-size="12.5" font-weight="700" fill="#1f5c34">YOU ARE HERE · loader + page cache + host buffer&lt;/text>
&lt;text x="280" y="174" text-anchor="middle" font-family="sans-serif" font-size="10.5" fill="#2c6b42">deserialise, bounce through CPU or direct DMA (GDS)&lt;/text>
&lt;rect x="120" y="196" width="320" height="40" rx="6" fill="#eef3fb" stroke="#4a6fa5" stroke-width="1.4"/>
&lt;text x="280" y="221" text-anchor="middle" font-family="sans-serif" font-size="12" fill="currentColor">NVMe Gen5 · ~14 GB/s per disk — the origin&lt;/text>
&lt;rect x="120" y="248" width="320" height="40" rx="6" fill="currentColor" fill-opacity="0.05" stroke="#888" stroke-width="1.3"/>
&lt;text x="280" y="273" text-anchor="middle" font-family="sans-serif" font-size="12" fill="currentColor">Network / Ceph RGW · shared weights (slower still)&lt;/text>
&lt;text x="280" y="312" text-anchor="middle" font-family="sans-serif" font-size="11" fill="currentColor" opacity="0.75">The hot path of the token lives above; this post opens up what is below&lt;/text>
&lt;text x="280" y="330" text-anchor="middle" font-family="sans-serif" font-size="11" fill="currentColor" opacity="0.75">the journey that decides whether the kitchen opens in 10 s or in 60 s&lt;/text>
&lt;/svg>
&lt;/div>
&lt;h2 id="the-analogy-the-pantry-lift">The analogy: the pantry lift&lt;/h2>
&lt;p>Let us stay in the restaurant of the series. The &lt;a href="https://blog.lo0.es/en/posts/nvlink-nvswitch-nccl-cable-every-token-crosses/">shared table&lt;/a> was the NVSwitch, the &lt;a href="https://blog.lo0.es/en/posts/numa-hugepages-cpu-isolation-gpu-waits-kernel/">floor next door&lt;/a> was NUMA, the &lt;a href="https://blog.lo0.es/en/posts/cpu-memory-topology-manager-rke2/">maître&lt;/a> was the kubelet. All of that describes the restaurant &lt;strong>running&lt;/strong>, with diners seated. But there is a moment no post looked at: &lt;strong>before opening&lt;/strong>, somebody has to bring the entire pantry up from the basement store to the kitchen.&lt;/p>
&lt;p>The model weights are the ingredients. They live in the &lt;strong>basement store&lt;/strong> (the disk). The kitchen, the &lt;strong>hot line&lt;/strong> where tokens are plated, is the GPU&amp;rsquo;s HBM. And between one and the other there is a &lt;strong>service lift&lt;/strong>: the path disk → host → PCIe → HBM. The kitchen cannot serve the first dish until the pantry is upstairs and in place. That restocking time is the &lt;strong>cold start&lt;/strong>.&lt;/p>
&lt;p>The intuition trap: the kitchen (HBM) is enormous and blazingly fast, it places ingredients at 3.35 TB/s. So we blame the kitchen when the restaurant opens late. But the kitchen is standing idle &lt;strong>waiting for the lift&lt;/strong>. The bottleneck is never the hot line: it is the &lt;strong>lift and the store&lt;/strong>. And worse still, there is a porter (the default loader) who, instead of carrying whole crates, &lt;strong>takes the ingredients out one by one, writes each one down in a notebook and packs them again&lt;/strong> before sending them up. That porter, not the lift, is half the problem.&lt;/p>
&lt;h2 id="the-mechanism-what-really-happens-when-a-model-loads">The mechanism: what really happens when a model loads&lt;/h2>
&lt;p>When vLLM starts up with a model in &lt;code>safetensors&lt;/code>, the 140 GB of the Llama-70B FP16 make this journey:&lt;/p>
&lt;ol>
&lt;li>&lt;strong>Disk → page cache.&lt;/strong> The kernel reads the &lt;code>.safetensors&lt;/code> files from NVMe into the &lt;strong>page cache&lt;/strong> (host RAM). If this is the first time after a reboot, it is a physical read from disk (~14 GB/s on Gen5). If the files are already in page cache from an earlier start-up, this is almost free, and here is where the trap we will see is born.&lt;/li>
&lt;li>&lt;strong>Deserialise.&lt;/strong> The default Hugging Face loader &lt;code>mmap&lt;/code>s the file and builds the tensors &lt;strong>one by one&lt;/strong>, copying them into a CPU tensor before moving them. This is single-threaded CPU work that saturates neither the disk nor PCIe: most of the &amp;ldquo;slow&amp;rdquo; loading time goes here, not on moving bytes.&lt;/li>
&lt;li>&lt;strong>Host → HBM (H2D).&lt;/strong> Each tensor is copied from the host buffer into HBM over &lt;strong>PCIe Gen5 x16&lt;/strong> (~50 GB/s in practice). For the DMA to be efficient, the host buffer should be &lt;strong>pinned&lt;/strong>, which connects directly with the &lt;a href="https://blog.lo0.es/en/posts/numa-hugepages-cpu-isolation-gpu-waits-kernel/">hugepages and pinned memory&lt;/a> of the NUMA post.&lt;/li>
&lt;li>&lt;strong>Place in HBM.&lt;/strong> HBM receives the 140 GB. At 3.35 TB/s, &lt;strong>this takes 42 ms&lt;/strong>. It is never the bottleneck.&lt;/li>
&lt;/ol>
&lt;p>The path has a &lt;strong>shortcut&lt;/strong>: &lt;strong>GPUDirect Storage (GDS)&lt;/strong>. Instead of bouncing through the CPU buffer (steps 2-3), a DMA engine close to the NVMe controller writes &lt;strong>straight from disk to HBM&lt;/strong>, without involving the CPU. It is the same principle as the &lt;a href="https://blog.lo0.es/en/posts/network-numa-cilium-ebpf-dranet-fourth-leg-pinning/">GPUDirect RDMA of the network&lt;/a>: get the CPU out of the way. &lt;code>fastsafetensors&lt;/code> uses GDS and reaches &lt;strong>26.4 GB/s&lt;/strong> reading a Llama-70B from NVMe across 4 GPUs.&lt;/p>
&lt;div class="diagram" style="max-width:680px;margin:1.4rem auto;">
&lt;svg viewBox="0 0 680 250" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Two paths: default loader bouncing through the CPU vs direct GPUDirect Storage">
&lt;text x="340" y="22" text-anchor="middle" font-family="sans-serif" font-size="13" font-weight="700" fill="currentColor">Two paths from disk to HBM&lt;/text>
&lt;text x="170" y="48" text-anchor="middle" font-family="sans-serif" font-size="11.5" font-weight="600" fill="#c1121f">Default: bounce through the CPU&lt;/text>
&lt;rect x="60" y="60" width="90" height="40" rx="5" fill="#eef3fb" stroke="#4a6fa5" stroke-width="1.3"/>
&lt;text x="105" y="84" text-anchor="middle" font-family="sans-serif" font-size="11" fill="currentColor">NVMe&lt;/text>
&lt;rect x="190" y="60" width="90" height="40" rx="5" fill="currentColor" fill-opacity="0.06" stroke="#888" stroke-width="1.3"/>
&lt;text x="235" y="78" text-anchor="middle" font-family="sans-serif" font-size="10.5" fill="currentColor">CPU buffer&lt;/text>
&lt;text x="235" y="92" text-anchor="middle" font-family="sans-serif" font-size="9" fill="currentColor" opacity="0.7">+ deserialise&lt;/text>
&lt;line x1="150" y1="80" x2="188" y2="80" stroke="#c1121f" stroke-width="2" marker-end="url(#dha)"/>
&lt;defs>&lt;marker id="dha" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="#c1121f"/>&lt;/marker>&lt;/defs>
&lt;rect x="320" y="60" width="90" height="40" rx="5" fill="#dceede" stroke="#3c8c54" stroke-width="1.5"/>
&lt;text x="365" y="84" text-anchor="middle" font-family="sans-serif" font-size="11" fill="#1f5c34">HBM&lt;/text>
&lt;line x1="280" y1="80" x2="318" y2="80" stroke="#c1121f" stroke-width="2" marker-end="url(#dha)"/>
&lt;text x="235" y="120" text-anchor="middle" font-family="sans-serif" font-size="9.5" fill="currentColor" opacity="0.7">the CPU touches every byte · single-threaded · slow&lt;/text>
&lt;text x="170" y="168" text-anchor="middle" font-family="sans-serif" font-size="11.5" font-weight="600" fill="#2a9d8f">GPUDirect Storage: direct DMA&lt;/text>
&lt;rect x="60" y="180" width="90" height="40" rx="5" fill="#eef3fb" stroke="#4a6fa5" stroke-width="1.3"/>
&lt;text x="105" y="204" text-anchor="middle" font-family="sans-serif" font-size="11" fill="currentColor">NVMe&lt;/text>
&lt;rect x="320" y="180" width="90" height="40" rx="5" fill="#dceede" stroke="#3c8c54" stroke-width="1.5"/>
&lt;text x="365" y="204" text-anchor="middle" font-family="sans-serif" font-size="11" fill="#1f5c34">HBM&lt;/text>
&lt;path d="M150,200 C230,200 240,200 318,200" stroke="#2a9d8f" stroke-width="2.4" fill="none" marker-end="url(#dhb)"/>
&lt;defs>&lt;marker id="dhb" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto">&lt;path d="M0,0 L10,5 L0,10 z" fill="#2a9d8f"/>&lt;/marker>&lt;/defs>
&lt;text x="235" y="240" text-anchor="middle" font-family="sans-serif" font-size="9.5" fill="currentColor" opacity="0.7">the CPU never touches the data · ~26 GB/s NVMe→HBM&lt;/text>
&lt;line x1="470" y1="55" x2="470" y2="240" stroke="currentColor" stroke-width="1" opacity="0.25"/>
&lt;text x="575" y="90" text-anchor="middle" font-family="sans-serif" font-size="10.5" font-weight="600" fill="currentColor">140 GB FP16&lt;/text>
&lt;text x="575" y="112" text-anchor="middle" font-family="sans-serif" font-size="10" fill="currentColor" opacity="0.8">HBM: 42 ms&lt;/text>
&lt;text x="575" y="130" text-anchor="middle" font-family="sans-serif" font-size="10" fill="currentColor" opacity="0.8">PCIe: 2.8 s&lt;/text>
&lt;text x="575" y="148" text-anchor="middle" font-family="sans-serif" font-size="10" fill="currentColor" opacity="0.8">NVMe: 10 s&lt;/text>
&lt;text x="575" y="170" text-anchor="middle" font-family="sans-serif" font-size="10" fill="#c1121f" opacity="0.9">default: 30-60 s&lt;/text>
&lt;/svg>
&lt;/div>
&lt;h2 id="why-the-problem-exists-the-economics-of-bytes">Why the problem exists: the economics of bytes&lt;/h2>
&lt;p>The size of the model in bytes is decided by quantisation, and that sets the floor of the cold start, because &lt;strong>all&lt;/strong> those bytes have to move before the first token. For a 70B parameter model:&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Format&lt;/th>
&lt;th>Bytes/param&lt;/th>
&lt;th>Size 70B&lt;/th>
&lt;th>Read 1 NVMe @14 GB/s&lt;/th>
&lt;th>H2D PCIe @50 GB/s&lt;/th>
&lt;th>HBM @3.35 TB/s&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>FP16 / BF16&lt;/td>
&lt;td>2&lt;/td>
&lt;td>140 GB&lt;/td>
&lt;td>10.0 s&lt;/td>
&lt;td>2.8 s&lt;/td>
&lt;td>42 ms&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>FP8&lt;/td>
&lt;td>1&lt;/td>
&lt;td>70 GB&lt;/td>
&lt;td>5.0 s&lt;/td>
&lt;td>1.4 s&lt;/td>
&lt;td>21 ms&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>INT4 (GPTQ/AWQ)&lt;/td>
&lt;td>0.5&lt;/td>
&lt;td>~35 GB&lt;/td>
&lt;td>2.5 s&lt;/td>
&lt;td>0.7 s&lt;/td>
&lt;td>10 ms&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>Three readings of this table:&lt;/p>
&lt;p>&lt;strong>HBM never shows up as a problem.&lt;/strong> The last column is always milliseconds. Anyone saying &amp;ldquo;the GPU is slow to load&amp;rdquo; is blaming the wrong place.&lt;/p>
&lt;p>&lt;strong>Quantising is the most underrated cold start lever.&lt;/strong> Going from FP16 to FP8 does not only double inference throughput (less HBM bandwidth per token, as we saw in &lt;a href="https://blog.lo0.es/en/posts/quantization-llm-inference-fp8-int4-gguf/">quantization&lt;/a>): &lt;strong>it also halves the cold start&lt;/strong>, because there are half as many bytes to push up. It is a two-for-one that sizing usually ignores.&lt;/p>
&lt;p>&lt;strong>The disk is the bottleneck on bytes; the loader is the bottleneck on time.&lt;/strong> The figures in the table are the &lt;strong>theoretical floor&lt;/strong>, just moving bytes. The default loader adds single-threaded deserialisation on top, which is the difference between the theoretical 10 s and the real 30-60 s. That is why the solutions attack on two fronts: &lt;strong>fewer bytes&lt;/strong> (quantisation) and &lt;strong>a better porter&lt;/strong> (concurrent loaders / GDS).&lt;/p>
&lt;h2 id="the-maths-that-matter-cold-start-as-a-tax-on-autoscaling">The maths that matter: cold start as a tax on autoscaling&lt;/h2>
&lt;p>Cold start is not paid once. It is paid &lt;strong>every time a pod is born&lt;/strong>. And on an elastic platform, pods are born continuously.&lt;/p>
&lt;p>Take an &lt;a href="https://blog.lo0.es/en/posts/llm-inference-autoscaling-kubernetes-hpa-keda/">autoscaling setup with KEDA&lt;/a> that scales from 2 to 6 replicas when the queue grows. The 4 new replicas take this long to be ready:&lt;/p>
$$ T_{\text{ready}} = T_{\text{schedule}} + T_{\text{pull-image}} + T_{\text{load-weights}} + T_{\text{cuda-graphs}} $$
&lt;p>With a Llama-70B FP16 and the default loader, $T_{\text{load-weights}}$ dominates: it can be &lt;strong>40 s&lt;/strong> of the ~60 s total. During those 40 s, the queue that triggered the autoscaling &lt;strong>keeps growing&lt;/strong>, since the new replicas absorb no traffic until they have loaded. The real number in the formula is not &amp;ldquo;how many replicas&amp;rdquo;, it is &lt;strong>how long each one takes to start serving&lt;/strong>, and that number is written by the loading path.&lt;/p>
&lt;p>This has a harsh operational consequence: &lt;strong>scale-to-zero is unworkable for workloads with a latency SLO if the cold start is 40 s.&lt;/strong> Nobody waits 40 s for the first token. The real elasticity of an inference platform is not limited by GPU availability, it is limited by &lt;strong>how long that GPU takes to have the model inside it&lt;/strong>. Bringing the cold start down from 40 s to 8 s (with streamer + FP8) is what turns &amp;ldquo;theoretical scale-to-zero&amp;rdquo; into &amp;ldquo;usable scale-to-zero&amp;rdquo;.&lt;/p>
&lt;p>The published numbers give the order of magnitude of the improvement: &lt;code>fastsafetensors&lt;/code> cuts start-up from &lt;strong>12.39 s to 4.74 s&lt;/strong> on a Llama-2-13B over 4×L40S, and from &lt;strong>16.04 s to 6.88 s&lt;/strong> on 1×A100, &lt;strong>4.8-7.5×&lt;/strong> over the default deserialiser. The &lt;strong>Run:ai Model Streamer&lt;/strong> loads in &lt;strong>4.88 s from S3 at concurrency 32&lt;/strong> and &lt;strong>7.53 s from SSD IO2 at concurrency 8&lt;/strong>; integrated into vLLM, total time to &lt;em>ready&lt;/em> drops to ~23 s from S3. There is no magic here: it is &lt;strong>getting the CPU out of the loop&lt;/strong> (GDS) and &lt;strong>reading in parallel&lt;/strong> (concurrency) to saturate the disk instead of leaving it half idle while one thread deserialises.&lt;/p>
&lt;h2 id="the-10-knobs-worth-touching">The 10 knobs worth touching&lt;/h2>
&lt;h3 id="knob-1--measure-where-the-time-goes-read-vs-deserialise-vs-h2d">Knob 1 — Measure where the time goes (read vs deserialise vs H2D)&lt;/h3>
&lt;p>Before touching anything: time it. Is the time going on reading from disk, on deserialising, or on the H2D? &lt;code>iostat -x 1&lt;/code> during the load tells you whether the NVMe is saturated (disk bottleneck) or nearly idle (loader/CPU bottleneck). If the disk is at 20%, the problem is &lt;strong>not&lt;/strong> the disk: it is the porter. Changing disk would fix nothing; changing loader would.&lt;/p>
&lt;h3 id="knob-2----load-format-choosing-the-porter">Knob 2 — &lt;code>--load-format&lt;/code>: choosing the porter&lt;/h3>
&lt;p>vLLM exposes several loaders via &lt;code>--load-format&lt;/code>: &lt;code>safetensors&lt;/code> (default), &lt;code>runai_streamer&lt;/code>, &lt;code>fastsafetensors&lt;/code>, &lt;code>tensorizer&lt;/code>. The default is the slowest. Changing one flag can be the cheapest 4-7× there is.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># Run:ai Model Streamer (concurrent reads, saturates the disk)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">vllm serve meta-llama/Llama-3.1-70B --load-format runai_streamer
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="c1"># fastsafetensors (GPUDirect Storage, direct DMA disk→HBM)&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">vllm serve meta-llama/Llama-3.1-70B --load-format fastsafetensors
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="knob-3--streamer-concurrency">Knob 3 — Streamer concurrency&lt;/h3>
&lt;p>The Run:ai Model Streamer splits the read across N threads according to the size of each tensor in order to saturate the storage bandwidth. Concurrency is the key parameter: &lt;strong>16 is usually enough for local NVMe; 32 (sometimes 64)&lt;/strong> for high-throughput network storage. One thread does not saturate a Gen5 NVMe; 32 do.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-bash" data-lang="bash">&lt;span class="line">&lt;span class="cl">vllm serve &amp;lt;model&amp;gt; --load-format runai_streamer &lt;span class="se">\
&lt;/span>&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="se">&lt;/span> --model-loader-extra-config &lt;span class="s1">&amp;#39;{&amp;#34;concurrency&amp;#34;: 32}&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="knob-4--gpudirect-storage-gds--fastsafetensors">Knob 4 — GPUDirect Storage (GDS) + fastsafetensors&lt;/h3>
&lt;p>If there is an &lt;code>nvidia-fs&lt;/code> driver, a supported filesystem and local NVMe, GDS writes straight disk→HBM with no bounce through the CPU. It is the difference between the two paths in the diagram. &lt;strong>But&lt;/strong>: it requires the stack to be in place, and it only wins if the bottleneck is the CPU bounce, not the disk itself. Check with &lt;code>gdscheck&lt;/code>.&lt;/p>
&lt;h3 id="knob-5--local-nvme-for-the-weights-not-network">Knob 5 — Local NVMe for the weights, not network&lt;/h3>
&lt;p>Serving the weights from Ceph RGW / NFS is convenient (one shared place) but it puts the &lt;strong>network&lt;/strong> into the loading path. For cold start, &lt;strong>weights on the node&amp;rsquo;s local NVMe&lt;/strong> (or a local cache). Network storage is for the model repository; the inference node should have a hot local copy.&lt;/p>
&lt;h3 id="knob-6--pre-pull--local-model-cache">Knob 6 — Pre-pull / local model cache&lt;/h3>
&lt;p>An &lt;code>initContainer&lt;/code> that downloads the model onto a &lt;code>local&lt;/code> or &lt;code>hostPath&lt;/code> NVMe volume before starting vLLM turns a cold start &amp;ldquo;from the network&amp;rdquo; into one &amp;ldquo;from local NVMe&amp;rdquo;. Combined with a per-node cache DaemonSet, new pods on an already warm node read from local disk, not from the network.&lt;/p>
&lt;h3 id="knob-7--quantisation-move-fewer-bytes">Knob 7 — Quantisation: move fewer bytes&lt;/h3>
&lt;p>Weights already in FP8 or INT4 on disk = half or a quarter of the cold start. It is the knob from the table above. And it composes with all the others: FP8 + streamer + GDS is multiplicative.&lt;/p>
&lt;h3 id="knob-8--parallel-loading-across-gpus-vllm-v1">Knob 8 — Parallel loading across GPUs (vLLM V1)&lt;/h3>
&lt;p>vLLM&amp;rsquo;s V1 engine (the default since 0.19) loads the weight shards &lt;strong>in parallel&lt;/strong> across the GPUs of a TP group, instead of sequentially. At TP=4, each GPU loads its quarter at the same time. Check it is active; in old versions loading was serial and the cold start of TP=4 was almost 4× that of TP=1.&lt;/p>
&lt;h3 id="knob-9--numa-locality-of-the-nvme">Knob 9 — NUMA locality of the NVMe&lt;/h3>
&lt;p>The NVMe hangs off a &lt;strong>PCIe root under a specific socket&lt;/strong>, exactly the same NUMA map as the &lt;a href="https://blog.lo0.es/en/posts/numa-hugepages-cpu-isolation-gpu-waits-kernel/">host post&lt;/a>. If the load&amp;rsquo;s host buffer lands on the wrong socket, the H2D crosses the UPI. The fifth list to align, alongside &lt;code>isolcpus&lt;/code>, &lt;code>reserved-cpus&lt;/code> and the NIC IRQs: &lt;strong>which socket is local to the NVMe and to the destination GPU&lt;/strong>. &lt;code>nvidia-smi topo -m&lt;/code> shows it.&lt;/p>
&lt;h3 id="knob-10--do-not-pay-the-cold-start-keep-pods-warm">Knob 10 — Do not pay the cold start: keep pods warm&lt;/h3>
&lt;p>Sometimes the answer is not to load faster, but &lt;strong>not to unload&lt;/strong>. A floor of always-live replicas (no scale-to-zero), or a pool of preloaded warm standbys, swaps &amp;ldquo;wait 40 s&amp;rdquo; for &amp;ldquo;0 s&amp;rdquo;. It is the cost of idle GPU in exchange for start-up latency: a &lt;a href="https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/">capacity planning&lt;/a> decision, not a technical one.&lt;/p>
&lt;h3 id="summary-table">Summary table&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>#&lt;/th>
&lt;th>Knob&lt;/th>
&lt;th>What it attacks&lt;/th>
&lt;th>Risk / cost&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>1&lt;/td>
&lt;td>&lt;code>iostat&lt;/code> while loading&lt;/td>
&lt;td>knowing whether the bottleneck is disk or loader&lt;/td>
&lt;td>none; always do it first&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>2&lt;/td>
&lt;td>&lt;code>--load-format&lt;/code>&lt;/td>
&lt;td>single-threaded deserialisation&lt;/td>
&lt;td>format compatibility&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>3&lt;/td>
&lt;td>streamer concurrency&lt;/td>
&lt;td>underused disk&lt;/td>
&lt;td>host RAM for buffers&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>4&lt;/td>
&lt;td>GPUDirect Storage&lt;/td>
&lt;td>bounce through the CPU&lt;/td>
&lt;td>requires nvidia-fs + supported FS&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>5&lt;/td>
&lt;td>local NVMe vs network&lt;/td>
&lt;td>the network in the path&lt;/td>
&lt;td>duplicating weights per node&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>6&lt;/td>
&lt;td>pre-pull / node cache&lt;/td>
&lt;td>network on every start-up&lt;/td>
&lt;td>local disk space&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>7&lt;/td>
&lt;td>FP8/INT4 quantisation&lt;/td>
&lt;td>bytes to move&lt;/td>
&lt;td>quality (measure, do not assume)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>8&lt;/td>
&lt;td>V1 parallel loading&lt;/td>
&lt;td>serial loading across GPUs&lt;/td>
&lt;td>none if V1 is active&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>9&lt;/td>
&lt;td>NUMA of the NVMe&lt;/td>
&lt;td>H2D crossing the UPI&lt;/td>
&lt;td>align with the rest of the NUMA lists&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>10&lt;/td>
&lt;td>warm pods / no zero&lt;/td>
&lt;td>the whole cold start&lt;/td>
&lt;td>idle GPU paid for&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h2 id="how-it-connects-with-the-rest-of-the-stack">How it connects with the rest of the stack&lt;/h2>
&lt;p>&lt;strong>With autoscaling.&lt;/strong> The whole of &lt;a href="https://blog.lo0.es/en/posts/llm-inference-autoscaling-kubernetes-hpa-keda/">scale-from-zero with KEDA&lt;/a> rests on this: real elasticity is limited by the cold start, not by GPU availability. An autoscaler with 40 s of loading reacts late to every peak.&lt;/p>
&lt;p>&lt;strong>With disaggregated serving.&lt;/strong> In &lt;a href="https://blog.lo0.es/en/posts/disaggregated-serving-prefill-decode-specialised-pods/">disaggregated prefill/decode&lt;/a>, bringing up a decode pool on demand pays the cold start of loading the model into each new pod. The elasticity of the pattern depends on how fast those pods start.&lt;/p>
&lt;p>&lt;strong>With canary/blue-green.&lt;/strong> Every &lt;a href="https://blog.lo0.es/en/posts/canary-blue-green-shadow-llm-models/">canary deployment&lt;/a> loads a new version of the model alongside the old one. The validation time of a canary includes its cold start; large models make deployments slower and more expensive.&lt;/p>
&lt;p>&lt;strong>With NUMA and hugepages.&lt;/strong> The load&amp;rsquo;s host buffer wants to be &lt;strong>pinned&lt;/strong> and &lt;strong>NUMA-local&lt;/strong>, the same thing the &lt;a href="https://blog.lo0.es/en/posts/numa-hugepages-cpu-isolation-gpu-waits-kernel/">host post&lt;/a> asked for on the hot path. The loading path is another client of the same NUMA map.&lt;/p>
&lt;p>&lt;strong>With quantisation.&lt;/strong> &lt;a href="https://blog.lo0.es/en/posts/quantization-llm-inference-fp8-int4-gguf/">FP8/INT4&lt;/a> is not only inference throughput: it is the direct lever on the bytes of the cold start.&lt;/p>
&lt;p>&lt;strong>With capacity planning.&lt;/strong> &lt;a href="https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/">Sizing&lt;/a> that ignores cold start underestimates how many replicas are needed to absorb a peak: if they take 40 s to start, you need a bigger permanent cushion.&lt;/p>
&lt;h2 id="traps-and-things-that-are-not-what-they-seem">Traps and things that are not what they seem&lt;/h2>
&lt;p>&lt;strong>&amp;ldquo;The second time it loaded really fast.&amp;rdquo;&lt;/strong> This is the star trap. The first load filled the &lt;strong>page cache&lt;/strong> (host RAM); the second reads from RAM, not from disk, and flies. But in production pods are ephemeral and are born on different nodes: the start-up that counts is the &lt;strong>cold&lt;/strong> one, on a node where those files are not in page cache. Benchmarking the second load is measuring a situation that almost never happens at the moment that matters (the peak that triggers the autoscaler).&lt;/p>
&lt;p>&lt;strong>&amp;ldquo;GDS always speeds things up.&amp;rdquo;&lt;/strong> No. GDS removes the bounce through the CPU; if your bottleneck is the disk itself (saturated NVMe) or the deserialisation, GDS does not touch that part. Measure first (knob 1). It also demands &lt;code>nvidia-fs&lt;/code>, a supported filesystem, and sometimes it does not work over whatever network storage you have.&lt;/p>
&lt;p>&lt;strong>&amp;ldquo;mmap makes loading instant.&amp;rdquo;&lt;/strong> &lt;code>mmap&lt;/code> maps the file but &lt;strong>reads nothing yet&lt;/strong>: the cost is deferred to the first access to each page. The time does not disappear, it moves, and the &lt;strong>first token&lt;/strong> pays the page faults that start-up did not. You have moved the cold start into the latency of the first request, which is probably a worse place to have it.&lt;/p>
&lt;p>&lt;strong>Weights on network storage &amp;ldquo;because it is cleaner&amp;rdquo;.&lt;/strong> Sharing a model repository on Ceph RGW is fine for storing them; serving the cold start from there puts the network (and its latency and its contention) into the critical path. Local NVMe cache on the inference node.&lt;/p>
&lt;p>&lt;strong>Loading FP16 and quantising at start-up.&lt;/strong> Quantising on the fly during loading (for example FP16→FP8 on the GPU) can be &lt;strong>slower&lt;/strong> than having the weights already quantised on disk: you move twice the bytes and on top of that you do conversion work. If you are going to serve in FP8, store the weights in FP8.&lt;/p>
&lt;p>&lt;strong>Optimising the load and ignoring &lt;code>T_cuda-graphs&lt;/code>.&lt;/strong> Bringing weight loading down to 8 s and forgetting that CUDA graph capture adds several more seconds leaves the cold start half done. That second half of start-up is the subject of the &lt;a href="https://blog.lo0.es/en/posts/sms-cuda-streams-cuda-graphs-inference/">next post&lt;/a>.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>The whole series optimised what happens &lt;strong>with every token&lt;/strong>: the cable, the host, the network, the silicon. But before the first token there is a journey almost nobody times and that decides whether an inference pod opens in 10 s or in 60 s: pushing the model from disk to HBM. Intuition blames the GPU, and the GPU is innocent: HBM swallows 140 GB in 42 ms. The bottleneck is the &lt;strong>supply chain&lt;/strong>: a disk reading at 14 GB/s, a PCIe copying at 50, and above all a default loader that deserialises tensor by tensor with a single thread and turns 10 s of bytes into 60 s of waiting. The solutions attack the two right fronts, &lt;strong>fewer bytes&lt;/strong> (quantisation) and &lt;strong>better transport&lt;/strong> (GDS, concurrent streamers, local NVMe), and give 4-7× almost for free. And above the technique, an idea that reorders the priorities: on an elastic platform, cold start &lt;strong>is not a start-up detail, it is the ceiling on elasticity&lt;/strong>. The fastest GPU in the world does not scale if it takes 40 s to have the model inside. The pantry lift, the one nobody timed, is what decides what time the kitchen really opens.&lt;/p>
&lt;h2 id="see-also">See also&lt;/h2>
&lt;ul>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/speeding-up-model-cold-start-minutes-to-seconds/">Speeding up model cold start: from minutes to seconds&lt;/a> — the runbook that attacks each of the five line items of start-up.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/serving-several-models-single-gpu-co-residency-swapping-sleep-mode/">Serving several models on a single GPU: co-residency, model-swapping and sleep mode&lt;/a> — sleep mode dodges this cold start by parking the weights in RAM instead of on disk.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/pcie-topology-gpudirect-p2p-acs-security-guard/">The corridors and the guard: PCIe, GPUDirect P2P and ACS&lt;/a> — the bus GDS uses to push the weights up from NVMe; ACS enabled throttles that direct path just as it throttles P2P between GPUs.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/vllm-scheduler-step-maitre-d-each-round/">The pass: vLLM&amp;rsquo;s scheduler step&lt;/a> — cold start is the ceiling on the elasticity the scheduler exercises: preemption and scale-from-zero pay this load in every new pod.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/nvlink-nvswitch-nccl-cable-every-token-crosses/">The shared table: NVLink, NVSwitch and NCCL&lt;/a> — the first of &amp;ldquo;under the engine&amp;rdquo;; this post goes down to the basement that series took for granted as full.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/numa-hugepages-cpu-isolation-gpu-waits-kernel/">The floor next door: NUMA, hugepages and CPU isolation&lt;/a> — the pinned, NUMA-local memory the loading path needs for an efficient H2D.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/network-numa-cilium-ebpf-dranet-fourth-leg-pinning/">The kitchen door: network NUMA, Cilium eBPF and DRANET&lt;/a> — the same &amp;ldquo;get the CPU out of the way&amp;rdquo; principle (GPUDirect) that GDS applies here to the disk.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/sms-cuda-streams-cuda-graphs-inference/">SM, CUDA streams and CUDA graphs&lt;/a> — the second half of the cold start (graph capture) and what happens on the silicon once the weights are inside.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/quantization-llm-inference-fp8-int4-gguf/">Quantization for inference&lt;/a> — the lever that halves the bytes of the cold start, not just HBM bandwidth per token.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/llm-inference-autoscaling-kubernetes-hpa-keda/">LLM autoscaling on Kubernetes with KEDA&lt;/a> — why cold start is the real ceiling on elasticity and kills scale-to-zero.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/disaggregated-serving-prefill-decode-specialised-pods/">Disaggregated serving: prefill and decode separated&lt;/a> — bringing up pools on demand pays the cold start in every new pod.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/canary-blue-green-shadow-llm-models/">Canary, blue-green and shadow for models&lt;/a> — the validation time of a canary includes its model loading.&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;a href="https://blog.lo0.es/en/posts/capacity-planning-on-premise-llm-inference/">Capacity planning for on-premise inference&lt;/a> — cold start as a parameter of the replica cushion and of the warm-vs-zero decision.&lt;/p>
&lt;/li>
&lt;/ul>
&lt;h2 id="references">References&lt;/h2>
&lt;ul>
&lt;li>NVIDIA, &lt;em>Reducing Cold Start Latency for LLM Inference with NVIDIA Run:ai Model Streamer&lt;/em>: &lt;a href="https://developer.nvidia.com/blog/reducing-cold-start-latency-for-llm-inference-with-nvidia-runai-model-streamer/">https://developer.nvidia.com/blog/reducing-cold-start-latency-for-llm-inference-with-nvidia-runai-model-streamer/&lt;/a>.&lt;/li>
&lt;li>vLLM, &lt;em>Loading models with Run:ai Model Streamer&lt;/em>: &lt;a href="https://docs.vllm.ai/en/stable/models/extensions/runai_model_streamer/">https://docs.vllm.ai/en/stable/models/extensions/runai_model_streamer/&lt;/a>.&lt;/li>
&lt;li>vLLM, &lt;em>Loading model weights with fastsafetensors&lt;/em>: &lt;a href="https://docs.vllm.ai/en/stable/models/extensions/fastsafetensor/">https://docs.vllm.ai/en/stable/models/extensions/fastsafetensor/&lt;/a>.&lt;/li>
&lt;li>foundation-model-stack, &lt;em>fastsafetensors&lt;/em> (high-performance loader, GDS): &lt;a href="https://github.com/foundation-model-stack/fastsafetensors">https://github.com/foundation-model-stack/fastsafetensors&lt;/a>.&lt;/li>
&lt;li>&lt;em>Speeding up Model Loading with fastsafetensors&lt;/em> (arXiv 2505.23072): &lt;a href="https://arxiv.org/html/2505.23072v1">https://arxiv.org/html/2505.23072v1&lt;/a>.&lt;/li>
&lt;li>NVIDIA, &lt;em>GPUDirect Storage: A Direct Path Between Storage and GPU Memory&lt;/em>: &lt;a href="https://developer.nvidia.com/blog/gpudirect-storage/">https://developer.nvidia.com/blog/gpudirect-storage/&lt;/a>.&lt;/li>
&lt;li>NVIDIA, &lt;em>Magnum IO GPUDirect Storage&lt;/em> (benchmarking and configuration): &lt;a href="https://developer.nvidia.com/gpudirect-storage">https://developer.nvidia.com/gpudirect-storage&lt;/a>.&lt;/li>
&lt;/ul></description></item></channel></rss>