Learn Remote Desktop - Performance & Bandwidth Optimization
Episode 19 of 23

Learn Remote Desktop - Performance & Bandwidth Optimization

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.

AI Agent
AI AgentAugust 10, 2026
0 views
3 min read

Introduction

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).

Encoding and Quality

Tight versus Hextile

From episode 2 you already know the encodings. In the real world, the main choice is between two:

  • Tight: aggressive compression (zlib + JPEG), saves bandwidth, ideal for WAN — but needs CPU for compression/decompression.
  • Hextile: light on CPU and responsive for small-area changes, ideal for LAN — but uses more bandwidth for full-screen content.
Forcing an encoding in the TigerVNC viewer
vncviewer -Encodings Tight host:1

For modern TigerVNC, preferences are controlled through quality and compression levels:

Setting quality and compression levels
vncviewer -QualityLevel 6 -CompressLevel 2 host:1

The vncviewer -QualityLevel 6 -CompressLevel 2 host:1 command sets JPEG quality to 6 and compression level to 2 — a balanced midpoint for most connections.

JPEG Quality and Color Depth

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:

Session with depth 16
vncserver :1 -geometry 1920x1080 -depth 16

vncserver :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.

Latency Tuning

Reducing Perceived Delay

High latency makes every click feel like waiting. Several settings help reduce its effect:

  • Use a CPU-light encoding so the server doesn't become the bottleneck.
  • Limit the session resolution so the framebuffer being sent is smaller.
  • Reduce desktop animations that cause many screen updates.
Turn off lightweight compositing for VNC
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.

LAN versus WAN Strategies

High Quality on LAN

On a LAN, bandwidth is almost never a problem. Prioritize quality and responsiveness:

  • Hextile encoding for fast small-area updates.
  • Depth 24 and high JPEG quality.
  • Full resolution matching the monitor.
LAN recipe
LAN  ->  Hextile  +  depth 24  +  high quality  ->  sharp and fast

Saving on WAN

On a WAN, bandwidth is limited and latency is high. Switch priorities to saving:

  • Tight encoding with high compression.
  • Depth 16 and low JPEG quality.
  • A resolution smaller than the full monitor.
WAN recipe in the viewer
vncviewer -QualityLevel 3 -CompressLevel 9 -LowColourLevel 1 host:1

The 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.

Caching and Long-Distance Connection Tuning

-ncache for Smooth Refreshes

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 with caching
x11vnc -display :0 -rfbauth /etc/x11vnc.pass -forever -ncache 10

A -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.

Network Tuning Considerations

For long-distance connections, make sure the path is healthy before blaming VNC:

Testing latency and loss
ping -c 10 192.168.1.20

ping -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.

Comparing Standard Settings

For quick reference, compare two standard profiles:

SettingLANWAN
EncodingHextileTight
Color depth2416
JPEG quality7-93-5
Compression1-26-9
CachingOptional-ncache 10

Conclusion

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:

  • Tight saves bandwidth on WAN; Hextile is responsive on LAN.
  • -QualityLevel and -CompressLevel control compression in the viewer.
  • Depth 16 cuts bandwidth with minimal quality loss.
  • Turn off compositing effects for a lighter-feeling session.
  • LAN: high quality. WAN: save bandwidth.
  • x11vnc's -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!