Docs / Benchmarks

Measured latency

Every figure here comes from a doc in the repo at v0.1.0, measured on one test rig. The rig and its limits are named on every chart.

RTX 4080 · RX 6700 XT · UHD 770 · M5 Pro · 2.5GbE LAN

On this page
  1. Test rig
  2. Encoder latency
  3. Slices and split encode
  4. Pipeline stages
  5. Transport paths
  6. Input latency
  7. Reproduce
NVENC p50 · 1080p240 split
1.04ms
First slice p50 · 8 slices
0.70ms
E2E p50 · present → decoded
3.08ms
Go allocs per datagram · raw AEAD UDP bench
0

Test rig

RoleHardware
Host, bigboiWindows 11, Intel i9-13900K. RTX 4080 with no display, in a PCIe x4 slot. RX 6700 XT driving the only monitor (1920×1080 at 60 Hz). Intel UHD 770.
Client, M5 PromacOS 27.0, Apple M5 Pro. 5120×1440 display at 120 Hz.
NetworkWired 2.5GbE between the two. The Mac's Wi-Fi 6 and a direct Tailscale path were also measured.
DriversNVIDIA 616.92 with NVENC API 13.1, AMF 1.4.37, oneVPL API 2.8.

The Mac was busy while it measured (load average 11 to 13 in Phase 1, 6 to 15 in Phase 2), which inflates client p95 and p99.

Encoder latency

1080p120 · HEVC · NV12 FROM BGRAp50 / p95 / p99 · ms02468RTX 4080NVENC · back-to-back1.41 / 1.51 / 1.69RTX 4080NVENC · paced (P8)2.95 / 7.36 / 70.6RX 6700 XTAMF · paced2.78 / 3.20 / 5.61UHD 770oneVPL · no measurementNO REPO MEASUREMENT— / — / —M5 ProVideoToolbox · paced5.05 / 5.35 / 5.58
NVENC runs 1.41 ms p50 only when the GPU is boosted. Paced submission leaves the RTX 4080 in P8, where the same encode runs 2.95 ms at p50 and 70.6 ms at p99, which is why Planck sets an NVIDIA power profile.

Rig bigboi: i9-13900K, RTX 4080 (no display, PCIe x4), RX 6700 XT (driving the only monitor, 1080p60), UHD 770 · Client M5 Pro, macOS 27.0 · Mode 1,200 frames on NVENC, 600 on VideoToolbox; back-to-back = submit as fast as frames finish (GPU boosts), paced = submit at frame rate (GPU stays in P8) ·Driver NVIDIA 616.92 / NVENC API 13.1, AMF 1.4.37 · Sourcedocs/spikes/phase0-spike2.md lines 71–89, 163–169, 184–194 · Commitv0.1.0 (8a3c732). Intel oneVPL encode latency is not measured anywhere in the repo; the UHD 770 row is intentionally empty.

EncoderPartFormatModep50msp95p99
NVENCRTX 4080NV12 from BGRAback-to-back1.411.511.69
NVENCRTX 4080NV12 from BGRApaced2.957.3670.6
NVENCRTX 4080P010 (10-bit)back-to-back1.341.461.58
NVENCRTX 4080P010 (10-bit)paced2.956.9812.1
NVENCRTX 40804:4:4 from BGRApaced4.266.2415.5
AMFRX 6700 XTNV12 from BGRApaced2.783.205.61
AMFRX 6700 XTP010 (10-bit)paced2.644.8611.4
oneVPLUHD 770anynot measured———
VideoToolboxM5 ProNV12 from BGRApaced5.055.355.58
VideoToolboxM5 ProP010 from x420paced5.275.525.71

Slices and split encode

A · SUB-FRAME SLICING · 1080p240 HEVC · BACK-TO-BACKencode p50 · msB · NVENC SPLIT ENCODE · PHASE 2 HOST ENCODE p5000.51.01.52.02.51 sliceasync eventwhole frame1.414 slicessub-frame poll1ST SLICE 0.781.448 slicessub-frame · split off1ST SLICE 0.701.511080p2401 slice · base → split−24%1.041440p1201 slice · base → split−31%1.51
Slicing does not make the frame encode faster; it makes the first bytes leave sooner. Eight sub-frame slices put the first slice on the wire at 0.70 ms while the whole frame still takes 1.51 ms. Split encode is the separate win: it cuts the whole-frame p50 by about a quarter to a third, at the cost of roughly a third more bits.

Block A Phase 0 spike 2, bigboi RTX 4080, 1080p240 HEVC NV12 from BGRA, back-to-back(GPU boosted) · Source docs/spikes/phase0-spike2.md lines 94–103. Block BPhase 2 host encode, synthetic LAN · Source docs/perf/phase2-results.md lines 22–27. These are two different harnesses: A's 1-slice p50 (1.41 ms) and B's 1-slice base p50 (1.36 ms) are not the same test and must not be compared directly. Split encode costs about a third larger frames at p50 and up to 75% at p95 (docs/perf/phase2-results.md:50).Commit v0.1.0 (8a3c732).

