Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jan 2020 10:00:13 +0000
From:      Matt Churchyard <matt.churchyard@userve.net>
To:        "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org>
Subject:   System (ps/top) & bhyvectl memory usage differences
Message-ID:  <2fc4d1eaa382463a9799dd6214aa77ef@SERVER.ad.usd-group.com>

next in thread | raw e-mail | index | archive | help
Hello,

Is there a reason why the resident memory used by a bhyve guest is quite di=
fferent 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=3Dsmtp-a | grep Res
Resident memory                                 1439875072

1.4G vs 925M

-----

Another thing I've just remembered, which is probably unrelated to the abov=
e 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 =3D "bhyve bhyve "
real memory  =3D 2147483648 (2048 MB)
avail memory =3D 2043318272 (1948 MB)

However, I have a guest with 5G allocated, and get the following in dmesg -

Hypervisor: Origin =3D "bhyve bhyve "
real memory  =3D 6442450944 (6144 MB)
avail memory =3D 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2fc4d1eaa382463a9799dd6214aa77ef>