In the first three parts I set up two RTX 3090s for my coding agents and put a small proxy in front of vLLM. It works. The problem is it works all day, and most of the day nobody asks it anything.
With the model loaded and nobody connected, the two cards draw 42.5 W together. That’s fine. The rest of the box isn’t: a Threadripper, 128 GB of RAM, disks and fans. I don’t have a meter on the wall socket, so I can only estimate the whole box at about 150 W idle. That’s 3.6 kWh a day for a box that mostly waits.
So I turned it off when I didn’t need it. But it’s a desktop board, no IPMI, so there’s no power button I can press over the network like on a real server. Well, I made one. A GL.iNet Comet KVM gives me the screen and keyboard, and a Fingerbot, a little robot finger stuck on the case, presses the real power button when I click it. A poor man’s IPMI :)
It works, but that’s reactive. Before I open a chat or start an agent, I click, the robot presses, and I wait. From the power button to the first answer that was 4 minutes 23 seconds. Every time. I’d rather the first request wake it, not me.
So I thought, OK, two pieces:
- Something small and always on that takes the request, wakes the rig, and puts it back to sleep when nobody uses it.
- A rig that goes from off to answering as fast as possible, because now that wait sits inside somebody’s request.
This post is mostly the second piece: a 50-line trick I’d now use on any box, and a custom OS that in the end made 0.42 seconds of difference. Recipe at the end.
Disclaimer: I dictated this post and directed every test. AI did the grunt work: code, data and drafts.
Where do 4 minutes 23 seconds go?
First, how I timed it, so you can do the same on your box. The clock runs on another machine. It starts when I press power (or send the magic packet), waits for vLLM’s health check, and stops when a tiny chat request gets its answer. Something like this:
wakeonlan AA:BB:CC:DD:EE:FF # or press the power button
time { until curl -sf http://rig:8000/health; do sleep 0.2; done
curl -s http://rig:8000/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"model":"my-model","messages":[{"role":"user","content":"17 * 23?"}]}'; }
To see where the time goes, ask the box itself. systemd-analyze splits the
boot into firmware, bootloader, kernel and services, and the timestamps in
vLLM’s log (docker logs --timestamps) cover the rest. One cold boot, with 18.8
GiB of weights to load:
| Step | Seconds |
|---|---|
| Firmware | 23.86 |
| Bootloader | 4.48 |
| Kernel | 5.89 |
| Ubuntu services | 14.59 |
| vLLM starting up | 43.2 |
| Reading the weights | 139.78 |
| vLLM getting ready | 26.9 |
| Warmup and proxy | about 2.6 |
More than half of it was reading the model. The weights were on a 5,400 RPM hard disk doing about 142 MB/s. Right next to it sat an NVMe doing 2,000 MB/s. doh!
Off the spinning disk
I moved the weights to the NVMe. First answer: 130.02 s instead of 263.0 s. One change, 133 seconds less. It was the first thing I tried, and nothing later came close.
Read the weights while vLLM starts up
With the weights on NVMe, vLLM still starts in two steps, one after the other. First about 43 seconds of starting Python, PyTorch and the GPUs, where the CPU is busy and the disk does nothing. Only then it reads the weights, and now the GPUs wait for the disk. The obvious fix: read the weights during those 43 seconds.
What didn’t work
The fancy way is to skip RAM and send the weights straight from the NVMe to the
GPUs. NVIDIA calls that GPUDirect Storage, and fastsafetensors, one of vLLM’s
loaders, uses it when it can. On my rig it can’t. NVIDIA’s own check says:
NVMe P2PDMA : Unsupported
NVMe : Unsupported
properties.use_compat_mode : true
The kernel module it needs isn’t there, and NVIDIA supports it only on data center and workstation cards, not GeForce. So the data goes through RAM anyway. And even a direct path would be stuck at the NVMe’s 2,000 MB/s, while from RAM the whole model loads in 1.52 s.
I still tried the two loaders vLLM ships for faster loading.
fastsafetensors
reads the weight files in big parallel chunks and copies them to the GPU, and
Model Streamer
(runai_streamer) reads many tensors at once and hands them to the GPU while it
reads the rest. fastsafetensors ran out of GPU memory: my weights come as one
18.19 GiB file, and it tried to put all of it on one card that already held half
the model. The streamer exited early, and I didn’t dig, because the next idea
worked.
The trick
The idea that worked is much older than all of these, and it’s my favourite
part of this whole project. Linux keeps file data it has read in free RAM, the
page cache, and the next read of the same file comes from RAM, not the disk.
So a small script starts at the same moment as vLLM, reads the weights file
with four threads and throws the data away. It’s basically
cat model.safetensors > /dev/null, only faster. It read 18.8 GiB in 5.53 s,
long before vLLM asked for the weights, so vLLM got them from RAM:
| vLLM reading the weights | vLLM start to ready | |
|---|---|---|
| Without the script | 6.80 s | about 81 s |
| With the script | 1.52 s | 72.59 s |
No change to vLLM, no special loader, it works with any model, and it’s about 50 lines. vLLM doesn’t even know the script is there. The only catch: you need enough free RAM to hold the model. And once the rig sleeps instead of powering off, the weights mostly stay in RAM anyway, so the trick matters most on a cold boot.

A custom OS for one job
That still left 48.82 s before vLLM even starts. Ubuntu Desktop carries snaps,
GDM, CUPS and a NetworkManager-wait-online that holds everything for 5.90 s.
vLLM needs none of it. So I did what every Linux geek wants to do once: I built
my own OS.
I called it vllm-os: an immutable CentOS Stream 10 image built with
bootc, read-only root, and one job, start
vLLM. It went on the NVMe, and my existing Ubuntu install stayed the default
boot: efibootmgr --bootnext boots vllm-os once, and any normal reboot goes
back to Ubuntu.
First answer from power on went from 130.02 s to 90.06 s. Here’s what did it, and most of it isn’t about my board or a custom OS, it works on any Linux box:
- Don’t wait for the network. vLLM needs it only at the very end, to open its port. Together with dropping the desktop services, vLLM started 6.52 s after the kernel was done, instead of 14.56 s.
- No SATA driver. My custom OS lives on the NVMe, so the kernel doesn’t need to probe the SATA ports: kernel and initramfs took 3.78 s instead of 5.84 s. And the test OS can’t touch the disks of my existing Ubuntu install.
- The prefetch script from above.
- CPU in performance mode, and more threads for vLLM’s kernel warmup
(
VLLM_TRITON_JIT_WARMUP_NUM_THREADS=16): vLLM getting ready took 17.48 s instead of 20.48 s. - GRUB timeout 0: the bootloader took 3.45 s instead of 4.46 s.
- Start the proxy together with vLLM, not after it: 2.39 s.
- Read
systemd-analyze blame. Mine showed an NVIDIA container toolkit service,nvidia-cdi-refresh, spending 8.17 s at every boot to rebuild a device list that never changes. Masked. - BIOS: CSM off, Fast Boot on, setup prompt 1 s, no logo, no network boot, unused onboard devices off. Firmware took 17.44 s instead of 21.32 s. The names differ per board, but most boards have these.
Every small surprise on the way cost a reboot or two, like a kernel module that wouldn’t load because of how it was compressed.
90 seconds from power on, almost 3x better than where I started. Good. But the plan was to never power it on at all.
Sleep, not power off
systemd-analyze says 17.44 of those 90 seconds are firmware: the board
checking 128 GB of RAM and two GPUs before anything else runs. No OS can skip
that. Suspend to RAM can. In
S3 only the RAM
keeps power, by my estimate about 5 W, and waking up skips the firmware, the
bootloader and the kernel boot. The weights stay in the page cache too.
I had one worry. My 3090s run gpu_unlock, a kernel module that removes NVIDIA’s half-speed limit on BF16 math on GeForce cards, about 35% faster prompt processing here. It does its trick at boot, before the NVIDIA driver loads. In S3 the cards lose power. Do they come back at half speed? I read its source instead of guessing. It registers a power hook that runs before the NVIDIA driver’s on resume, and it unlocks both cards again:
[Sun Nov 29 16:16:19 2026] nvidia 0000:09:00.0: gpu_unlock: unlocked again after resume
[Sun Nov 29 16:16:19 2026] nvidia 0000:41:00.0: gpu_unlock: unlocked again after resume
[Sun Nov 29 16:16:19 2026] PM: suspend exit
A quick BF16 benchmark after resume: 113.9 and 110.7 TFLOPS, full speed. When it is locked, the speed goes only up to 60-70.
Attempt 1: just sleep
vLLM running, model and cache filling 44 GiB of VRAM, then suspend. In S3 the GPUs lose power, so the NVIDIA driver first copies everything in VRAM to RAM: 47.6 s to go to sleep, 25.5 s to copy it back on wake. Slow, but I could live with that. The real problem came next: the first request after the wake never finished, and both GPUs sat at 100%. Same cause as attempt 2, read on.
Attempt 2: vLLM’s sleep mode
vLLM has a sleep mode
for exactly this. It emptied VRAM in 3.53 s, and after the wake /wake_up put
everything back in 1.12 s. A 5 second wake! Then I sent the first request:
(EngineCore pid=156) INFO [abstract.py:465] It took 1.117752 seconds to wake up tags {'kv_cache', 'weights'}.
(EngineCore pid=156) INFO [shm_broadcast.py:878] No available shared memory broadcast block found in 60 seconds.
# nvidia-smi during the hang:
0, 100 %, 168.24 W, 21964 MiB
1, 100 %, 167.47 W, 21980 MiB
Both GPUs at 100%, 168 W each, doing nothing. Nice way to save electricity :)
The model is split across the two cards, so for every layer they swap results
through NCCL over NVLink. NCCL set up that link before the sleep. On resume
gpu_unlock resets both cards, the old link points at cards that were reset
under it, and NCCL waits forever, at full power. I also tried vLLM’s
--enable-nccl-comm-suspend. /wake_up took 12.65 s, and the first request
locked up the whole machine.
Attempt 3: the boring way
Stop vLLM before sleeping, start it after waking. Nothing in VRAM to save, no NCCL to survive the night, and the weights still stay in RAM. The sleep script stops vLLM and anything else using the GPUs, then suspends. Going to sleep takes 3.89 s.
I sent the magic packet from another machine. The box was back on the network in 8.42 s, but the first answer took 89.63 s. Hmm. That’s 0.43 s better than a cold boot. All that for nothing?
The network card that wasn’t ready
vLLM’s log timestamps showed where the time went:
2026-11-29T16:31:36.539985000 Using ['PYNCCL'] all-reduce backends for group 'tp:0'
2026-11-29T16:32:01.703340000 Using ['PYNCCL'] all-reduce backends for group 'ep:0'
25.16 s between two lines that normally come right after each other. NCCL and Gloo (PyTorch’s other communication library) do their first handshake over TCP, on a network card. After S3 the Ethernet card was still bringing its link back up, and they waited for it. Both GPUs are in the same box, they don’t need the LAN to talk to each other. Two environment variables:
NCCL_SOCKET_IFNAME=lo
GLOO_SOCKET_IFNAME=lo
Next run:
[+ 3.89s] Host ASLEEP in ACPI S3 via `vllm-os sleep` (~5W idle)
[+ 8.42s from WoL] PING up!
[+64.82s from WoL] FIRST POST-WOL API ANSWER (HTTP 200, req=0.33s) -> '391'
From 89.63 s to 64.82 s, only by keeping that handshake inside the box.
The 0.42 seconds
Now the honest test. My custom OS wakes in 64.82 s, but how much of that is the OS? So I put the same tricks into plain Ubuntu and measured both:
| vllm-os | Tuned Ubuntu | |
|---|---|---|
| Power on to first answer | 90.06 s | 113.31 s |
| Wake-on-LAN to first answer | 64.82 s | 65.24 s |
From power on, my custom OS is about 20 seconds faster. But sleep skips exactly the parts it made faster: firmware, bootloader, kernel and services. From S3 the difference is 0.42 s, and two boots of the same image with nothing changed were 2.2 s apart. Noise.
My custom OS works, it just wasn’t where the time was. Back to Ubuntu.
Three Python starts for the price of one
What’s left in those 65 seconds? Not the disk anymore. With everything already in RAM, vLLM took as long to start as from a cold NVMe. The rest is Python and CUDA starting up.
vLLM runs as several processes, and in my container each one started fresh
(Python’s spawn) and imported PyTorch and vLLM again from zero. That’s 25.4 s
of the 57.0 s vLLM needed to start. With fork a new process starts as a copy
of its parent, with everything already imported.
vLLM’s docs
explain the catch: fork breaks if CUDA is already in use in the parent. Here
nothing touches CUDA before the workers start, so:
VLLM_WORKER_MULTIPROC_METHOD=fork
vLLM’s start went from 57.0 s to 40.95 s. Same KV cache, same decode speed.
Some ideas gave nothing:
--kv-cache-memory-bytes. I hoped telling vLLM the KV cache size would skip its 8.64 s memory profiling run. It runs the profile anyway.VLLM_ENABLE_STARTUP_PLAN=1: 0.02 s slower.- vLLM’s sleep mode without S3: first answer 1.46 s after
/wake_up. Lovely, but idle 3090s already sit at their lowest power state. The watts are in the rest of the box.
Final number, magic packet to the first answer through the proxy: 50.85 s.
The always-on piece
The proxy from part 3 used to run on the rig itself, which doesn’t help when the rig is asleep. It moved to a small container on a box that’s on anyway. It needs almost nothing, so a VM or container in your homelab, a Raspberry Pi, or any old mini PC that stays on will do.

