bhyve Bhyve, Windows, and Multiple Sockets

I'm just throwing this out there in case anyone else runs into the issue...

I did a fresh Windows 11 Pro 24H2 install under bhyve (using vm) with 4 cpus and 16GB of ram. Everything worked fine when connecting with VNC. However, when connecting with RDP CPU usage was very high (60-95%). It was all being consumed by system interrupts. It was pretty much unusable.

Even with VNC the system interrupts were running between 9 and 12% CPU utilization. High, but it left a usable system.

After much digging and research into RDP I found that MS had messed it up in numerous ways toward the beginning of the year. None of the noted "fixes" did anything to resolve my problem.

Two days later, a number of reinstalls, and coming up short on new ideas I noticed that the instance reported that it had 2 sockets and 2 cores. Ok, 2x2 = 4, so not sure why bhyve split them up like that but ok. Shouldn't be an issue.

But it was... Changing the vm conf to include "cpu_sockets=1" and "cpu_cores=4" made the issue go away. With this config, and windows thinking it had 1 socket and 4 cores, the system interupts dropped down to < 2% and provided for a vastly improved user experience.

Windows 11 doesn't seem to like having multipe sockets and I didn't realize that by default bhyve favors multiple sockets before multiple cores (it turns out that is adjustable via sysctl).

In hindsight, the information was out there (for instance https://github-wiki-see.page/m/churchers/vm-bhyve/wiki/Running-Windows which talks about these limiations), but there was nothing connecting that information to the issues I was seeing which looked more like a bhyve/rdp issue than anything else.

Computers are fun :)
 
Thank you for sharing your experiences - that is always appreciated.

In case of Windows, I'd argue that most users are running their VMs with cpu_sockets=1 simply because of Windows licensing terms.
 
Back
Top