You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resizing a bhyve VM to a package with more storage but identical memory/swap triggers a re-calculation of max_physical_memory which can also cause an override of the configured swap size.
The "create" endpoints allows us to create a bhyve VM with swap < ram + 1024 + 256:
We can work around the changes is in swap by updating the packages to use ram + 1024 + 256, but I'm not sure what/if the impact is of the max_physical_memory changing.
NB: documentation recommends setting swap to at least 2x ram, this is insufficient in this case.
The text was updated successfully, but these errors were encountered:
Resizing a bhyve VM to a package with more storage but identical memory/swap triggers a re-calculation of max_physical_memory which can also cause an override of the configured swap size.
The "create" endpoints allows us to create a bhyve VM with
swap
<ram + 1024 + 256
:We can then update this VM to a package with more storage:
Job parameters as logged:
However, this also causes changes max_swap and max_physical_memory:
I've narrowed this down to max_physical_memory parameter being converted into 'ram':
https://github.com/joyent/sdc-vmapi/blob/6cdddbc034bd4b25ed7eef29a7762e3b01485d2c/lib/common/validation.js#L1512
...after which vmadm recalculates it based on ram + overhead:
https://github.com/joyent/smartos-live/blob/2e4a94e6d9dd3be80fb70027485acd1192d9bb22/src/vm/node_modules/VM.js#L4536
...and then the swap is increased to match the new value:
https://github.com/joyent/smartos-live/blob/2e4a94e6d9dd3be80fb70027485acd1192d9bb22/src/vm/node_modules/VM.js#L4701
We can work around the changes is in swap by updating the packages to use ram + 1024 + 256, but I'm not sure what/if the impact is of the max_physical_memory changing.
NB: documentation recommends setting swap to at least 2x ram, this is insufficient in this case.
The text was updated successfully, but these errors were encountered: