Is Windows 10 Better For Gaming

0 views
Skip to first unread message

Lilly Solo

unread,
Aug 4, 2024, 10:11:34 PM8/4/24
to giedisxiti
Iam running a Windows VM, which I use for simple windows stuff as well as a gaming machine to gamestream from my Unraid server to light-devices in other rooms. I play both windows games (Forza Horizon) as well as dolphin emulator games (all streamed from my VM to devices across the house). My specs are as follows:

Docker and Unraid performance seems flawless. Gaming performance is good, but not perfect. I am aiming for 1080p/60fp. Particularly emulator games (dolphin) face occasional stutters or low frame rates. I am thinking of ways how to improve?


Make sure the VM is set to Q35-3.1.0 in the Unraid 6.7.0-rc2 or Q35-3.0.0 if you want the Unraid 6.6.6... I had several issues when using the Unraid default of i440fx, some are performance related, some compatibility issues... This is because the i440fx was an ancient chipset for the old Pentium 1+2 that knew about old PCI and AGP slots... and so has to translate everything PCIe into PCI, and other translation overhead... The Q35 chipset actually knows about PCIe, and so skips all this... Not as major as that sounds, it is still fairly fast, but it is noticeable, and as I said, it had compatibility issues for me, especially with UWP apps...


This is a minor speed up, and on some file operations actually slows things down, but allows Windows to pass the TRIM commands all the way down to the actual SSD you are running on... This also shrinks VM image files, which for me actually speeds things up quite a bit... Full SSD's start slowing down alot, and so this is mainly a slowdown prevention measure...


Probably the main thing is knowing how your processor works, and making sure you pass CPU cores in a way that makes sense for your CPU... Let Unraid as well as the overhead from running KVM/Qemu run on its own core (Core 0)... Don't do something silly like passthrough only the hyper-threading cores and all the main cores to a different VM or something else like that...


These make sure that KVM/Qemu share the primary core with the rest of Unraid, tell windows about what your CPU can do (potentially some good improvements here) and the info from your Motherboard BIOS and not the fake info from KVM/Qemu...


What I meant by that was no baremetal, run off of raw img files (again QCOW2 kills performance, avoid like the plague)... There really is no reason to run baremetal, since leaving it as Unraid cache lets all read/write performance to the host to be much faster usually... There will be minor times where this could be less than ideal if you are running something along the lines of a 300 thread BitTorrent share off the same drive or something else that constantly thrashes the drive... This will kill the VM with micro-stutters and other issues...


And because I don't passthrough, docker containers can share it also just fine... It all really depends on the situation, but if you don't have any one thing that wants to max out the drive, it is best to share its performance with as many things as possible... You can have hundreds of bad blocking file ops on an SSD drive before you start competing with the time you have to wait for one normal read on a platter based setup... Hundreds of thousands if you have a good NVME with command queuing in Raid-0... Spread the love around as best you can...


1) 2xNVME in Raid-0 cache drive - I have two NVME as well. Only one is a cache device. The other one is assigned as an unsassigned device. Do you see an advantage of using raid0 vis-a-vis my setup. I thought that mine give me the same speed and I'd only lose one of the NVME device data if a drive fails (vs. both if setting them in raid0 mode). I also thought that my setup would have a speed advantage over a raid0 setup. Only draw-back of my setup is that the vdisks cannot span over two disks, which I wouldn't mind. Anything I am missing and what's the reason why you chose a raid- setup?


2) My VMs are set for i440fx. Let me try to switch them to Q35. I haven't tried this, but should be an easy change. It may also solve one issue that I have been seeing. I tried to add a second vdisk (to put my games on an array drive as game folders may not need an SSD and I have plenty space on the array), but this failed due to some incompatibility issue.


3) SCSI driver: you referring to setting to SCSI instead of VirtIO? If so, can I just switch this in the VM settings? Does the "discard setting" require me to manually change the XML file. I prefer not to manually change the XML as all changes to the XML gets lost when I change ram allocation (and I don't want to remember to redo all XML changes manually each time I change ram allocation). Assume no work-around for this?


4) CPU pinning: I have now isolated cores 2-5 and HT 8-11. And pinned all dockers to cores 0-1 / HT 6-7. One VM uses cores 2-5 / HT 8-11, the other VM uses core 4-5 / HT 10-11. The first one is used for gaming, the second for low-intensity tasks. Does this read like the best setup?


