oxidecomputer / oxidecomputer/omicron

`SledAgent::notify_nexus_about_self` does not deduct reservoir size from usable physical memory size

Open
#4,078 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Good for new hires Sled Agent
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

A sled's physical pages are either in the VMM reservoir (where they can only be used as guest memory) or not (where they are available for general use). Currently, when sleds report their memory sizes, they double-count reservoir pages--they are added to both the "general use" pool and the reservoir (or, more accurately, they're initially included in the general-purpose pool and then not subtracted off):

https://github.com/oxidecomputer/omicron/blob/3dcc8d2eb648c87b42454882a2ce024b409cbb8c/sled-agent/src/sled_agent.rs#L511-L557

This makes sleds seem like they have much more memory available for non-VMM service memory than they actually do, which can lead to overprovisioning and out-of-memory errors.

This should be straightforward enough to fix--sled agent should subtract the reservoir size from the general-purpose pool before telling Nexus how much memory the sled has to offer.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect sled-agent/src/sled_agent.rs around lines 511-557, focusing on SledAgent::notify_nexus_about_self and how reservoir and general-purpose memory are reported. Adjust the reported usable-memory calculation so reservoir pages are not counted twice; done means Nexus receives the actual general-use memory available on the sled.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.