bhyve uses all available memory during IO-intensive operations

Dustin Wenz dustinwenz at ebureau.com
Fri Dec 1 21:41:54 UTC 2017


I've been running a database stress test on my VMs for the last few hours without issue, and I've noticed no unexpected memory usage. Prior to changing the wired option, this would never have run as long. I haven't limited the ARC size yet, but I probably will since it sounds like best practice for a bhyve host.

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.

Thanks everyone for helping to nail this down!

	- .Dustin


> On Dec 1, 2017, at 12:09 PM, Dustin Wenz <dustinwenz at ebureau.com> wrote:
> 
> Yep, and that's also why bhyve is getting killed instead of paging out. For some inexplicable reason, chyves defaulted to setting -S on new VMs. That has the effect of wiring in the max amount of memory for each guest at startup.
> 
> I changed the bargs option to "-A -H -P" instead of "-A -H -P -S". Memory pressure is greatly alleviated upon restart. I'm going to do more testing, but I suspect this will fix my problem. Take this as a PSA for chyves users.
> 
> 	- .Dustin
> 
>> On Dec 1, 2017, at 11:56 AM, Peter Grehan <grehan at freebsd.org> wrote:
>> 
>> The -S flag to bhyve wires guest memory so it won't be swapped out.
>> 
>> later,
>> 
>> Peter.
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2202 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-virtualization/attachments/20171201/ed7fd63a/attachment.bin>


More information about the freebsd-virtualization mailing list