FreeNAS 11.3-U2 bhyve Windows 10 guest performance

bal0an

Explorer
Joined
Mar 2, 2012
Messages
72
I am on a quest to improve performance of my Windows 10 1909 guest on FreeNAS 11.3-U2. My guest runs on:
  • Intel Core i5-6500 3.2GHz, 4 Cores, 32 GB RAM
  • Samsung 860 EVO SATA SSD
  • FreeNAS 11.3-U2
VM specs:
  • 2 Cores, 4 GB RAM
  • Virtio HDD, 4k volblocksize
  • Virtio networking
  • Windows 10 Pro 1909
  • Used via Microsoft RDP client and VNC Console
Measures already taken (also see here):
  1. Using VirtIO for storage and network. I've set up Windows with the virtio drivers mounted on a second CD drive, then loaded the drivers before partitioning.
  2. Cloned storage to 4K blocksize using zfs create -V 40g -o volblocksize=4k ssd850/SPF1X-4kblk and dd if=ssd850/SPF1X-16kblk of=ssd850/SPF1X-4kblk
I have tested my guest with UserBenchmark and found no measurable improvement so far. The benchmark shows an issue with 4k read and mixed memory access performance.

Windows 10 1909 userbenchmark - 4k zvol blocks.png

I found another performance hint on a FreeBSD forum about the CPU setup to use cores instead of sockets.
Ok, my problem was partly solved by adjusting the bhyve -c value. It turns out, when you pass on -c [>1], Win 10 will understand it as the number of CPUs being more than 1... which it doesn't support, does it. So the right thing to use is bhyve -c sockets=1,cores=2,threads=2. That will give Windows a pretty standard 1 CPU 2 core 4 threads with HT enabled. Now just for experiment's sake I made a separate Win 10 Pro installation using virtio-blk but cannot say whether it outperforms the older one with ahci-hd. Now that I'm using this optimized CPU setting (+6G RAM given it) together with NIC passthrough, it really is quick enough.

When checking my Task Manager CPU page I can see 2 sockets. In order to try out a 1 socket 2 core setup I'd need to change the VM setup in the config file as changing -c options is not possible from the FreeNAS webui.

Who knows how to accomplish changing the bhyve -c setup in FreeNAS?
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
2 Cores, 4 GB RAM
4GB of RAM is the first thing (maybe the only one) you need to change... 8GB is an absolute minimum in Win 10 for reasonable performance... 10GB or more to get good performance (basic tasks).

I found another performance hint on a FreeBSD forum about the CPU setup to use cores instead of sockets.
I doubt that will do much... I get perfectly acceptable performance as it is already with the GUI setup.
 

bal0an

Explorer
Joined
Mar 2, 2012
Messages
72
While the VM sits idle - or runs UserBenchmark - only 2GB of the 4GB are in use, 2GB are flagged as free (sic!). I had the VM configured with 8GB as well, but there was no difference in performance. I am aware that not enough RAM may lead to swapping and seriously affect performance but that is not the case here.

Can you explain why you think the VM should be faster with 8GB RAM when not even 4GB are fully used?
 
Top