Jump to content
We're Hiring! Full Stack Developer ×

bastl

Members
  • Posts

    1,267
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by bastl

  1.     <disk type='block' device='disk'>
          <driver name='qemu' type='raw' cache='writeback'/>
          <source dev='/dev/nvme0n1'/>
          <backingStore/>
          <target dev='hdc' bus='sata'/>
          <boot order='1'/>
          <alias name='sata0-0-2'/>
          <address type='drive' controller='0' bus='0' target='0' unit='2'/>
        </disk>

    Your NVME is defined as SATA device. This isn't the best option. Virtio or SCSI have less overhead than SATA and the performance should be better.  But you can't switch to SCSI without installing the drivers first. Attach another dummy SCSI vdisk with 1GB in size and install the SCSI driver for it. After that you can remove the dummy disk and can change the controller type of your NVME to SCSI and it should find the driver for it. For Virtio you shouldn't need to install the driver, because you already did for your Games vdisk.

     

    Also change the following line in the XML after you did that


    before:

    <driver name='qemu' type='raw' cache='writeback'/>

    after:

    <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>

    This way trim operations within the VM will be passed through to the controller itself to handle the optimisations of the NVME/SSD. For that to work, you must enable the "defragmentation" in Windows and run the optimisation at least once and on a scheduled base. Without this a SSD or NVME will become slower and slower over time.

     

    Here is a example how the SSD I passed through is configured.

        <disk type='block' device='disk'>
          <driver name='qemu' type='raw' cache='none' io='threads' discard='unmap'/>
          <source dev='/dev/disk/by-id/ata-Samsung_SSD_850_EVO_1TB_S2RFNX0J606029L'/>
          <backingStore/>
          <target dev='hdc' bus='scsi'/>
          <boot order='3'/>
          <alias name='scsi0-0-0-2'/>
          <address type='drive' controller='0' bus='0' target='0' unit='2'/>
        </disk>

    I'am not exactly sure if this will work the way you passed through your NVME. My NVME where the OS is installed on is directly passed through like SpaceInvader showed in one of his videos. This should be the better option, so the OS has direct access to the NVME controller itself. This is how it looks like for my NVME:

    IOMMU group 45:	[144d:a804] 41:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961
        <hostdev mode='subsystem' type='pci' managed='yes'>
          <driver name='vfio'/>
          <source>
            <address domain='0x0000' bus='0x41' slot='0x00' function='0x0'/>
          </source>
          <boot order='1'/>
          <alias name='hostdev3'/>
          <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
        </hostdev>

    Try the first option first and see if the performance gets better.

     

    Another thing, where is your Games vdisk sitting on? On the array itself on a spinner? If so, what are your usual read speed on this disk? If I run Games from the array itself the loading times are really slow. If the game has to load new parts you can sometimes notice some lags. If other operations happens on that disk at the same time as you play, you might have worse performance. Therefore I have a full SSD passed through for games like showed before. Both of my disks are optimized (defrag) by windows itself and I never had any issues for almost 2 years now.

     

    grafik.png.5593a7933342da76c769bf456cc0cf84.png

     

  2. 5 hours ago, LiableLlama said:

    I'd recommend you adjust the CPU isolation for Unraid. And then to use those isolated cores for the Windows 10 VM. Leave all the other cores alone for the Docker containers aswell and just adjust the isolation for the first four cores. In my case it's 0-8, 1-9.

    Just to clear things up, isolating cores means you isolate them from unraid to use. Core 0 is ALWAYS used by unraid itself, no matter if you isolate them or not or using it by a VM or docker. Unraid will always use that core for itself.

     

     @thatnovaguy I have a 1950x and have the following cores isolated.

    grafik.thumb.png.c0ae3023878c13169ec875fefdf12fef.png

     

    All these cores are used by my main Windows 10 VM for almost 2 years now and I also use a 1080ti and a NVME in this VM. No issues or performance degredations so far. How much RAM do you have and how much is assogned to that VM?

     

    Edit:

    What does the Windows defragmentation tool shows you? And please post your xml of that VM.

     

     

  3. 1 hour ago, brinx said:

    However I cant install AMD ryzen drivers

    The chipset in the VM isn't a AMD chipset or Intel nor is it possible to directly set it to the exact one your board is using. Chipset drivers never will be installable inside a VM like on a bare metal system. So you loose some features like controlling your fan or RGB controllers, flashing BIOS with software from inside the VM etc. Most of the stuff you have to set in the BIOS (fan speed, RGB, OC etc.)

     

    EDIT

     

    check the clock speeds of your CPU if the VM is running with the following command on Unraid to see which core is running at which speed. The speed the windows task manager or other tools are reporting are wrong.

    watch grep \"cpu MHz\" /proc/cpuinfo

     

  4. If you have a mirrored cache with 2 SSDs you will be save if one drive fails. On an unassigned device this isn't the case. There is no option yet to mirror devices in an RAID using unassigned devices. If you only use 1 cache device you also don't have any safety. If the drive fails, your data is gone. Having a VM on the array with a parity of one or 2 drives you won't have the performanceas on a single drive, also to be mentioned, the array doesn't support SSDs. You can use them in an array, but TRIM won't work and the drives will get slow relativly quick if you have lots of r/w operations on it. There are a couple options to backup your VMs. There are scripts available you can use to backup the vdisks and the xml of the VMs on a scheduled plan or you use a BTRFS formatted drive hosting the vdisks and use the BTRFS snapshot feature to "backup" your vdisks.

  5. You can give a VM a dedicated SSD via passthrough so it can utilize the whole disk. No other VM/docker is able to use it than, also unraid can't use it. This is one option, if you want a VM with a "real" harddrive/ssd. The question is, is a VM working with a OS already installed on that SSD before? For example let me explain my switch to unraid. I'am using a 16core AMD TR4 chip and had a Win10 installed on an NVME drive. After stumblin across Unraid and playin around with it, the first try passing through that NVME to Windows VM workted perfectly fine. Drives recognized and windows booted from it. In an worst case scenario where unraid won't boot up, I still can boot directly from that NVME and have my main system. I never did that with a "real" Linux install, passing that drive to a VM. You might run in some driver issues.

     

    Other option is to have a vdisk sitting on the SSD used by the VM. Doesn't really matter if the SSD is used as a cache drive or a unassigned device, the performance is almost the same as in a real system. Keep in mind if it sits on a cache drive, copying files to unraid and having a VM running at the same time are multiple operations at the same time and can slow down the r/w performance in parallel operations.

  6. For crackling sound, mostly happens on GPU passthrough with HDMI audio there is a fix. Search for "MSI util" in the forums or for crackling sound fix and you will find the tool. I don't know if there is a solution for MacOS, but that tool works for windows just fine.

  7. Sounds like a power saving issue in your VM. Set your power plan to high performance in the VM and try again. Windows on default powers down unused devices after a while to save energy. USB devices and harddrives are goin to a "sleep" state and can cause that issue. Connected devices like USB thumbdrives or hdds rarely have issues with this, but some USB splitters or external sound devices won't wake up again.

    • Upvote 1
  8. VNC doesn't transfer sound neither emulated nor hardware sound. RDP and Nomachine are the only ones i know where you can use sound. Nomachine itself installs its own virtual soundcard if I remember correctly and RDP is emulating one too. You don't need to specify/change anything in the default xml unraid creates to use it.

  9. You might wait till the next platform releases, to see which new features they offer which are missing on x399. I guess PCIe 4.0 is one of it, maybe onboard 10gig nics and the amount of PCI lanes are a important info for the future x499/x599 we are missing right now. Also the TDPs of the next Threadripper chips I'am kinda curious. On older boards the VRMs might not be enough to handle high core count next gen TR4s. Better wait for the first boards and tests.

  10. You can mount it to a Linux VM and try to recover important files if you need to. Recover a corrupted vdisk file itself, I don't know if there is a way. If you aren't able to mount the vdisk to a VM and can't access the filesystem, the chances are really low to get any data back.

     

    For the future, here is a easy way to backup your VMs via script. Have a look into it. I'am using Jtoks script over a year now and it just works. If you need to recover a VM just replace the vdisk with the file from the backup. With the plugin userscripts you can run the script automated every day, week or how you like. Add the path where to store the backup, the name of the VM you wanna backup and some options for example how many backups to keep, reset state of the VM after the backup, compression etc.

     

    https://github.com/JTok/unraid-vmbackup

     

     

  11. Inb4 you screw up something, make a copy of the vdisk. Did you updated something on Unraid lately or did you changed anything hardware related? If nothing changed, no new devices, no updates to unraid the chances are high the vdisk has some errors on it or your hdd hosting the disk has some issues.

     

    How full is your disk where the vdisk is sitting on?

     

    If you have another windows VM, you can temporarly mount the vdisk as second drive and can check if you can access the filesystem or you can run a chkdsk on the filesystem to repair files if there are some.

    chkdsk Z: /f /r /x
    
    replace Z with the drive letter

     

  12. The newly created VM, set it up with only one core and check if it boots up now. You can change back the core assignment later. Sometimes on a fresh install of Windows, people encounter that issue. Did your VM upgraded from 1803 to the latest Windows 1903 maybe???

     

    Another cause could be your vdisk is faulty. Do you make regular backups of that file and can revover from a backup?

×
×
  • Create New...