Date: Wed, 14 Nov 2018 08:10:39 -0800 (PST) From: "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net> To: Paul Esson <Paul.Esson@Redstor.com> Cc: "freebsd-virtualization@freebsd.org" <freebsd-virtualization@freebsd.org> Subject: Re: vm-bhyve swap space usage Message-ID: <201811141610.wAEGAdMN036562@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <DB6PR0102MB26298BD07C9E3667D2E173B49EC30@DB6PR0102MB2629.eurprd01.prod.exchangelabs.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> Hi Folks, > > I've recently started using vm-bhyve-1.2.3, on FreeBSD 11.2-RELEASE-p4 and noticed three processes, one for each VM, using swap as indicated by top -w. > The processes are running the "vm" script as follows - /bin/sh /usr/local/sbin/vm -tf _run {vm name}. > Is this expected behaviour? Have you over taxed your avaliable physical ram? If so then yes, this is expected behavior. Bhyve uses "swap backed anon memory regiones" for the memory configured to the vm. If you do not have that much spare free memory your system well start to swap, including the vm processes. You can specify a wired memory option to prevent the vm's from using swap, but be aware that places memory pressure on other parts of the system. (I still stronly recommend doing this, unless you have lots of vm's that are mostly idle and can have slow responsiveness.) bhyve -S option, not sure how to do that in vm-bhyve-1.2.3 Further note that if your using zfs the configuration for it by default is to use up to 95% of your host memory for ARC cache, this interacts very poorly with bhyve, and I recommend reducing the max arc cache size by the amount of memory allocated to all VM's. sysctl vfs.zfs.arc_max -- Rod Grimes rgrimes@freebsd.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811141610.wAEGAdMN036562>