by datenwolf · 6y ago · 0 comments
Depends on how you use the OpenGL API. OpenGL display lists, once compiled, are extremly light on the connection. However they're also deprecreated and no longer supported in (forward compatible) OpenGL-3.3 core. But then again there's no 3.3 GLX specification.
As I understand it, when you open an OpenGL application inside Xvnc (et al) on :1, a shim is LD_PRELOADed that quietly redirects the OpenGL initialization calls so they create an offscreen buffer associated with Xorg at :0 (which is presumably sitting on a 3D-capable GPU).
Said Xorg can be displaying a black screen (or be being used for arbitrary purposes); no windows are ever displayed on it. Theoretically, avoiding compositing WMs may aid performance.
The graphics contexts should be well-contained on the host though. That the guest is leaking memory is kind of interesting.
It would be nice if there was a X11 "media" extension to transport encoded image streams (aka video) with server side decoding into Pixmaps, Xv or SHM buffers.
4k @32 bit color is ~3.5Gbit/sec at 60 fps or 1.6Gbit/sec for 30fps.
Modern video cards and CPUs are fast. With no optimizations I can screen grab a fully rendered X11 4k x 5 screen in ~100ms on i7-4790 CPU from a GTX 1060 ( did it yesterday when I discovered that Looking Glass does not support Linux guest). Some people that I know who are in the graphics business claim that using MIT shared memory extension they can do nearly 1000 fps for a single 4k screen.
Iperf (TCP) with no network optimization and no shared memory a-la Looking Glass between host and guest gets 2.5Gbit/sec.
Why not just do a PCI pass through to a virtualized ( or dedicated ) graphics card to guest, run an X server on it and stream raw frames from guest to host? It surely can do at least 30fps on a modern workstation or over a 10G network with no frame loss.
Because we're talking about remote desktop over low bandwidth connections. If push comes to shove you can use Xpra over dial-up.
Of course the more elegant solution then is to use some virtio based graphics pass-through driver doing all that, without running MIT-SHM screen grabber X11 clients shoving around frames. I want less kludges, not more.