Thinlinc - TigerVNC performance optimisations

Are there are performance tweaks for Thinlinc and TigerVNC ? Atm its all default settings so I’m curious if there’s any tweaks that can improve the performance further esp for GPU based workloads.

I’ve been working on XRDP and came across a few tweaks to XRDP (Xorg sessions) which improved the overall performance esp when compared to XRDP with VNC session.

Which tweaks specifically did you make to XRDP?

Some of the settings are OS and not XRDP specific:
Problem: By default, xRDP kills sessions when connection drops (KillDisconnected=true).

/etc/xrdp/sesman.ini

KillDisconnected=false # Don’t kill sessions on disconnect
DisconnectedTimeLimit=0 # No timeout (infinite reconnect window)

Problem: Default buffer settings in xrdp.ini are too small or commented out.

/etc/xrdp/xrdp.ini

tcp_send_buffer_bytes=4194304 # 4 MB
tcp_recv_buffer_bytes=4194304 # 4 MB (often commented out by default!)

**
Problem:** TCP slow start kicks in after idle periods, causing lag when resuming work.

Solution:

net.ipv4.tcp_slow_start_after_idle = 0

Problem: xRDP requests 4MB socket buffers, but Linux default wmem_max/rmem_max is only ~200KB. This causes “trans_write_copy_s failed” errors.

Solution:

# /etc/sysctl.d/99-xrdp-buffers.conf
net.core.wmem_max = 16777216    # 16 MB (was 200KB)
net.core.rmem_max = 16777216    # 16 MB (was 200KB

And xrdp.ini - setting crypt_level = low from:

Hi @Harj,

ThinLinc has similar settings, but by default sessions will not be killed when disconnected. So unless you’ve changed this default, it should be fine.

ThinLinc doesn’t have an equivalent here, but that’s because we rely on system-level settings instead. So the net.core.wmem_max and net.core.rmem_max settings you mention below will have the same effect, as should the other system-level tweaks you mentioned.

Whether this will actually solve the performance issues you’re seeing or not depends on where the bottleneck is. In general, for GPU workloads, the bottleneck is often the CPU, as this is necessarily involved in shuffling data back and forth between the GPU and the session itself (at least until Wayland support arrives). If this is the case, then unfortunately there’s no simple tweak available to mitigate this.

Hope that helps.

Performance is good for TL, I was checking to see if there were any similar tweaks and settings specifically for TL/X11 etc that could help improve it further.

Patchy GPU performance with Nvidia GPU under Linux - at least with EL9.x from my own testing I think is 100% Nvidia Drivers linked. I’d like an Intel AMD GPU to test and compare.

With GPU workloads, high CPU clockspeed is always king but having a GPU that is actually being utilised properly always helps.