1) I have a setup with a single nvme as a cache drive for a couple VMs and dockers and another NVME passed through to my main Win10 VM for daily use. The advantage is that none of the dockers or other VMs in case they do heavy reads or writes on the cache affecting my main VM. Another advantage is, in case my Unraid USB stick dies i can switch the boot order in the BIOS and can boot straight from that NVME.


2) For me i'am using the i440fx machine type for my VM since the beginning and i never saw any advantages over the Q35. Maybe something changed in the last half year. Worth a try to test again. For my main VM i have an extra SSD attached for mainly games that i play from time to time and an extra network share connected, sitting on the array for older Games. I didn't had any issues with steam so far running games from a network drive except it's way slower to start them. Map your share in the VM and set it as second library folder in steam and you can transfer the games in case you need them from the network share to the local drive.


3) You can't switch to SCSI. You have to install the driver first in the VM. Easy way is to add another drive to the VM lets say 1GB in the GUI of the VM settings, mount your Virtio Driver Iso to the VM, start it up and check your device manager in Windows and install the driver from the mounted ISO. After that you can shutdown the VM, remove the 1GB temporary drive we created earlier and switch your main drive to SCSI. It should now use the driver you installed before. The unmap setting you have to do manualy in the XML.


Keep in mind every OS is doin stuff in the background. Random OS updates (fu MS ?), virus scans, file integrity checks etc. They all can affect the performance of another VM using the same cores at the same time. Shut down the light weight VM if you don't use it while gaming or separat the cores from the gaming VM.


5) All these edits are made in the XML view. Why are you changing the RAM allocation at all? 16GB for the gaming VM should be enough, 4-8GB for the second VM should be also enough for lightweight use and you have 8-12GB left for Unraid itself. Depends on what else is running on Unraid, lets say tons of docker containers you might have to give Unraid more. I never changed the RAM allocation at all for my VMs. Set it and forget it. A couple of settings you make in the VM settings tab don't reset the custom edits btw. I think since version 6.6 limetech changed something to make the custom edits more persistent. What i always do is to save the XML content before i make some edits and compare them afterwards to make sure my custom settings aren't lost.


6) I also have 64GB of RAM available and using 16 for my main VM and 8 for the second one always running. From time to time i use 1-2 more VMs, mainly for testing but thats a rare case. The dockers I use (Unifi, Netdata, Nextcloud, Duplicati) aren't using that much RAM anyways. Can't tell what Sonar, Radar or Plex are using, but better have some spare ressources in case something needs it. In my case currently 32GB would be enough. With 3 Vms running right now I utilize 51% of my RAM.


re 1 - is there any other meaningful performance advantage of running bare-bone beyond a potential advantage when running other things at the same time? Let's assume I have two vdisks on one NVME and only one of them is active, would the performance be basically identical with running bare-bone?


re 2 - I just switched to QEMU. It didn't work as easily as the VM got stuck "updating", but it did work by creating a new VM based on th existing vdisk. As it may improve compatibility and you don't mention a downside, it seems like a no-regret to give it a try. Regarding the second half of your answer, how did you add the SSD and network drive? I've pointed Steam to it, but this created issues when using gamestream (which I ultimately do). Did you succeed to create a second vdisk on another disk? I am thinking that I could even have this second disk be the cache drive (still some space on it) or I could place it inside the array. I believe I had tried this before and once adding a second vdisk, the GPU passthrough no longer worked. I know that the two things shouldn't have anything to do with each other, but it was consistent. Also, I wonder whether it is smart to move a vdisk into the array anyways (even if just for "old" games). When moving my Windows VM vdisk to the array, it becomes insanely slow (night and day compared to having it as an UD or cache).


re 3 - Do both of you run it this way and is the improvement meaningful? It seems like a bit of work with some risk of breaking my VM. Also, the initial description said that it could even slow things down. Worth going this route?


The Q35 should have nothing to do with video limitations unless you are using a virtualized (Fake) graphics card or VNC... I passthrough an nVidia Geforce 1070, and have a dual G-Sync monitor setup connected to it, running at 144hz...

3a8082e126
Reply all
Reply to author
Forward
0 new messages