Solved Performance of windows 10 vm under virtualbox and bhyve

I tried switching from virtualbox to bhyve (using vm-bhyve) for running a windows 10 vm and everything worked fine including audio input & output, good disk transfer and network speeds with virtio devices, etc. However, I could not manage to get the same performance that I get in virtualbox, specifically for some python scripts using excel workvbooks for data/calcualtions (the excel part comes from someone else, and I cannot get them to replace it with a better solution).

I noted the difference when each workbook took around 6-8 sec to process vs 4-5 sec in virtualbox (there are hundreds of workbooks and multiple iterations, so this makes a difference). I then ran some simple python loops and a cpu test tool to test the difference, and both took more time to run under bhyve than in virtualbox. Virtualbox vm's performace was almost at par with bare metal.

The vms guests and its software were identical; I could not figure out what is resulting in this difference. Are there bhyve options that I am missing?; I would really like to use bhyve instead of virtualbox if I can get the same performace. I am running FreeBSD 14.1 release with packages from the quarterly repos. My computer has a 10th gen i7, with 64GB ram.
 
Interesting. I had the opposite experience. I didn't do much, I needed a Windows VM to get into something at work, but the VirtualBox one was painfully slow. On Beehyve, it still wasn't great, but it was less painful. Note that in my case, it's a matter of opening an openvpn session, then firefox, and that's all I'm doing. I guess that isn't very helpful, but who knows, someone might come along looking for vbox vs bhyve, and find it slightly useful.
 
  • Thanks
Reactions: drr
Thanks scottro. I have seen posts from others too who have had better performance with bhyve than virtualbox. I have switched back to virtualbox for now, but I will try bhyve again when I get time to see if I can figure out what is happening. I am planning to investigate the following:
  • 10th gen i7 processors seem to have some performance issues in FreeBSD; I have heard this in another post where it takes too long to compile ports with this processor. I have access to another pc with a 9th gen i5 and I will try the same set up on that.
  • I have used a template from vm-bhyve and modified it, but I will use the bhyve command itself next time. Some examples show bhyve options like 'H', 'w' and 'P' for windows vms and I am not sure if vm-bhyve uses those.
 
Resurrecting my old thread. I ran bhyve (vm-bhyve) on three different computers so far, with an 8th gen xeon, 9th gen i5 and a 10th gen i7 processor, all with 32gb ram. Performance of windows vms was lower than that on virtualbox on all three computers. Could I be missing some configuration?

I have tried nvme emulation and virtio drivers, but bottleneck seems to be the processor performance. I use 4 cpus in the vms, with one socket, 2 cores and 2 threads and 8gb ram. Same configuration was used on virtualbox as well, for comparison.

I have swtiched to bhyve despite the performance drop, as it is easier to manage vms without needing a gui. I have also had success with PCI/gpu passthru in linux vms. I am currently running FreeBSD 14.3 on the host.
 
Thanks for testing and reporting back. I don't make heavy use of either VBox or bhyve with Windows, so can't give any clues, save to repeat what I said back in February, that for whatever reason, the few times I need Windows, bhyve was better for me. I only use 2 cpus (on an AMD with 16 of 'em) on a Beelink SER5. The performance wasn't earth shattering, but it was tolerable, that is, it is still kind slow, but tolerable. I think I've used it twice since the first part of the thread in February, as it's become easier to do various things in FreeBSD, and we haven't hired too many people (one use I would make of it was to test things that a new hire might need in Windows).
 
  • Thanks
Reactions: drr
Performance I am getting with bhyve is in no way bad; I am able to run everything I need with remote desktop (freerdp), including occasional sound/mic. As mentioned earlier, it does run slow with some spreadsheet based calculations, other than that the windows vm runs very well. It could be an issue with windows vms only; I have not compared linux/FreeBSD vms.
 
Back
Top