﻿# llama.cpp Vulkan keepalive: test idle residency as a hypothesis, not a guaranteed fix

The optional Vulkan keepalive in b12363 is a tool for an idle-residency experiment; measure post-idle latency and resource cost on affected hardware.

Author: Retrivium team
Updated: 2026-11-15
Canonical URL: https://retrivium.ai/journal/week46-engine-vulkan-keepalive-idle-residency-experiment/
Language: en

llama.cpp b12363 adds an optional Vulkan device keepalive. The upstream work began as an investigation of memory eviction and slow inference after idle periods. Publishing the mechanism establishes that a periodic device activity option exists; whether it prevents a particular system’s slowdown still requires a controlled idle-and-resume experiment.

## A mechanism is not a diagnosis

Periodic GPU activity is intended to investigate an idle-related problem. A faster first request with keepalive would support that intervention under the measured conditions, but would not by itself identify every driver or operating-system decision involved. A first-request slowdown can have other causes, including application state. Preserve evidence about memory residency and device activity so the causal account contains more than two response-time numbers.

## Use a repeatable idle interval

A proposed comparison warms the same model, leaves it idle for a fixed interval, and measures the first resumed request separately from subsequent requests. Repeat with keepalive disabled and enabled, keeping background GPU work controlled. Varying the idle interval deliberately is useful; varying it accidentally makes the result hard to interpret. Record the exact option semantics from the published revision, since the PR’s implementation evolved during review.

## Activity has a resource cost

Preventing an idle state can affect power draw and background activity even if the submitted operation is small. Measure those costs alongside any latency benefit, especially on mobile or shared systems. A workaround that is useful for a low-latency workstation may be undesirable for another duty cycle. The release does not establish a universally optimal interval, and no such recommendation can be inferred from the existence of the option alone.

## Keep the conclusion local

The upstream discussion includes uncertainty and testing needs on affected hardware. Preserve that status instead of turning the feature into a blanket claim that Vulkan idle eviction is solved. A local report should name the device, driver, operating system, interval and measured workload. This article reports the newly available experiment mechanism and its limits; it does not claim an independent confirmation that keepalive fixes a specific Intel or AMD system.

## Sources

- [llama.cpp b12363 release](https://github.com/ggml-org/llama.cpp/releases/tag/b12363)
- [llama.cpp pull request #29267](https://github.com/ggml-org/llama.cpp/pull/29267)

## Related reading

- [Arc A770 Vulkan serving: empty EOS replies and a long-run countercheck](/journal/arc-a770-vulkan-long-run-empty-eos-report/)
- [Interpret CUDA pool release thresholds and trimming at a phase boundary](/journal/guide-perf-pool-release-threshold/)
