Gaming on my NAS seems inadequate, kindly point out weak spot


jang430

Recommended Posts

I am currently using Unraid 6.6.0, with the following specs:

 

Intel Xeon E3-1240v2, 16 GB memory, VM installed in cache, and my cache is a Crucial MX500, 1 TB SSD.  I passed through an Nvidia GTX1070 video card, via a x16 to x8 PCIE riser card.  I checked my motherboard manual, and it's PCIE 3.0 x8 slot. My motherboard has an Intel NIC, and conenected it to an HP Gigabit Switch.  My VM is running Windows 10, and I assigned 4 GB to the VM.  

 

I am using an Intel NUC to access my VM via wired Gigabit network.  I use moonlight.  

 

When I access my VM, the mouse lags, and it feels like it's running remote control.  You don't feel 'native experience.' 🙂  How do I improve on this?

Link to comment

How many cores you have assigned to the VM? 4GB for gaming isn't really that much. Sure depend on the games you're playing. For example an extremly stripped down Win10Prox64 i use for testing updates and Software is using around 2GB without doin anything. My main Win10 VM with all my software installed  is using 3+GB RAM already. Give the VM 8GB minimum if you wann play on it. There are a couple guides how to improve the VM performance in the forum. I think SpaceInvaderOne also did a great video on improving the VM performance. Maybe have a look into that. 

Link to comment

I assigned 2 cores, 2 threads to it.  The games I'm trying to play is Fortnite, and Tropico 4, via Steam, Cities Skylines Via Steam.  Of the 3 games, I think Fortnite has the most issue, as the later two games are not in any hurry :D .  I can bump it to 8 GB, but I'm not sure if that will improve my mouse response?

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='1'>
  <name>Windows 10 again</name>
  <uuid>3504bd7b-e5bb-828c-8e9d-aa680ef8a678</uuid>
  <description>test #2</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='5'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='7'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-3.0'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/3504bd7b-e5bb-828c-8e9d-aa680ef8a678_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='2' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/cache/VMs/Windows 7/vdisk1.img'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/iso/virtio-win-0.1.102.iso'/>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:ea:df:3b'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-1-Windows 10 again/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    </input>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x02' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>
 

Link to comment

Trying to run 2 different computers on the same hardware at the same time will cause bottlenecks...

One thing I can say about your games you listed is that they are CPU bound, and all want at least 4 real cores...

Adding a H.T. Core can usually be guesstimated to add 1/4 of another core, so a 4 core and 4 H.T. system will usually have the speed of a 5 core system with no H.T.

You are basically running games that like 4 real cores or more on 2.5 cores... IMO this is the most likely cause of you issues... City SkyLines in particular will gobble up pretty much all the CPU power you throw at it...

Windows also can run on 4GB's of RAM, but will start pagefileing most of the ram right after boot, and so I would expect even windows to have issues with this, let alone running a game on it...  (The recommended specs for Fortnite are 8GB's, though it does say the min spec is 4GB's)

 

One minor thing, you probably want to change your machine type from i440fx to Q35... But be careful, making that switch is like moving your hard drive to a new motherboard...  Backup first, and first boot will take forever while it re-installs all drivers...  This will eliminate some of the emulation overheard with running windows on a chip-set from the Pentium 1+2 era...

 

I think most of your issues boil down to needing to assign more hardware to the gaming side of your system...  And the sad recommendation is to get a better system...

Edited by Warrentheo
Link to comment

Hi @Warrentheo, thank you for your input.  I always thought though my games aren't in much hurry (except for Fortnite), it won't be CPU intensive.  Come to think of it, you are right.  Since simulation is being done, it will use up a lot of CPU power.  And I also agree 8 GB is required.  I'll try to assign 3 cores/ 3 threads to it, so at least I get around 3.5 cores :D . Is it safe to change VM to Q35?  Do I just select Q35, and save, and start?  I saw this from Unraid wiki- 

1703148952_ScreenShot2019-02-12at11_53_26.thumb.png.bd53f4836c09b1162aa2850e48080362.png

Is it still suggested?  If you're sayign Q35 is the newer system (chipset), then I'm all for it as well.

 

Link to comment

