Skip to content

[sled agent] Create reservoir for VMs - #2684

Closed
smklein wants to merge 11 commits into
mainfrom
reservoir
Closed

smklein wants to merge 11 commits into
mainfrom
reservoir

Conversation

@smklein

@smklein smklein commented Mar 27, 2023 •

Copy link
Copy Markdown
Collaborator
  • Adds a VMM reservoir to the sled agent on setup (50% of physical memory)
  • Reports the size used by that VMM reservoir to Nexus, where may be used for future accounting (such as that described in RFD 380)

Fixes #2650

@smklein
smklein marked this pull request as ready for review March 29, 2023 16:15
@smklein

smklein commented Mar 29, 2023

Copy link
Copy Markdown
Collaborator Author

FYI @jclulow - I'm blocked on the lab-opte-0.21 image not having an up-to-date rsrvrctl . AFAICT it does have what we need in helios-latest, but I'm not 100% sure what to kick to get that lab-opte target up-to-date

@smklein
smklein requested review from luqmana and pfmooney March 29, 2023 18:47
@smklein

smklein commented Mar 30, 2023

Copy link
Copy Markdown
Collaborator Author

FYI - as of a0b4f32 , I'm no longer calling rsrvrctl -- I'm using the bhyve_api instead, as @pfmooney suggested

@pfmooney pfmooney 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.

Thanks for wiring this in

Comment thread illumos-utils/src/lib.rs Resolved
Comment thread illumos-utils/src/rsrvrctl.rs Resolved
Comment thread Cargo.toml
proc-macro2 = "1.0"
progenitor = { git = "https://github.com/oxidecomputer/progenitor", branch = "main" }
progenitor-client = { git = "https://github.com/oxidecomputer/progenitor", branch = "main" }
bhyve_api = { git = "https://github.com/oxidecomputer/propolis", rev = "db39a40be172109de3ca34af8a1c37dd76e715a9" }

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.

Perhaps it's time to split this off into it's own home. Though, we're gonna be packaging together the OS/bhyve, propolis & sled-agent so maybe we should just make sure to keep all the propolis stuff on the same rev. Not really possibly yet since omicron is still pinned on an older rev but in the future. Anyways, not a blocker for this PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Agreed, I think we have a similar situation with our crucible deps, where multiple crates exist that we depend on, but it seems simplifying to have them all be pinned to a single rev and move together.

impl ReservoirControl {
/// Sets the reservoir to a particular size.
///
/// - "size" must be exactly divisible by a MiB

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.

Should this just take the size in MiB then?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We could, but would probably want a new type to represent that, since IMO it's confusing to have u64s with overloaded meaning. This was why we originally used ByteCount everywhere, to make it explicit that "it's a count of bytes", but that does have the downside of permitting values that need to be validated.

Do you have a strong opinion on where this new type should live?

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.

The 1MiB granularity requirement was a function of using rsrvrctl(1), which acted in terms of MiB. Strictly speaking, the Private ioctl interface for manipulating the reservoir size demands nothing more than rounding to PAGESIZE.

That being said, sticking to 1-2MiB+ increments would probably be good for if/when we flesh out better large page support internally.

Comment thread sled-agent/src/sled_agent.rs Resolved
Comment thread sled-agent/src/instance_manager.rs Resolved
@jordanhendricks

jordanhendricks commented May 25, 2023 •

Copy link
Copy Markdown
Contributor

Closing this, as it is now superseded by #3200

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.

[sled agent] Provision a reservoir for Propolis

4 participants