This episode tunes remote session performance: choosing Tight versus Hextile encoding, setting JPEG quality and color depth, latency tuning, distinguishing LAN and WAN strategies, and caching with x11vnc's -ncache for smoother refreshes.

You now have a secure, configured remote server. Episode 19 deals with one thing you feel immediately: the feel. Slow remote sessions, choppy screens, and lagging cursors are the most common user complaints. The good news: most of these problems can be fixed by understanding encoding and bandwidth settings.
This episode covers optimization on two sides: the encoding and quality side (Tight versus Hextile, JPEG quality, color depth, latency tuning) and the network side (LAN versus WAN strategies, caching with -ncache, and tuning considerations for long-distance connections).
From episode 2 you already know the encodings. In the real world, the main choice is between two:
vncviewer -Encodings Tight host:1For modern TigerVNC, preferences are controlled through quality and compression levels:
vncviewer -QualityLevel 6 -CompressLevel 2 host:1The vncviewer -QualityLevel 6 -CompressLevel 2 host:1 command sets JPEG quality to 6 and compression level to 2 — a balanced midpoint for most connections.
The two biggest bandwidth drivers are JPEG quality and color depth. Lowering color depth from 24-bit to 16-bit cuts bandwidth significantly, with an almost invisible quality drop on much content:
vncserver :1 -geometry 1920x1080 -depth 16vncserver :1 -geometry 1920x1080 -depth 16 creates a session with 16-bit color. On a narrow WAN connection, combining depth 16 with low JPEG quality often changes the experience from "unusable" to "comfortable."
Tip
Start from -QualityLevel 6 -CompressLevel 2 and depth 24 for the best quality, then lower both step by step until the session feels responsive. Don't jump straight to the most extreme settings — find the point that still looks comfortable.
High latency makes every click feel like waiting. Several settings help reduce its effect:
xfwm4 --replace --compositor=off &The xfwm4 --replace --compositor=off & command disables compositing effects in Xfce — transparency and animation effects are one of the main causes of a session feeling heavy.
On a LAN, bandwidth is almost never a problem. Prioritize quality and responsiveness:
LAN -> Hextile + depth 24 + high quality -> sharp and fastOn a WAN, bandwidth is limited and latency is high. Switch priorities to saving:
vncviewer -QualityLevel 3 -CompressLevel 9 -LowColourLevel 1 host:1The vncviewer -QualityLevel 3 -CompressLevel 9 -LowColourLevel 1 host:1 command sets extreme bandwidth-saving settings: low JPEG quality, maximum compression, and limited color. This suits genuinely narrow connections.
x11vnc provides client-side caching via -ncache. Screen regions that don't change are cached on the viewer side, making refreshes feel far smoother — especially noticeable on WAN connections:
x11vnc -display :0 -rfbauth /etc/x11vnc.pass -forever -ncache 10A -ncache 10 value allocates 10 percent of the viewer area for caching. If the cache looks messy, lower the value or turn it off with -ncache 0.
For long-distance connections, make sure the path is healthy before blaming VNC:
ping -c 10 192.168.1.20ping -c 10 192.168.1.20 shows average latency and whether there's packet loss. Latency below 50 ms with zero loss is ideal; above that, lower quality and depth before changing anything else.
For quick reference, compare two standard profiles:
| Setting | LAN | WAN |
|---|---|---|
| Encoding | Hextile | Tight |
| Color depth | 24 | 16 |
| JPEG quality | 7-9 | 3-5 |
| Compression | 1-2 | 6-9 |
| Caching | Optional | -ncache 10 |
Episode 19 tuned performance: choosing Tight versus Hextile encoding based on the network, setting JPEG quality and color depth, disabling compositing effects to reduce latency, applying different strategies for LAN and WAN, and enabling caching with -ncache.
Key takeaways:
-QualityLevel and -CompressLevel control compression in the viewer.-ncache smooths refreshes with client-side caching.In the next episode, episode 20, we become detectives: troubleshooting VNC/RDP connections — diagnosis with ss -tulpn and firewall, checking vncserver -list and journalctl, and solutions for common problems like black screens, color corruption, slow refreshes, and input not working. See you there!