When a request comes in and the rig is asleep, the proxy:
- Sends the magic packet, and sends it again if the rig doesn’t answer ping.
- For a streaming request, answers
200straight away and sends an SSE comment line every 3 s, so the client doesn’t time out. When vLLM is ready, the real answer comes on the same connection. - Answers
GET /v1/modelsfrom a cache, so a client that checks the model list doesn’t hang for 50 s. It also starts the wake right then: an agent that asks for the model list is usually about to send a prompt, so the rig gets a head start. - Gives an instant 503 to a client that sends
X-No-Wake: 1, for tools that would rather go to a cloud model than wait.
It puts the rig to sleep after 45 minutes with nothing in flight, but never in
the first 10 minutes after a wake, never while vLLM’s /metrics shows running
or waiting requests, and never while someone is logged in over SSH. The last
rule is for me. I don’t want the box to fall asleep under my shell.
One race needed care. The proxy sends the rig to sleep, and a request arrives during the 4 seconds it takes to go down. A magic packet sent to a machine that’s still shutting down is lost, and the request waits for nothing. So the proxy waits until the rig stops answering ping before it allows a new wake.
The generic version works with vLLM, llama.cpp, SGLang and Ollama, and it’s on GitHub: KrE80r/llm-proxy. The cap from part 3 is in there too.
The whole ladder
On the path I kept, here’s what each step shaved off:
- Weights from the 5,400 RPM disk to NVMe: 133.0 s
- S3 instead of power off, with NCCL on loopback: 48.07 s
- Ubuntu tuning (Docker on NVMe, prefetch, BIOS and the rest): 16.71 s
fork: 14.39 s- My custom OS: 0.42 s from sleep, about 20 s from power on
The recipe
If you run a local model on a box that burns real watts doing nothing, here’s the short version.
- Time it first, like in the first section. Your biggest win may be somewhere else.
- Fastest disk. Weights and container storage (
"data-root"in/etc/docker/daemon.json) on NVMe. - Prefetch. Read the weights into RAM while the server starts. My script
and its systemd unit are in
a gist.
Put
Wants=model-prefetch.servicewithoutAfter=in the server’s unit, so both start together. - BIOS. Enable Suspend to RAM (S3) and wake from PCIe/LAN, and disable
Deep Sleep or ErP so the network card keeps power while asleep. Then
cat /sys/power/mem_sleepshould show[deep]. - Wake-on-LAN in Linux, with your own interface and connection names:
sudo ethtool -s enp4s0 wol g sudo nmcli connection modify "Wired connection 1" 802-3-ethernet.wake-on-lan magic - A sleep script. Stop the inference server and everything else that holds
the GPU open (metrics exporters, fan-curve daemons), run
nvidia-sleep.sh suspend, thenecho mem > /sys/power/state. After resume:nvidia-sleep.sh resume, start them all again. There’s an example in the repo. For the first tries usertcwake -m mem -s 120instead ofecho mem: if Wake-on-LAN doesn’t work, the box wakes itself after 2 minutes. - Several GPUs in one box? Don’t keep the model loaded across S3, stop and
start it. And set:Check the vLLM log after adding
NCCL_SOCKET_IFNAME=lo GLOO_SOCKET_IFNAME=lo VLLM_WORKER_MULTIPROC_METHOD=forkfork. If CUDA was already in use, it warns and uses spawn anyway. - Don’t wait for the network. Remove
network-online.targetfrom the inference server’s unit. It only needs the network to open its port. - The proxy on something that’s always on and uses little power: a VM or container in your homelab, a Raspberry Pi, an old mini PC. It must be in the same LAN, because magic packets don’t cross routers. Point your clients at it.
Final thoughts
The rig sleeps at about 5 W now, and the first request after a quiet night gets
its answer 50.85 s after the proxy sends the magic packet, instead of 4 minutes
23 seconds after I remember to press the button. 50 seconds is still 50
seconds. For an agent that runs for half an hour it doesn’t matter, for a quick
question it does, and that’s what X-No-Wake and a cloud model are for.
The biggest win was a disk I should have checked first. My favourite is the prefetch script: 50 lines, and the disk works while vLLM starts instead of after. The custom OS was the most fun to build and saved the least. Measure first, then build your own OS. Or don’t, Ubuntu was fine :)
If you have a GPU box at home that’s on all day, give this setup a try. The proxy is on GitHub, issues and PRs welcome.
