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
Guest memory overcommitting should be as simple as ensuring that MAP_NORESERVE is present in the above flags. Working backwards from qemu_ram_is_noreserve(), the qemu command line parameters to ensure MAP_NORESERVE appear to be:
...instead of the simple -m $mem parameter that we currently use.
I'm not sure of the best way to let rapido use memory overcommit. There are a few options:
replace the _rt_qemu_resources_get() -m $mem snippet with the above -object memory-backend-ram...reserve=off parameters.
leave things as-is and let users manually tweak things via QEMU_EXTRA_ARGS
let cut scripts decide whether VM memory should be overcommitted or not via a new helper / cpio flag-file _rt_mem_overcommit_resources_set, with (1) logic enabled if the overcommit flag is detected.
If overcommit were possible via a simple -overcommit-memory parameter (alongside -m $mem), then I'd definitely opt for (2), but the fact that size=${mem} needs to be present with the -object memory-backend-ram parameter means that VM memory resource requirements specified in the cut script via _rt_mem_resources_set can't easily be considered at boot time.
I really, really, really don't want rapido to go down the path of acting as a map between local configs and qemu cli parameters similar to libvirt. I'm concerned that option (1) leads us further in that direction.
The text was updated successfully, but these errors were encountered:
I was under the impression that qemu overcommited memory by default, until I ran into good ol':
Some
strace
ing later, against a VM with 50G memory assigned, showed that qemu attempts tommap()
the entire guest memory area via:Guest memory overcommitting should be as simple as ensuring that
MAP_NORESERVE
is present in the above flags. Working backwards fromqemu_ram_is_noreserve()
, the qemu command line parameters to ensureMAP_NORESERVE
appear to be:...instead of the simple
-m $mem
parameter that we currently use.I'm not sure of the best way to let rapido use memory overcommit. There are a few options:
_rt_qemu_resources_get() -m $mem
snippet with the above-object memory-backend-ram...reserve=off
parameters.QEMU_EXTRA_ARGS
_rt_mem_overcommit_resources_set
, with (1) logic enabled if the overcommit flag is detected.If overcommit were possible via a simple
-overcommit-memory
parameter (alongside-m $mem
), then I'd definitely opt for (2), but the fact thatsize=${mem}
needs to be present with the-object memory-backend-ram
parameter means that VM memory resource requirements specified in the cut script via_rt_mem_resources_set
can't easily be considered at boot time.I really, really, really don't want rapido to go down the path of acting as a map between local configs and qemu cli parameters similar to libvirt. I'm concerned that option (1) leads us further in that direction.
The text was updated successfully, but these errors were encountered: