A slow VNC session is one of five things: the round trip, what the link can carry, the server's own CPU, a desktop that repaints without being asked, or a desktop that's simply too big for the pipe. Only one of those five answers to the encoding and quality options most tuning advice opens with, which is why changing them so often does nothing at all.
Three numbers separate the five, and the first one's free because the viewer has already taken it. Read what the viewer measured, then the round-trip time off the live connection, then the server process's CPU while the lag is happening. Then change one thing and retake the number that sent you there.
Where the time goes between your pointer and the remote screen

A VNC session carries two different flows and they fail in different ways. Your pointer and key events go up to the server as small packets. The server applies them, works out which regions of its framebuffer changed, encodes those regions and sends them back, and the viewer decodes them and repaints the window.
That split is free diagnosis before you run anything. A pointer that trails your hand by a constant amount on an idle desktop is a round-trip problem, and nothing you do to compression shortens a round trip. A pointer that keeps up until something large redraws, then stalls while the window paints in bands, is a volume problem, and that is where encoding, colour depth, desktop size and server CPU live.
Work down in the order the checks cost you. The viewer is already holding a bandwidth figure it measured itself, so read that first. Then take the round-trip time off the live TCP connection, then a throughput figure for the path, then the server's CPU, and last the byte totals the server wrote to its own log. Everything after the first step is a number you can write down and compare again after a change.
The commands below carry Debian 13 and Ubuntu 24.04 names: the viewer is xtigervncviewer, the X VNC server is Xtigervnc, and the wrapper that starts, lists and stops sessions is tigervncserver. On Fedora and the RHEL rebuilds those first two are vncviewer and Xvnc, and systemd starts and stops sessions there as vncserver@:1 instead of a wrapper. Every option and log line below belongs to the viewer or the server, so it reads the same on both. One worked session runs through the whole sequence, on display :1, which is TCP port 5901.
Read what the viewer has already worked out

The viewer measures the connection as it runs and picks the encoding and pixel format from what it finds. It prints each of those decisions to stderr at the default log level, so starting it from a terminal costs nothing and often ends the investigation on the spot:
xtigervncviewer <server-host>:1
If the session only arrives through an SSH tunnel, point the viewer at the local end of the forward instead, where :1 again means port 5901:
xtigervncviewer localhost:1
Reproduce the lag, then read the terminal. These are the two lines that matter:
Throughput 1800 kbit/s - changing to quality 6
Throughput 190 kbit/s - full color is now disabled
Both are the automatic selection working rather than failing. The viewer asks for JPEG quality 8 above 16 Mbit/s and quality 6 below it, and it leaves full colour behind once its own estimate drops under 256 kbit/s. If those lines are in your terminal, the link is already the constraint, and a hand-set quality value will not buy back more than the automatic choice has taken already.
For the current estimate rather than the moments it moved, open the viewer's connection info panel. The popup menu comes up on F8 through TigerVNC 1.15, and on Ctrl+Alt+M from 1.16. Choose "Connection info…" and read three fields: Line speed estimate, Requested encoding and Last used encoding. Automatic selection always asks for Tight, so a requested encoding of anything else means it is already off.
To watch volume rather than the estimate, raise the viewer's own log level. At the most verbose setting it draws a live throughput graph in the corner of the session window, labelled in updates per second, pixels per second and bits per second. Quote the pattern so the shell leaves it alone:
xtigervncviewer -Log '*:stderr:100' <server-host>:1
Two viewer behaviours are worth knowing before you reach for any option, because both of them fail silently. Automatic selection stays on until you turn it off by name, so a preferred encoding or a quality level does nothing without -AutoSelect=0 on the same line. A compression level is read only when -CustomCompressLevel=1 is set as well. A tuning attempt that moved no measurement at all has usually hit one of those two rather than a limit in VNC.
Separate a round-trip problem from a bandwidth problem

Run these on the server while the lag is happening and the viewer is still connected. Settle which display the session is really on and what it is bound to first: the port follows from the display, and the bind address decides which path your updates take.
tigervncserver -list
ss -ltnp '( sport = :5901 )'
The first prints the displays this wrapper has running, so you can stop assuming :1. The second prints the address the server is bound to, and 127.0.0.1 or [::1] there means the session only arrives through a tunnel, which is the path the throughput test has to follow too. Now narrow the socket statistics to the one session. The internal TCP information is where the numbers live:
ss -tin state established '( sport = :5901 )'
The indented line under the socket carries rtt:, the average round-trip time and its mean deviation in milliseconds. Your pointer cannot reach the remote screen in less than one of those, so pointer lag tracks this number and nothing else here will move it. retrans: and delivery_rate on the same line show whether the path is losing packets on top of that.
If the round trip is small and the session is still slow, measure what the path can actually carry. Screen updates travel from the server to the viewer, so the test has to run in that direction. Start the listener on the VNC server. It takes the terminal and holds it until you stop it:
iperf3 -s
From a second terminal on the viewer's own machine, run the client half with the direction reversed, so the server sends and the client receives:
iperf3 -c <server-host> -R
Ten seconds later you have a receiver figure in Mbit/s. Put it next to the Line speed estimate the viewer showed. Two numbers in the same range mean the link is genuinely the ceiling. An iperf3 figure far above the viewer's estimate means the bytes were never the problem, and the next two checks are where the time went. If port 5201 is already taken, move both halves with -p <port>.
If you reach the session through an SSH tunnel, measure through the tunnel rather than around it, or the figure belongs to a path your screen updates never take. Forward the iperf3 port the same way the VNC port is forwarded, with no remote command, so the connection does nothing but carry the forward:
ssh -N -L 5201:localhost:5201 <user>@<server-host>
That command keeps the terminal, so run the client half from a third terminal and point it at the local end of the forward:
iperf3 -c localhost -R
Check whether the server is the slow part

