Linux desktop performance through SPICE

LogicalUnit

New Member
Nov 18, 2023
14
0
1
Hi everyone,

I am experimenting with desktop Linux distributions eg Ubuntu and Mint on my Proxmox node. I would like to use my Windows gaming PC as a thin client to connect to the VMs. It's all set up and working through SPICE, but performance isn't great. Watching a YouTube video stresses all 4 virtual cores to about 80%. The mouse pointer is laggy, graphics and audio also stutter.

My hardware is a Dell Optiplex 9020 with 16GB RAM and 500GB HDD.
4 x Intel(R) Core(TM) i5-4590S CPU @ 3.00GHz (1 Socket)

I have activated IOMMU and passed through the Integrated Intel Graphics device (I note the VM sees two graphics cards: the virtual one and the passthrough one)

Any ideas how to improve this? I would be willing to try a Linux device eg Raspberry Pi as my SPICE client instead of the Windows box.


2023-11-24 17_56_28-VM 116 - Mint (1).png
2023-11-24 18_13_13-.png

2023-11-24 18_10_26-proxmox - Proxmox Virtual Environment.png
 

Attachments

  • 2023-11-24 18_02_12-VM 116 - Mint (1).png
    2023-11-24 18_02_12-VM 116 - Mint (1).png
    615.1 KB · Views: 13
I am experimenting with desktop Linux distributions eg Ubuntu and Mint on my Proxmox node. I would like to use my Windows gaming PC as a thin client to connect to the VMs. It's all set up and working through SPICE, but performance isn't great. Watching a YouTube video stresses all 4 virtual cores to about 80%. The mouse pointer is laggy, graphics and audio also stutter.
I'm seeing the same 4 cores at 80% but it works without any stutter/lags (at 1280x1024) with Ryzen CPU with 8 cores or more.
My hardware is a Dell Optiplex 9020 with 16GB RAM and 500GB HDD.
4 x Intel(R) Core(TM) i5-4590S CPU @ 3.00GHz (1 Socket)
You only have 4 cores, so the software rendering of SPICE (and other virtualization overhead) is simply asking too much from your CPU.
I have activated IOMMU and passed through the Integrated Intel Graphics device (I note the VM sees two graphics cards: the virtual one and the passthrough one)
I'm almost sure that SPICE does not use a passed through GPU at all but maybe it helps the browser? Do you see a lower CPU load with Youtube?
Any ideas how to improve this? I would be willing to try a Linux device eg Raspberry Pi as my SPICE client instead of the Windows box.
Use the physical output of the GPU (and set Display to none) to have Ubuntu use the passed through GPU for the desktop graphics..
Or use something else for remote viewing (Parsec, Steam Link, ...), but I don't think your CPU has the spare performance for it, sorry.
 
Last edited:
Thanks for the reply.

Can you help me understand something? Is it possible to do the rendering on the passthrough hardware, and then display the result over SPICE?

I have Steam installed on my Windows PC, and I can stream the graphics to my Raspberry Pi running SteamLink. The GPU on the Windows box is doing the actual rendering, but the result is being streamed to another device. Can something similar be done on Proxmox to improve performance?
 
Can you help me understand something? Is it possible to do the rendering on the passthrough hardware, and then display the result over SPICE?
You could try VirGL: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#qm_display . I did not have the best results when watching movies via VirGL and SPICE but maybe it works for you.
I have Steam installed on my Windows PC, and I can stream the graphics to my Raspberry Pi running SteamLink. The GPU on the Windows box is doing the actual rendering, but the result is being streamed to another device. Can something similar be done on Proxmox to improve performance?
Maybe passthrough a GPU (integrated graphics is often problematic) to your VM, set VM Display to None to force the use of the GPU as main display (even though it might no be connected or use a dummy plug to fake a display). And then use Steam Link (or Parsec or something like that) to stream it to a simple VM with SPICE?

Your hardware is rather limited in cores and graphics, why add the overhead of Proxmox and virtualization, especially if each VM needs all your CPU? A setup like Steam on a PC (maybe dual boot Windows and Linux) and streaming it might be a better fit for your use case.
 
If you're using an iGPU (and assuming you have definitely successfully passed it through) you'll probably get better luck using XRDP as long as you are in an X11 session. (There's a script you can use here - https://www.c-nergy.be/products.html )

But as a forewarning, I've found trying to get smooth rendering in Linux as far as remote desktop options go is very limited in general

The main issue really is that most RDP sessions in Linux are based on VNC and in general it has terrible performance. With Wayland being somewhat forced into maturity there's a few new solutions on the horizon though - (KRdp in Plasma 6 looks very promising so far as an example).

If you're just setting this up as a dev box, I'd go baremetal linux instead of running Proxmox on it, that 9020 isn't exactly a powerhouse so multiple VMs (at least with GUI) is going to be a big ask.

A USB hub switch and an HDMI switcher will let you flick between your Linux box and your Windows rig with ease.

Otherwise that 9020 is definitely strong enough to run a few headless VMs or containers if you're happy to get comfy with a terminal instead.