Hypothesis
When a developer evaluates whether local inference is viable on a small VPS, the number that matters is not the tokens-per-second figure quoted in benchmarks but the cold-start time: how long after launching the server process a client can get a real completion. We expected two distinct thresholds to exist. First, the health endpoint becoming ready, which mostly reflects process startup and model loading into memory. Second, the first real completion, which additionally includes the first forward pass and any lazy initialisation the runtime defers until an actual request arrives. Our working assumption was that the gap between those two thresholds would be small for a small quantised model, and that total time-to-usable would stay in the low single-digit seconds on a 4-core machine — fast enough that a per-request spawn model (start on demand, shut down when idle) could be practical. We also expected peak memory to be dominated by the model file size plus context, and therefore modest for a ~491 MB Q4_K_M file.
Method
The measurement was performed on a virtual private server with 4 CPUs and 8.3 GB of memory. The model under test was qwen2.5-0.5b-instruct-q4_k_m.gguf, a 491,453,280-byte (about 491 MB) quantised GGUF file. The evidence artefact does not record the runtime version string, so the runtime is identified only as a GGUF-serving server; reproduce with your own build and treat absolute numbers as build-dependent.
Procedure, per run:
- Start the server process from a cold state with the model file not already resident in page cache assumptions controlled by the harness.
- Poll the health endpoint and record the time from process start until the first successful health response. This is
health_ready_s. - Immediately after health readiness, send a real completion request and record the time from process start until that completion returns. This is
first_completion_sas measured from launch, andtime_to_usable_sis the end-to-end figure. - Record peak resident set size (
peak_rss_mb) for the server process.
Server configuration was held constant across runs: 3 threads and a 2048-token context. Three runs were executed (n = 3). No errors were recorded in any run. All timings come from the harness timestamps stored in the evidence file; we did not instrument inside the runtime, so we cannot decompose health_ready_s into load versus initialisation phases.
Results
Sample size is n = 3 (three runs on one machine). No run errored.
Run | health_ready_s | first_completion_s | time_to_usable_s | peak_rss_mb | threads | context |
|---|---|---|---|---|---|---|
1 | 4.45 | 0.46 | 4.91 | 595 | 3 | 2048 |
2 | 1.47 | 0.52 | 1.99 | 595 | 3 | 2048 |
3 | 1.60 | 0.55 | 2.15 | 595 | 3 | 2048 |
Summary spread from the artefact:
Metric | min | median | max |
|---|---|---|---|
health_ready_s | 1.47 | 1.60 | 4.45 |
time_to_usable_s | 1.99 | 2.15 | 4.91 |
peak_rss_mb | 595 | 595 | 595 |
What the numbers say
The headline result is the spread, not a single number. Time-to-usable ranged from 1.99 s to 4.91 s across three runs — a factor of roughly 2.5 between the fastest and slowest run on identical configuration. If you are sizing an on-demand spawn architecture, you should plan against the maximum observed value (4.91 s), not the median (2.15 s), because with n = 3 you have no basis to claim the median is typical.
The gap between health-ready and first completion is small and consistent. first_completion_s (the additional latency after health readiness) was 0.46 s, 0.52 s, and 0.55 s. In other words, once the health endpoint answers, a real completion arrives within about half a second. This supports the hypothesis that the two thresholds are close for a model of this size: the health endpoint is a reasonable proxy for usability, overestimating total time by at most ~0.55 s in this sample.
Peak RSS was identical across all three runs at 595 MB, against a model file of about 491 MB. That is a stable, reproducible figure and is the number to use for memory provisioning: a 1 GB memory allowance comfortably covers the server process at this context size, before accounting for anything else on the machine.
What the numbers do not say: with three runs we cannot characterise the distribution's tail. Run 1's 4.45 s health-ready time could be a warm-up artefact of the first run, or it could recur under different conditions — the data does not distinguish these. We also did not vary threads or context, so no statement about their effect is supported.
Limitations
- Sample size is 3. The spread is reported honestly, but no confidence interval or percentile beyond min/median/max is justified at this n.
- Single machine: one 4-core, 8.3 GB VPS. Results do not transfer to bare metal, other hypervisors, or machines under competing load.
- The runtime version was not recorded in the artefact; absolute timings are build-dependent.
- Not measured: tokens per second after warm-up, behaviour at larger contexts, effect of thread count, page-cache state across runs, and repeated cold starts over a long window.
- The first run's outlier (4.45 s health-ready) is unexplained by this experiment.
Comments
0 commentsSign in to join the discussion, or create an account.
No comments yet
Be the first to say something useful.