A server that can't encode fast enough looks exactly like a slow link from the viewer's side, and the two have opposite fixes. Find the process first. This prints the pid along with the whole command line it was started with, and you'll want both:
pgrep -af 'X(tiger)?vnc|x11vnc'
Then sample that pid twice, a second apart, so you read what it costs now rather than its average since the session started. Batch mode with two iterations prints both and exits:
top -b -n 2 -d 1 -p <pid>
Read %CPU in the second block. Near 100% of one core while iperf3 showed headroom means the server is encoding-bound or polling-bound, and the lever is how much work it does rather than how many bytes it sends.
x11vnc lands here more often than anything else, because it watches a real X display and has to spot changes in it rather than being told about them. It leans on the X DAMAGE extension to hold that cost down while the screen is mostly still, so an x11vnc process pinned to a core is worth checking for -noxdamage in its command line before you change anything else.
Read what the server actually sent

The X VNC server totals its own output per encoder and writes the totals to the session log when a client disconnects, so the cheapest way to get them is to close the viewer window after reproducing the lag. The directory it lands in has moved between releases, so find the file instead of guessing it: ~/.vnc on Ubuntu 24.04, ~/.config/tigervnc on Debian 13, and ~/.local/state/tigervnc wherever systemd starts the session.
ls -t ~/.vnc/*.log ~/.config/tigervnc/*.log ~/.local/state/tigervnc/*.log 2>/dev/null | head -1
The tail of the connection reads as a breakdown by encoder and then a total:
Framebuffer updates: 4812
Tight:
Solid: 21.1 krects, 93.4 Mpixels
412 KiB (1:916 ratio)
Tight (JPEG):
Full Colour: 8.42 krects, 611 Mpixels
148 MiB (1:12.4 ratio)
Total: 29.5 krects, 704 Mpixels
149 MiB (1:60.6 ratio)
Total is what left the machine. Divide it by the length of the session and set that rate against the iperf3 figure: close to it means the wire was saturated, well under it means the limit sat somewhere before the wire. The pixel count is the other half of the answer. A pixel total far larger than the work you actually did is the signature of a desktop repainting on its own, from a compositor, window animations, an animated background or a video playing in a browser tab.
Route the number to the fix

rtt: is high and steady. No VNC setting shortens a round trip. Move the viewer closer instead, onto a jump host inside the server's own network that you reach over SSH, and confirm the gain by rereading rtt: from there.
iperf3 and the viewer's estimate agree, and both are low. The link is the ceiling, so the lever is what each update costs: encoding, then JPEG quality, then colour depth. Put -AutoSelect=0 on the same command line or none of them apply.
The server is pinned to a core while iperf3 shows headroom. Cap the work rather than the bytes. The server takes a ceiling on the updates it sends each client, 60 a second by default, and rolls anything faster into one update. The wrapper hands any option it doesn't recognise straight to the server, so the change is a stop and a start:
tigervncserver -kill :1
tigervncserver :1 -FrameRate 20
That drops the session and starts a fresh one on the same display, so reconnect and retake the top sample. If the server was idle instead and the byte total was the high number, leave the frame rate alone. Pixel comparison is already earning its keep on its default of 2, and forcing it to 1 buys fewer bytes with more server CPU, which only pays when you have CPU to spare and no bandwidth.
The log's pixel count dwarfs the work you actually did. The desktop is repainting without you. Turn off compositing, window animations and any animated background in the remote session, and close video. Nothing in the protocol compensates for a desktop that redraws itself.
The pixel count is high and the desktop is simply large. Every repaint costs in proportion to its area, however well it encodes. That's a desktop size question rather than an encoding one, and you settle it on the server before the session starts.
What to hand over when it is still slow

You've changed one thing at a time, retaken the number that prompted each change, and the pointer still trails. Hand over three things and the next person starts where you stopped: the session log covering one reproduction, disconnect totals included; the ss -tin entry from the lagging connection with rtt: and retrans: intact; and the reversed iperf3 figure next to the Line speed estimate the viewer showed in the same minute.
Decide what you're fixing before you fix anything, and the first two numbers usually make that decision for you. A round trip you can't shrink is a hosting problem rather than a tuning problem, and the answer to it is a viewer closer to the server. Everything else is a trade you can measure, so put an option back to its default the moment it leaves both the number and the pointer where they were.
Keep the figures from the run that found it in a note next to the session. The next time this desktop feels slow, two minutes tells you whether it's the same layer or a new one.
FAQs
Does lowering the resolution or color depth improve VNC performance on a slow link?
On a link-limited session both cut the bytes each update carries, and colour depth is the one you can reach from the viewer. The catch is that it won't stick on its own. Automatic selection owns the colour decision while it is on: it leaves full colour by itself once the viewer's estimate falls below 256 kbit/s and puts it back when the estimate recovers, so forcing a lower depth means turning that off in the same command:
xtigervncviewer -AutoSelect=0 -FullColor=0 <server-host>:1
Read the server's byte total in the session log before and after. If the total barely moves, the session was never link-limited and you're turning the wrong pair of knobs.
Why does full-screen video make a VNC session unusable?
Because VNC sends the pixels that changed, and a video changes nearly all of them, nearly all the time. Play the clip, disconnect, and the session log shows the pixel count and the byte total climbing with the frame rate and the window's area rather than with anything you were doing. No viewer option recovers that, because the data genuinely is there. Cap the server's frame rate so the rest of the desktop stays usable while the video plays badly, and play the file on the local machine whenever you have that option.
Discuss this in the community
Questions about this, or a setup it does not cover? Ask in Using VNC Technology.