ConfigModeEncode p50 / p95 / p99msFirst slice p50 / p99
1 sliceasync event1.41 / 5.45 / 7.98—
4 slicesasync event1.45 / 2.01 / 3.95—
4 slicessub-frame poll1.44 / 1.64 / 1.910.78 / 1.13
8 slicessub-frame poll, split off1.51 / 1.76 / 1.960.70 / 1.14
ConfigBase p50 / p95 / p99msNew p50 / p95 / p99
1080p120, 1 slice1.44 / 1.75 / 1.831.44 / 1.75 / 1.82
1440p120, 1 slice, split2.20 / 2.56 / 2.651.51 / 1.67 / 1.76
1080p240, 1 slice, split1.36 / 1.55 / 1.611.04 / 1.11 / 1.16
1080p120, 4 slices sub-frame1.43 / 1.73 / 1.791.47 / 1.80 / 1.90

Pipeline stages

PER-STAGE COST · EACH FROM ITS OWN BENCHMARKms · p50, loopback row is a mean0246810Capture → encodePhase 2 · 4-slice SF1.47Seal + FEC + sendloopback bench · mean0.742.5GbE LANspike 3 · median1.28DecodePhase 1 · 4-slice SF1.111st slice 0.800.87 standalonePhase 2 E2E p50 3.08 mspresent → decoded picturestages overlap, so they do not sumNOT PART OF THE 3.08 ms MEASUREMENT · CLIENT, MEASURED SEPARATELYSubmit → on screencomposited 120 Hz8 – 10.3
Each bar is that stage's own measured cost, drawn from zero, and the benchmarks differ (the label under each stage names its run; SF is sub-frame slices). Capture → encode and decode are p50 at 1080p120 HEVC; the network bar is the median of network p50s across 12 wired 2.5GbE configurations sending synthetic random bytes (not HEVC). The seal + FEC + send bar is the mean of 0.74 ms per frame from the loopback session benchmark, which sends synthetic 78 KB frames and involves no wire, HEVC encode or p50. The stages overlap in flight (sub-frame slices are sealed and sent while the frame is still encoding), so the measured end-to-end p50 of 3.08 ms is less than the sum of the bars. The colours run down Planck's blackbody ramp: the frame leaves the encoder at 2000 K and arrives cool at the display.

Encode / E2E Phase 2 host encode, synthetic LAN, 1080p120 HEVC, 4 sub-frame slices (docs/perf/phase2-results.md:22–27) · First slice Phase 1 audit, 1080p120 4 slices sub-frame, 796 µs p50 (docs/perf/phase1-latency-audit.md:34–46) · Seal + FEC + sendloopback session benchmark, synthetic 78 KB frames, 72 datagrams, 0% loss, mean 0.74 ms/frame, bigboi (pkg/transport/session_test.go:517, phase1-latency-audit.md:121–132) · Network spike 3, median net p50 across 12 wired transport configs, 1100–1360 B shards (docs/spikes/spike3-transport/RESULTS.md:10) · Decode Phase 1 audit, in-session VideoToolbox decode p50 on the M5 Pro, 1080p120 4 slices sub-frame, 1110 µs (phase1-latency-audit.md:38); standalone VideoToolbox HEVC decode 0.87 ms (phase0-spike2.md:184–194) · Present submit-to-on-screen p50 in a composited 120 Hz CAMetalLayer window, 10.296 ms at 120 fps submit (phase1-latency-audit.md:104–107); Phase 2 re-states 8–10 ms and did not change it. Glass-to-glass with the GUI client presenting a live stream has never been measured (phase1-latency-audit.md:200,phase2-results.md:41). Mac load average 6–15 during Phase 2, which inflates client p95/p99. macOS direct-to-display (P1b) is not done. Commit v0.1.0 (8a3c732).

StageWhereLatencyms · p50 unless notedSource
Capture → encodeHost, NVENC · Phase 2, 4 slices sub-frame1.47docs/perf/phase2-results.md:22–27
First slice readyHost, NVENC · Phase 1, 4 slices sub-frame0.80docs/perf/phase1-latency-audit.md:34–46
Seal + RS FEC + sendHost · loopback session benchmark, synthetic 78 KB frames; mean per frame, not p500.74 (mean)docs/perf/phase1-latency-audit.md:121–132
Network2.5GbE LAN · spike 3, median across 12 transport configs1.28docs/spikes/spike3-transport/RESULTS.md:10
Decode, in sessionClient, M5 Pro · Phase 1, 4 slices sub-frame1.11docs/perf/phase1-latency-audit.md:38
Decode, standaloneClient, M5 Pro · Phase 0 spike 20.87docs/spikes/phase0-spike2.md:184–194
E2E, present → decodedHost to client · Phase 2, 4 slices sub-frame3.08docs/perf/phase2-results.md:22–27
Submit → on screenClient, 120 Hz window8 – 10.3docs/perf/phase1-latency-audit.md:104–107

