Allow VMM reservoir to be configured by sled-agent#3200
Conversation
74345d8 to
51a8db6
Compare
d5b0ca7 to
6650b23
Compare
jmpesp
left a comment
There was a problem hiding this comment.
I deployed this to the Canada region and it looks good (incidentally, it's also how I learned that two of my machines report 130986 for prtconf -m, and two report 130984!). I was able to launch instances on all four machines.
A few questions outside of the comments I left:
- should setting a reservoir value impact usable_physical_ram at all?
- should it impact the accounting during instance allocation? there's currently a
// TODO: We should also validate the reservoir space, when it exists.message inDataStore::sled_reservation_create.
pfmooney
left a comment
There was a problem hiding this comment.
The bhyve/propolis-adjacent bits look fine to me. I'm no useful judge of the more omicron focused stuff, though.
Co-authored-by: Sean Klein <sean@oxide.computer>
|
Thanks @jmpesp, for doing some additional testing of provisioning instances. Some testing notes around the configuration parameter validation. I did these tests by modifying the config.toml and restarting sled-agent. Valid parameters: No value specified in config 0% vmm_reservoir_percentage = 0 Arbitrary value: 20% vmm_reservoir_percentage = 20
Invalid parameters: -1% 101% |
6650b23 to
82b85bb
Compare
Discussed offline -- we should look at both of these things before enabling the reservoir by default. Will file issues today. |
Builds on top of #2684, with some slight changes, and with the addition of allowing the reservoir size to be configured as a percentage of sled DRAM, via sled-agent's config.toml.
Summary:
/opt/oxide/sled-agent/package/config.toml)Allowing the size to be configured in this way is intentional; we know that we can't use the reservoir without swap devices configured, and there are potentially other issues to sort out there too. A PR for having sled-agent set up a swap device is in progress. But having the reservoir bits in main is valuable for testing; we can configure swap devices manually and test use of the reservoir without sled-agent knowing how to set those up yet.
To change the reservoir configured by sled-agent, modify this field in /opt/oxide/sled-agent/pkg/config.toml:
Then restart sled-agent:
$ svcadm restart sled-agentNote that sled-agent currently tears down existing zones on startup; restarting sled-agent is thus destructive to existing instances on the sled.
An illegal value (< 0 or > 100) will cause sled-agent to panic.
Note that the config.toml is in the ramdisk, so changes here are not persisted across reboot.