System (ps/top) & bhyvectl memory usage differences
Matt Churchyard
matt.churchyard at userve.net
Thu Jan 30 10:00:19 UTC 2020
Hello,
Is there a reason why the resident memory used by a bhyve guest is quite different when comparing ps/top & bhyvectl?
Does bhyvectl take in account something in kernel space that top/ps doesn't see?
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 12670 0.1 1.4 2120984 951764 1 SC+ 22Jan20 157:29.22 bhyve: smtp-a (bhyve)
# bhyvectl --get-stats --vm=smtp-a | grep Res
Resident memory 1439875072
1.4G vs 925M
-----
Another thing I've just remembered, which is probably unrelated to the above but still concerning memory.
I have a guest with 2G memory allocated, and dmesg lists 2048MB real memory. The real & avail figures are also quite close which resembles the output I generally expect on real hardware.
Hypervisor: Origin = "bhyve bhyve "
real memory = 2147483648 (2048 MB)
avail memory = 2043318272 (1948 MB)
However, I have a guest with 5G allocated, and get the following in dmesg -
Hypervisor: Origin = "bhyve bhyve "
real memory = 6442450944 (6144 MB)
avail memory = 5141663744 (4903 MB)
bhyveload -m 5G ...
bhyve -c 2 -m 5G -AHP ...
I haven't tested where it seems to change. My only theory is that it could possibly be something to do with crossing the old 32bit limit?
Regards,
Matt Churchyard
More information about the freebsd-virtualization
mailing list