Skip to content

[Bugfix][CI] Fix k8s e2e engine OOM and raise test timeouts - #1119

Merged
ruizhang0101 merged 3 commits into
vllm-project:mainfrom
ruizhang0101:fix/e2e-lmcache-cpu-buffer
Oct 5, 2026
Merged

ruizhang0101 merged 3 commits into
vllm-project:mainfrom
ruizhang0101:fix/e2e-lmcache-cpu-buffer

Conversation

@ruizhang0101

@ruizhang0101 ruizhang0101 commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

What

The vLLM engines in the k8s routing e2e tests were OOM-killed by the kernel. It surfaced as Engine core initialization failed, pods stuck at Ready 0/1, and the job hanging until wait-for-pods gave up.

kubectl describe shows the container's last state as Reason: OOMKilled, and the kernel log names the cgroup:

Memory cgroup out of memory: Killed process (VLLM::EngineCor) ... shmem-rss:9884344kB

The limit being hit belongs to the minikube container (~23.5 GiB), not to the pod. Kubernetes doesn't see that cap — the node advertises the host's full 94 GiB as allocatable — so the scheduler places both engines on it without complaint. With cpuOffloadingBufferSize: 10, each engine reserves ~10 GB of shared CPU memory for LMCache (the shmem-rss above); two engines plus the model, the router and the minikube system pods exceed the container's limit. The kernel kills an EngineCore, the pod restarts, and the next startup goes over again.

opt-125m at maxModelLen: 1024 needs nowhere near 10 GB of offload buffer.

Changes

  • cpuOffloadingBufferSize 10 → 2 in the four routing test values files (values-06-session, values-07-prefix, values-08-roundrobin, values-09-kvaware). values-10-disagg-prefill is untouched: enablePD already forces LMCACHE_MAX_LOCAL_CPU_SIZE=0.
  • wait_for_pods timeout 300s → 600s. 5 minutes is tight once the image pull, the PVC bind and two engines loading the model are counted.
  • Job step timeout-minutes 20 → 60. It was the same budget the script gives a single test run (--timeout 20), for a loop of five tests that each deploy, wait, run and tear down — and cleanup now waits for the release and its PVCs to be gone ([Bugfix][CI] Wait for helm uninstall and PVC deletion in k8s e2e cleanup #1113). A step killed mid-loop also kills the debug log collection, which is the one artifact worth having when a test fails.

Test

helm template renders LMCACHE_MAX_LOCAL_CPU_SIZE: "2"; pre-commit passes. This PR's own e2e run is the real test.

Notes

  • The minikube container's memory cap is a runner-side issue this PR can't fix. Raising it (minikube start --memory=80g on a 94 GB host) would give real headroom; the buffer reduction keeps the suite inside the current cap either way.
  • Adding limitMemory to the engine containers would turn a future overcommit into a clean pod-level OOMKill instead of a kernel kill inside the minikube cgroup, making a mismatch like this much easier to spot. Happy to add it here if reviewers want.
  • The --previous / full-log capture added in [Bugfix][CI] Wait for helm uninstall and PVC deletion in k8s e2e cleanup #1113 is what makes this diagnosable from CI artifacts.

  • Make sure the code changes pass the pre-commit checks.
  • Sign-off your commit by using -s when doing git commit
  • Try to classify PRs for easy understanding of the type of changes, such as [Bugfix], [Feat], and [CI].

The vLLM engines were OOM-killed by the kernel during the k8s routing
tests, which surfaced as "Engine core initialization failed" and left
pods at Ready 0/1 until the suite timed out.

The limit being hit belongs to the minikube container (~23.5 GiB), not
to the pod. Kubernetes does not see that cap - the node advertises the
host's full memory - so the scheduler happily places both engines on it.
With cpuOffloadingBufferSize: 10, each engine reserves ~10 GB of shared
CPU memory for LMCache; two engines plus the model, the router and the
minikube system pods exceed the container's limit.

opt-125m at max-model-len 1024 needs nowhere near 10 GB of offload
buffer, so drop it to 2 GB in the routing test values.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Rui Zhang <[email protected]>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the cpuOffloadingBufferSize configuration from "10" to "2" across several test asset YAML files, including session, prefix, round-robin, and KV-aware routing configurations. There are no review comments to address, and no further feedback is required.

Pods were given 300s to become ready, which is tight once the image
pull, the PVC bind and two vLLM engines loading the model are counted -
and the engines now restart at least once on a cold node. Raise it to
600s.

The job step was capped at timeout-minutes: 20, the same budget the
script gives a *single* test run (--timeout 20), for a loop of five
tests that each deploy, wait, run and tear down. Cleanup now also waits
for the release and its PVCs to be gone. A step killed mid-loop takes
the debug log collection with it, which is the most useful artifact when
a test fails, so raise the cap to 60 minutes.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Rui Zhang <[email protected]>
@ruizhang0101 ruizhang0101 changed the title [Bugfix][CI] Shrink LMCache CPU offload buffer in k8s e2e values [Bugfix][CI] Fix k8s e2e engine OOM and raise test timeouts Oct 5, 2026
@ruizhang0101
ruizhang0101 marked this pull request as ready for review October 5, 2026 22:28
The e2e jobs are gated on `github.event.pull_request.draft == false` and
were skipped because the first run fired while this PR was a draft.
`on: pull_request` does not include `ready_for_review`, so marking it
ready did not re-run them.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: Rui Zhang <[email protected]>
@ruizhang0101
ruizhang0101 merged commit 46e1f05 into vllm-project:main Oct 5, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant