From owner-freebsd-virtualization@freebsd.org Sat Dec 2 02:50:46 2017 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C90FADEED0F for ; Sat, 2 Dec 2017 02:50:46 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail07.adl2.internode.on.net (ipmail07.adl2.internode.on.net [150.101.137.131]) by mx1.freebsd.org (Postfix) with ESMTP id 655B27D81B for ; Sat, 2 Dec 2017 02:50:45 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ppp121-45-11-215.bras1.adl4.internode.on.net (HELO leader.local) ([121.45.11.215]) by ipmail07.adl2.internode.on.net with ESMTP; 02 Dec 2017 13:20:43 +1030 Subject: Re: bhyve uses all available memory during IO-intensive operations To: Dustin Wenz Cc: freebsd-virtualization@freebsd.org References: <9C202C72-EF74-4DB7-9B2C-736C049A9F7A@ebureau.com> <22BC8832-924A-480B-A9A0-DB717D37BF08@ebureau.com> <9897C115-4212-4161-811D-E71B0CAE911A@ebureau.com> From: Shane Ambler Message-ID: <5bb5649f-5785-7baf-6871-625d1f63bd8b@ShaneWare.Biz> Date: Sat, 2 Dec 2017 13:20:41 +1030 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <9897C115-4212-4161-811D-E71B0CAE911A@ebureau.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2017 02:50:46 -0000 On 02/12/2017 08:11, Dustin Wenz wrote: > > The commit history shows that chyves defaults to -S if you are > hosting from FreeBSD 10.3 or later. I'm sure they had a reason for > doing that, but I don't know what that would be. It seems to an > inefficient use of main memory if you need to run a lot of VMs. It sounds like a reasonable solution to a problem. If host memory is full it swaps some out, so a bhyve might have free mem but some could be swapped out by the host. If the bhyve is out of mem, it's system swaps to it's disk, so the host swaps it back in so that the bhyve can then swap it to its disk... Wiring bhyve ram might be a reasonable solution as long as the hosts physical ram isn't over allocated by bhyve guests. The best solution would involve a host and guest talking to each other about used mem, but that would break the whole virtual machine illusion. At the least it would involve a system telling the hardware what memory is used and what is not, which just isn't something any system does. Maybe that is an idea for the vm guest aware systems of the future. -- FreeBSD - the place to B...Sharing Devices Shane Ambler