Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Performance issues when passing through entire nvme controller

Featured Replies

Hi!
I have just installed Win 10 Pro as a VM in unraid and have done a passthrough of the entire nvme controller that my Samsung 970 Evo m2 drive is attached to. It works, but the disk performance is horrible.
Do you have any tricks for fixing such performance issues when a whole controller is passed through?
Windows detects my SSD as the Samsung SSD 970 EVO 500GB. Looks as it should.

The storage controller is "Standard NVM Express Controller", this I'm not really sure about..
I have a ASUS Rog Strix B350-F and I don't know how to install another driver as I can't installl the motherboards drivers because this is in a VM and a virtual bios..

Help?

  • Author

Now I've also installed Samsung NVME driver and the io performance is still really poor.
The vm is good in other terms, but I need to fix this io performance issue...
Every tip is appreciated!

Edit:

Ran AS SSD and here is what I got:

Read / Write:
SEQ: 2352,81 MB/S 2322,20 MB/S

4K: 16,96 MB/s 21,22 MB/s

4K-64Thrd: 636,29 MB/s 640,93MB/s
Acc.time: 0,174 ms / 0,184 ms
Score: 889 / 894
Total: 2234

 

Running the same hardware baremetal got this results:

Read / Write:
SEQ: 2767,36 MB/S 2411,06 MB/S

4K: 49,44 MB/s 98,08 MB/s

4K-64Thrd: 1192,80 MB/s 2145,23MB/s
Acc.time: 0,056 ms / 0,039 ms
Score: 1519 / 2484
Total: 4770

 

Looks like the 4K read / write suffers most.
Also the vm is a bit "sluggish" in the responsiveness compared to bare metal.
I am passing through a Nvidia GTX 1660 Super and it works perfectly, with
correct nvidia drivers installed.
It's not the GPU that makes the gui feeling slow, it is something else.
When running baremetal an explorer window just opens in the same millisecond
as I press the button to open it, in the vm it takes 2 seconds before it is done and
has opened it.

As I said, I'm passing through the entire nvme controller and also the gpu to the vm, so
the vm should have the best enviroment to perform well. I also don't run anything else
in unraid, except unraid itself.

Edited by widdefmh

  • Author

Well, after a lot of googling I can answer my own question.

For me, this did the trick:

To my domain tag, add xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'

so it looks like this:

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

And in the end om the domain tag (in the bottom of the xml), add this:

<qemu:commandline>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='host,kvm=off,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_vendor_id=Microsoft'/>
  </qemu:commandline>


After adding this I get the following results in AS SSD:

 

asssd.png

 

Very close to bare metal performance!! And my vm is blazing fast! Can't tell I'm running in a vm or bare metal!

I get a warning in the logs: This family of AMD CPU does not support hyperthreading(2) but does not seem to have an effect,

 

 

I have also tweaked the following tag:

<clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='yes'/>
  </clock>

where i changed hpet to yes to get the cpu down a bit in idle mode.

 

Hope this can help anyone else that have performance issues in a vm and where the vm feels slow and sluggish. Like night and day here now.

Edited by widdefmh

Thanks man, will have to try this out in both my Windows vm.


Sent from my iPhone using Tapatalk

  • Author
23 hours ago, perhansen said:

Thanks man, will have to try this out in both my Windows vm.


Sent from my iPhone using Tapatalk

Try it and please comment how it went. :)
I have also ran the MSI Util and checked my GPU in that software.

For me, it is like night and day in performance. I really can't tell that my OS is virtualized. Works great!
:)
EDIT: Worth to mention is that I'm running Unraid 6.9 Beta 22 where cpu governor is set to On Demand by default
instead of power save. This will probably fix some performance issues as well.
If you don't run Unraid 6.9, download TipsAndTweaks plugin and change cpu governor to On demand if that isn't the current mode.

Edited by widdefmh

  • 9 months later...
On 7/5/2020 at 7:30 AM, widdefmh said:

Well, after a lot of googling I can answer my own question.

For me, this did the trick:

To my domain tag, add xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'

so it looks like this:


<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

And in the end om the domain tag (in the bottom of the xml), add this:


<qemu:commandline>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='host,kvm=off,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_vendor_id=Microsoft'/>
  </qemu:commandline>


After adding this I get the following results in AS SSD:

 

asssd.png

 

Very close to bare metal performance!! And my vm is blazing fast! Can't tell I'm running in a vm or bare metal!

I get a warning in the logs: This family of AMD CPU does not support hyperthreading(2) but does not seem to have an effect,

 

 

I have also tweaked the following tag:


<clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='yes'/>
  </clock>

where i changed hpet to yes to get the cpu down a bit in idle mode.

 

Hope this can help anyone else that have performance issues in a vm and where the vm feels slow and sluggish. Like night and day here now.

It worked, thanks! And where did you find the answer? (just curious, Im noob😂)

  • 3 years later...

I did the tests and everything is necessary, coincidentally I have the same NVMe 970 and it is totally necessary to install the driver

 

Thanks.

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.