on bhyve statistics

Rodney W. Grimes freebsd-rwg at pdx.rh.CN85.dnsmgr.net
Tue Aug 28 15:31:38 UTC 2018

> On 8/28/18 3:37 PM, Rodney W. Grimes wrote:
> >>>> Currently, bhyve does not expose any of these statistics. All the stats
> >>> available through bhyvectl --get-stats seem to be coming from the VMM,
> >>> not from the userspace emulation.
> >>
> >>> That is correct, byhvectl is a diagnostics tool for getting
> >> information from the kernel/vmm module.
> >>
> >> bhyvectl provide stats related to processor vmx/svm from vmm.ko and is the
> >> first thing you want to run for performance regression. It will be nice to
> >> include it as part of bhyve perf tool/dashboard that you are intended to
> >> build.
> > 
> >  From conversations with Peter Grehan he expressed that bhyvectl is
> > purely a diagnostics tool that should not be depended on by any
> > other tools.
> > 
> > If you want to do similiar things you should program to the libvmmapi
> > interface, not bhyvectl.
> For context, this is *not* what I'm aiming to do. While bhyvectl just 
> prints statistics exposed by the VMM through libvmmapi, I'm specifically 
> asking about instrumenting the userland part, bhyve.
> Also, libvmmapi does have downstream consumers that are not 
> bhyve{,ctl,load}, e.g. grub2-bhyve, bhyve-multiboot[1], maybe even 
> xhyve[2] - for performance reasons, I'd prefer scraping metrics through 
> libvmmapi over shelling out to bhyvectl.

Yes, there are other consumers of libvmmapi, why I stressed
that it is the api to interface with vmm.ko.

It might even make since to have the userland bhyve(8)
maintain statistics in libvmmapi for exactly these reasons.

> [1] https://github.com/fubarnetes/bhyve-multiboot
> [2] https://github.com/mist64/xhyve

Rod Grimes                                                 rgrimes at freebsd.org

More information about the freebsd-virtualization mailing list