Transport paths

RAW AEAD UDP BURST · WIRED AND TAILSCALE AT 100 Mbpsp50 / p99 · msLOG SCALE0.1110Wired 2.5GbEdirect UDP · 1100 Bmin RTT 0.18–0.25ceiling 150 Mbps sustained · 1173 B on the wire0.99 / 7.3Tailscale directWireGuard · 1100 Bmin RTT 0.33–0.40ceiling 100 Mbps direct, 20 Mbps relay · 1233 B on the wire (+5.1%)3.15 / 23.4Wi-Fi 6direct UDP · 1360 Bmin RTT not publishedp50 rangeabout +4 ms median vs wired · idle ICMP 3–295 ms (power save)4.4 – 8.4 / —
Wired direct UDP is the reference path. Tailscale costs about 0.15 ms of extra minimum RTT and 60 bytes per packet, and its tails get long enough that Planck caps it at 100 Mbps direct. Wi-Fi costs about 4 ms of median latency before anything else happens.

Rig bigboi (Windows 11) → M5 Pro (macOS 27.0) · Wired Thunderbolt 2.5GbE; the Wi-Fi 6 figures measure the Mac's Wi-Fi downlink · Mode raw AEAD UDP burst, 1100-byte shards on the wired and Tailscale comparison at 100 Mbps, 1360-byte shards on the congestion-control matrix that gives the Wi-Fi range, no induced loss · Tailscale direct WireGuard only: DERP relay was never measured · Source docs/spikes/spike3-transport/RESULTS.md lines 10, 20–27, 55, 73–110 · Commit v0.1.0 (8a3c732). Repo guidance: prefer direct UDP; treat Tailscale as a fallback at a lower ceiling (RESULTS.md:29).

Raw AEAD UDP · median net p50
1.28ms
quic-go datagrams · median net p50
1.75ms
PathBitrateMbpsNet p50msNet p99Min RTTBytes/packet
Wired 2.5GbE500.6911.70.18–0.251173
Wired 2.5GbE1000.997.30.18–0.251173
Wired 2.5GbE1501.305.30.18–0.251173
Tailscale direct500.9711.10.33–0.401233
Tailscale direct1003.1523.40.33–0.401233
Tailscale direct1501.5320.80.33–0.401233
Wi-Fi 6—4.4–8.4———

Forward error correction

ConditionParityFrames delivered
1% lossnone64–70%
1% loss20%100%
5% loss, per-slice blocksadaptive, chose 39.6%99.8–99.9%
Clean linkadaptive, 2.6–10%—

Input latency

Input travels one way, from the client's timestamp to the host's handler. At 1080p120 on the LAN, Phase 2 measured 174 µs p50, 357 µs p95 and 815 µs p99; with real AMF capture at 60 Hz, 227 µs p50 and 406 µs p99 (bigboi to M5 Pro, docs/perf/phase2-results.md:33–39).

Reproduce

Encoder numbers come from the Phase 0 spike, built from the repo:

SHcmd/planck-spike2
CGO_ENABLED=0 go build -o planck-spike2 ./cmd/planck-spike2
# Windows
planck-spike2 vendors
planck-spike2 nvenc -matrix -frames 1200              # paced
planck-spike2 nvenc -matrix -frames 1200 -pace=false  # back-to-back
planck-spike2 amf -frames 600
# macOS
planck-spike2 vt -frames 600
planck-spike2 sck -soak 60s

Transport numbers come from the spike 3 sender and receiver:

SHcmd/spike-transport
# client (Mac)
CGO_ENABLED=0 go build -o spike-transport ./cmd/spike-transport
./spike-transport recv -listen 0.0.0.0:47998 -media-port 47999
# host (Windows)
CGO_ENABLED=0 go build -o spike-transport.exe ./cmd/spike-transport
./spike-transport.exe send -server <client-ip>:47998 -ts-server <tailnet-ip>:47998 -matrix cc,ts,fec -out wired.json

Live tests are skipped unless their variable is set. They need a GPU, and never capture the screen or inject input:

SHlive tests and traces
# stream the synthetic pattern through this machine's encoder and decoder
PLANCK_LIVE_VIDEO_TEST=1 PLANCK_LIVE_ADAPTER=NVIDIA PLANCK_LIVE_FPS=120 PLANCK_LIVE_SECONDS=4 \
  go test -run TestLiveSynthHardware -v ./internal/session

# per-frame stage traces, summarised by cmd/planck-trace
PLANCK_TRACE_HOST=host.csv planck-host -synth
PLANCK_TRACE_CLIENT=client.csv planck-client -headless -connect host:47701 -duration 20s

On Windows, PLANCK_TIMER_REPORT=1 go test -run TimerJitterReport -v ./pkg/transportreports wait accuracy. The headless client prints a JSON summary of any session with-headless -json; see client flags.