oxidecomputer / oxidecomputer/omicron
`SledAgent::notify_nexus_about_self` does not deduct reservoir size from usable physical memory size
Nobody has claimed this yet.
- 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):
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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