Accessing unRAID GUI causes VM stutter


Recommended Posts

Hi,

 

I have a weird issue that I cannot resolve.  I have my living room TV displaying a VM on my unRAID server which is running LibreELEC. It is playing media that is on the same server. Media is spread across many different disks. 
 

My Server Hardware is:

 

M/B: Supermicro X10SL7-F Version 1.01 - s/n: NM149S013462

BIOS: American Megatrends Inc. Version 3.2. Dated: 06/09/2018

CPU: Intel® Xeon® CPU E3-1241 v3 @ 3.50GHz

HVM: Enabled

IOMMU: Enabled

Cache: 256 KiB, 1024 KiB, 8192 KiB

Memory: 32 GiB DDR3 Single-bit ECC (max. installable capacity 32 GiB)

Network: eth0: 1000 Mbps, full duplex, mtu 1500 

 

No other VMs are running and I don’t have a great deal of resource intensive Dockers running either. 

 

The VM is stable as. Plays 4K video perfectly even while a couple of other clients are streaming transcoding etc. The VM is allocated 6 of 8 cores and 8GB RAM.

 

That is, until I access the unRAID GUI. When I do that, the video playback / VM stutters for 2 seconds. 
 

I've observed a spike in CPU usage briefly in one or two of the cores at the same time but nothing on all of them and not to 100%.

 

I thought it might be due to the Cache disk also running other dockers and IO usage so I switched it to a SSD outside of the array on UAD. No difference. 
 

Weird, it only happens on The Dashboard and Main Tabs. None of the others. 
 

There is absolutely nothing in the logs and I have trawled the diagnostics. Ive tried different video from each disk of varying size and type. I’ve disabled all dockers and plugins and just run the VM and still, when I access the unRAID GUI the VIdeo stutters. Similarly, I’ve stressed the server to the point of overload and with my settings the VM plays perfect until I access the GUI then stutter. 
 

I have no idea how to progress this. 

Link to comment

@danioj @jonathanm I notice the same and I think I already reported it back on one of the 6.7.x releases. Can't remember which one it was. My main VM is a 12 core 24 threads 16GB VM (half of a 3960x, 64GB) with a dedicated NVME, GPU, USB. In general the VM runs absolutly perfect, except of the mentioned issue. I can manage Unraid fine within the VM but as soon as I open the dashboard videos played in the VM starts to lag, audio plays fine. It only happens on the dashboard. It's not big of a deal and I already forgot that issue, because I rarely visit the dashboard. Same issue I had on my older TR4 system.

Link to comment
On 6/6/2020 at 10:48 PM, jonathanm said:

As a test, back that down to 2 of 8 and see how the VM performs.

Woah, that worked. No stutter. Its not like the VM was using that many Cores even though it had them allocated and there were at least 2 allocated to unRAID. Surely unRAID doesn't need all those 6 cores not allocated to the VM.

 

Is this a known bug?

Link to comment

You could be getting the stutter because the system is temporarily locking up in the kernel as all the drives are being spun up to populate the Main or Dashboard information.   If you have manually spun up all the drives before trying to access those tabs do you still get the stutter?

Link to comment

 

13 hours ago, danioj said:

Surely unRAID doesn't need all those 6 cores not allocated to the VM.

 

 

No, but the VM sure appreciates being run on a faster system. Think of the KVM host as the motherboard. If you have a slow board, the fastest CPU and huge amounts of RAM don't help. VM's rely on their basic services to be programmatically emulated (created on the fly) by the host. Choke the host, the VM suffers.


All these folks trying to absolutely maximize the amount of resources they allocate to their VM guests are shooting themselves in the foot. For tuning purposes, give the VM the absolute bare minimum it needs on the box spec, and slowly add more until performance no longer improves. The basic I/O for the VM is all being handled by the host, and as is obvious to anyone who has swapped out an old spinner hard drive for a SSD in a bare metal box, I/O is pretty much the limiting factor in how fast a machine feels. Adding CPU horsepower and extra RAM doesn't help at all once the basic need for them has been met.


All the RAM and CPU you allocate to the VM are locked away from helping the host perform, pretty much being wasted. Linux does a really good job with "extra" CPU and RAM, it's a whole lot better to let the host have them.

  • Like 2
Link to comment
On 6/10/2020 at 10:34 PM, jonathanm said:

 

 

 

No, but the VM sure appreciates being run on a faster system. Think of the KVM host as the motherboard. If you have a slow board, the fastest CPU and huge amounts of RAM don't help. VM's rely on their basic services to be programmatically emulated (created on the fly) by the host. Choke the host, the VM suffers.


All these folks trying to absolutely maximize the amount of resources they allocate to their VM guests are shooting themselves in the foot. For tuning purposes, give the VM the absolute bare minimum it needs on the box spec, and slowly add more until performance no longer improves. The basic I/O for the VM is all being handled by the host, and as is obvious to anyone who has swapped out an old spinner hard drive for a SSD in a bare metal box, I/O is pretty much the limiting factor in how fast a machine feels. Adding CPU horsepower and extra RAM doesn't help at all once the basic need for them has been met.


All the RAM and CPU you allocate to the VM are locked away from helping the host perform, pretty much being wasted. Linux does a really good job with "extra" CPU and RAM, it's a whole lot better to let the host have them.

This was  a very interesting and informative post.  So much so that I think it is a candidate for a sticky.

 

My big take away from this is that really is no "minimum hardware requirement" for unRAID when you are utilising much of its virtualisation activities and have also added various plugins.

 

Using your advice, I found the "Sweet Spot" for my configuration which means the VM didn't stutter and the host has more than enough resources.

 

Thanks for your help.

Link to comment
  • 2 months later...
On 6/13/2020 at 7:38 PM, danioj said:

This was  a very interesting and informative post.  So much so that I think it is a candidate for a sticky.

 

My big take away from this is that really is no "minimum hardware requirement" for unRAID when you are utilising much of its virtualisation activities and have also added various plugins.

 

Using your advice, I found the "Sweet Spot" for my configuration which means the VM didn't stutter and the host has more than enough resources.

 

Thanks for your help.

 

I know this is a few month back but I'm setting my server up and looking at these things.  When your system was stuttering, could you see that in the CPU usage on the dashboard? For instance if you had 2 cores dedicated to Unraid, did you see them spike or anything like that?

 

I have a 12 core xeon 2690v3 (24 with hyperthreading) and I have 10 cores dedicated to VM and 2 to Unrais (plus their hyper counterparts) as well as 18GB of RAM to w10vm and 14GB to Unraid. I'm not having any stuttering issues or anything and on the dashboard the CPU/RAM usage is real low even with only 2 cores + hyper.  But I'm wondering if my VM would perform better for gaming if I gave Unraid a little more core? I think Unraid has plenty of RAM, I might could even give more RAM over to the VM but I'm more questioning the CPU since I've not given it a whole lot.

 

I dont have much going on in Unraid, even with Plex, I have the media in Unraid but all the work is being done on a Shield TV so the Shield is actually doing all the transcoding. I pretty much just have Sonarr, Radarr, Lidarr, SAB, NBZget and occassionally use MakeMVK.  Aside from those, it just site there as a file server. Once I took Plex off of it I figured I can use a lot more resources for a gaming VM.....but I want to find the proper balance.

Edited by SPOautos
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.