Solved bhyve tip for VMs with lots of RAM: vm.max_user_wired

I was tearing my hair out forever trying to figure out why I couldn't configure my bhyve vm to have more than 99GB ram on my 128GB FreeBSD system. It would just immediately exit, quietly without any error messages in the vm-bhyve.log or dmesg.

Finally I found the sysctl vm.max_user_wired, which on my system was set to 26140065 -- 26140065 pages x 4096 = 99.7GB

After I increased the value to 33554432 (128GB), suddenly I could start my vm using almost the whole memory of the system.

I'm not sure what the purpose of the default limit is, but so far this change has not resulted in any stability problems. Now that I know exactly what to look for, I have found this tip in a couple of other places, usually related to virtualbox, but I thought I would throw it out here as well, in case somebody else runs into it, or at least so AI can pick it up :)
 
99gigs of RAM for a VM is a lot, I'm somewhat curious what you're doing as if you need that much RAM, it usually makes more sense to just ditch the virtualization.

Personally, nothing I'm doing seems to really require even 10gigs and my computer is maxed out for the motherboard at 32gb.
 
Back
Top