Date: Mon, 21 Apr 2014 14:21:40 +0400 From: Roman Bogorodskiy <novel@FreeBSD.org> To: freebsd-virtualization@FreeBSD.org Subject: Understanding CPU and memory usage in Bhyve Message-ID: <20140421102138.GA6157@kloomba>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi,
I'm trying to understand how to obtain resource usage information for a
bhyve guest.
For the CPU, there's some info provided by bhyvectl, e.g.:
/usr/sbin/bhyvectl --vm=bhyve --get-stats --cpu=1
in the field 'vcpu total runtime', for example:
vcpu total runtime 8178870653
Two question about that:
1. What are the units used here? Looks like it's ticks, so if I want to
convert this number, to, say, nanoseconds, would it be right to do
something like:
X * 1000**3 / kern.clockrate.stathz
(X beeing the value returned by bhyvectl and kern.clockrate is a
sysctl name)?
2. This value shows only vcpu time, without hypervisor time?
For the memory stats, it's less obvious. Does guest always use an amount
of memory specified at startup with '-m' (i.e. bhyve -m 1G) or it could
use less?
What is the format of bhyvectl --get-{low,high}mem output?
PS I found it a little confusing that bhyvectl displays vcpu0 stats by
default if --cpu is not provided, expected it provide info of all vcpus
in the guest by default. Also, didn't find a way to get a number of
vcpus in a running guest.
Roman Bogorodskiy
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (FreeBSD)
iQEcBAEBAgAGBQJTVPEyAAoJEMltX/4IwiJqvUcH/2cIUMrNCELYek49anhh4KNY
IwUS7eJ0esJaBAvHVqAp5XpnUuxfJyxuKuJyMY+guwJ9u2exW0HWIIx8iB4IMRT2
qNpRTGwSAH6MuBGLdXuUTcK9q+nnSgB20KqfU4LrZbSsHirmTC0JV5hTFtIBhsDs
eRIkkOBzxcW6VK7qQEye1jJo6jyqV9s7GTONTK3kDjLWYIDJNI+RkEUJnbaH36qI
TPN5IFm2QeDXmSxuGSO5n4ZJTy33pkZN2JQCI0WQokhtTCD6TXEeniLo7bZywkI7
wi1eR1oyhzrMUmS3qcOPGe7+4jARdb8H0C8fUNSIVcJ7kZuouRlgm7a6s4OoREc=
=BnP2
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140421102138.GA6157>