Switching from one to the other is like yanking the hard drive and putting it in a different motherboard... The i440fx is an ancient chipset for the Pentium 1+2 that never heard of a PCIe slot...  Backups should definitely be done, and when you switch it and try to boot, it will take forever to reinstall every single driver on the system...  While in my experience it usually works without issue, I won't be responsible if you skip the backups...  I also would not expect a major improvement over the i440fx since even though it is having to run additional overhead, it is not that major...  I mainly mention it because you and so restricted on the hardware you gave the VM...  I have noticed other compatibility issues that still makes it worth it, and the only downside was in the past the q35 hadn't had as much testing...  IMO there is no longer any reason for i440fx in windows anymore...

 

Q35-only features
● PCIe “goodies”
– Extended configuration space (MMCFG)
– PCIe native hotplug
– Advanced Error Reporting (AER)
– Alternative Routing-ID Interpretation (ARI)
– Native Power Management
– Function Level Reset (FLR)
– Address Translation Services (ATS)
● AHCI storage controller
● vIOMMU emulation
● “Secure” Secure Boot

 

Link to comment

Fortnite has no issues on 2 core machines.  I have 4 2CT/2SMT machines setup with fortnite and am not having any issues.  I assigned 10Gb to each VM and they all have a gtx 960 passed through.  They play smoothly and with no real detectable lag.  Fortnite isn't very intense requiring only an i3 cpu with a 4Gb Ram and integrated gpu for basics.  

Link to comment

Most likely you tried to just flip it in the VM settings, but the change is too much for the WebGUI or manually editing the VM's XML...  What you do is just create a new VM, but point it at all the existing image files, that will get all the sub devices sorted out correctly...  Be careful doing this though, when the new one is working and you delete the old one, it will try and delete the "old" images files at the same time...  One more reason to make sure your backups are up to date...  When you are all done, you can move the image files around manually to make it look like normal...

Link to comment
14 hours ago, jang430 said:

 

@jordanmw, then my question is, what is causing lag in mouse.  It's the main thing that annoys me.  I'm streaming 1080p.  I'm using wired 1 Gbe, my Intel nuc has Intel Nic, my switch is HP Gigabit switch, and my Supermicro board has dual Intel Nic, with only 1 nic being used.

I would say you should look at moonlight.  Try different clients and see if you have any better luck.  Plenty of people having issues with mouse lag in moonlight.

Link to comment
  • 4 months later...

I have a delay between moving the USB mouse, or a USB gaming controller (xbox pad etc) and it actually moving on the screen. The delay is small, probably 100-200ms, but its too much to be able to use the NAS as a gamimng PC.

 

For me, Fortnite runs at a locked in 60fps, that's the max my TV can display (old tv / no freesync), directly connected via HDMI.

 

No moonlight here. Still get a delay in the mouse movement.

Edited by jj_uk
  • Like 1
Link to comment
3 hours ago, jang430 said:

@jordanmw, you said you have smooth experience with Fortnite, what kind of graphics setting are you using?  1080p?  How many frames per second?  Are you play it with keyboard and mouse directly attached?  Or streaming?

Yeah- 1920x1080 framerates are 40-60 on my 960s- and 60-100+ on my 2070s.  I have a USB card with 4 separate controllers- each passed to their own VM.  No issues with input lag or stuttering.

Link to comment
53 minutes ago, jang430 said:

@jordanmw, is that via streaming too?  How do you access your nas?  Via another PC?

Nope- no streaming.  All machines are physically accessed.  The only streaming I do is from a shield with steamlink.  4 gamers in one room is what we do for our sessions.

  • Like 1
Link to comment

OK, I have Keyboard, Mouse, Monitor plugged directly.  Fortnite plays somewhat better.  But only at 720p, medium settings.  Can't get that 1080p, high settings at least.  I have 3 cores, 6 threads assigned to it.  With 8 GB.  I'm using GTX 1070, 8 GB.

Link to comment
On 6/23/2019 at 9:02 AM, jang430 said:

OK, I have Keyboard, Mouse, Monitor plugged directly.  Fortnite plays somewhat better.  But only at 720p, medium settings.  Can't get that 1080p, high settings at least.  I have 3 cores, 6 threads assigned to it.  With 8 GB.  I'm using GTX 1070, 8 GB.

Try adding the code below to above </domain> (i.e. at almost the very end of your xml).

Without this, your 1070 runs at PCIe x1.

<qemu:commandline>
    <qemu:arg value='-global'/>
    <qemu:arg value='pcie-root-port.speed=8'/>
    <qemu:arg value='-global'/>
    <qemu:arg value='pcie-root-port.width=16'/>
  </qemu:commandline>

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.