Skip to content

docs(multinode): follow-ups to the memory guard review - #2601

Merged
Defilan merged 2 commits into
defilantech:mainfrom
cindy-pi:fix/multinode-memory-guard-followups
Nov 24, 2026
Merged

Defilan merged 2 commits into
defilantech:mainfrom
cindy-pi:fix/multinode-memory-guard-followups

Conversation

@cindy-pi

Copy link
Copy Markdown
Collaborator

What

The four small things from the approving review of #2570 ("for later, none needed here"), in two commits: three corrections to the multi-node guide and one assertion in the memory guard tests. No operator code changes.

Why

Each of them is text or a test that #2570 left a little short of the code it merged.

Refs #1857

How

Guide (docs/site/guides/multi-node-inference.md, "Node memory while serving")

  • The guard's last drop. The guide said the guard "drops once more" after 10 seconds. It skips that drop when a drop already ran in the last 5 seconds, and the guide now says so.
  • Argo CD. ignoreDifferences on /spec/suspend needs the sync option RespectIgnoreDifferences=true, or a sync still applies the Git value. The wording follows docs/operations/gpu-sharing.md, which already explains this for replicas.
  • Page size. The watermarks in /proc/zoneinfo are in pages, not "4 KiB pages": the guide now points at getconf PAGESIZE and says the size is 4 KiB on most kernels, 16 or 64 KiB on some arm64 ones.

Two of the touched paragraphs are reflowed, so the diff is a few lines larger than the changes.

Test (internal/controller/multinode_memory_guard_test.go)

  • TestMultiNodeMemoryGuardScriptSuspendsWhenCacheIsShmem threw away dropped, so it stayed green if the guard's last drop were made to depend on droppable page cache. It now asserts dropped == "3" and the guard's own log line for that drop (guard: last drop: MemFree 6416 -> 6416 MiB), so it checks which drop ran. With these inputs the flusher cannot be the one that drops: MemFree is above the flush floor and only 88 MiB of Cached is not Shmem.

Tested

  • Fail-before. With the last drop made to depend on droppable (&& [ "$(droppable)" -gt 512 ] on the guard's gap check), the test fails: --- FAIL: TestMultiNodeMemoryGuardScriptSuspendsWhenCacheIsShmem ... no last drop before the suspend when the cache is Shmem. On the script as merged it passes, three runs in a row.
  • On main at 20c001e2 with these commits, in golang:1.27.4 on arm64: make lint-all, gofmt, make check-docs-links and the memory guard unit tests pass on the final diff. make test, make test-envtest, make check-docs-reference, make validate-samples, make check-helm-rbac and helm lint passed on the diff before a last round of wording and reflow in the guide and the added log-line check in the test; I did not rerun those two long suites after it.
  • No hardware run: nothing that runs on a node changes.

Left as it is

  • A later sentence in the same section, and the comment in the three-Spark ring sample, say that the guard "drops the cache" once MemFree has been under the suspend floor for about 10 seconds, without repeating the 5 second exception. Both describe the case where MemFree sits between the two floors, so the flusher has not dropped and the sentence holds. Say if you want the exception repeated there.
  • The lab page step you mentioned is already fixed on main (docs: point the three-Spark ring lab at spec.multiNode.memory and use placeholder host names #2598), so it is not here.

Assisted-by: Claude Code (wrote the changes and ran the checks; I reviewed them)

Checklist

  • Tests added/updated
  • make test passes locally
  • make lint passes locally (also make lint-all)
  • Commit messages follow conventional commits
  • All commits are signed off (git commit -s) per DCO
  • AI assistance (if any) is disclosed above, per CONTRIBUTING.md
  • Documentation updated (if user-facing change)

🤖 Generated with Claude Code

The guard's last drop is skipped when a drop ran in the last 5 seconds.
Argo CD needs the RespectIgnoreDifferences=true sync option beside
ignoreDifferences, or a sync still applies the Git value of
spec.suspend. /proc/zoneinfo counts pages, which are 16 or 64 KiB on
some arm64 kernels; point at getconf PAGESIZE instead of assuming
4 KiB.

Refs defilantech#1857

Signed-off-by: Cindy Singleton <cindy.singleton@skyloch.com>
TestMultiNodeMemoryGuardScriptSuspendsWhenCacheIsShmem did not check
that the last drop ran, so it stayed green if that drop were made to
depend on droppable page cache. It now checks the drop and the guard's
log line for it, and fails in that case.

Refs defilantech#1857

Signed-off-by: Cindy Singleton <cindy.singleton@skyloch.com>
@cindy-pi
cindy-pi requested a review from Defilan as a code owner November 21, 2026 07:58
@codecov

codecov Bot commented Nov 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Defilan Defilan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving. I checked each change against the code:

  • The guard skips its last drop when the flush branch dropped within the last GUARD_DROP_GAP_S (5 s), so "unless a drop already ran in the last 5 seconds" matches internal/controller/multinode.go.
  • The new assertion pins the guard: last drop line the script writes, so the Shmem case can't lose its last drop without the test noticing.
  • The Argo CD note is right: ignoreDifferences on its own only hides the diff, and a sync still applies the Git value unless RespectIgnoreDifferences=true is set.

Thanks for closing out the review items, @cindy-pi.

@Defilan
Defilan added this pull request to the merge queue Nov 24, 2026
Merged via the queue into defilantech:main with commit b62fc2c Nov 24, 2026
32 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.

2 participants