RDMA over a Thunderbolt cable: five driver bugs, a governor worth 1.87x, and the wall that is left
A verbs device built on USB4, between an M2 Ultra Mac Studio and an AMD Strix Halo box. Five layered driver bugs behind a permanent freeze, a CPU governor that silently reverted on reboot and was halving bandwidth by 1.87x, and a root-caused wall: every queue pair funnels through one transmit ring and one spinlock per rail. Then a size sweep that killed the reported cliff, a device advertising twice the message size it can register, and a 284B model at 90.18 GiB that one machine refuses in the allocator and both machines run over the cable. Plus eleven of the author's own numbers that later measurements demolished.

- Was called
- a run that froze permanently
- Was
- five driver bugs and a reverted CPU governor
Two machines are joined by one Thunderbolt 4 cable, and a kernel module presents the cable to applications as an InfiniBand device. There is no switch and no NIC. The verbs device drives the USB4 host interface directly, so NCCL, MPI and perftest work unmodified over a link designed to carry a display and a disk.
The work had three phases. The first was five driver bugs, layered so that each fix exposed the next, behind a run that froze permanently instead of failing. The second was a CPU governor that had reverted to its default and was halving bandwidth. The third was a scaling problem: adding queue pairs makes this driver slower, while CPU use stays flat.
Current state of this leg: 1.28 GiB/s on a single queue pair (11.0 Gbit/s), at 0.7 cores of CPU on the receiving machine. The link negotiates 20 Gb/s per direction. TCP over the same cable reaches 16.2 Gbit/s.
Transcript
One Thunderbolt 4 cable joins an M2 Ultra Mac Studio and a Strix Halo box. A kernel module makes it look like an InfiniBand device, so RDMA, remote direct memory access, runs over it unmodified.
First, five driver bugs. A run froze at send 13,242 with no error: the interface had acknowledged that request, but never signalled the CPU. Under load, one frame stranded roughly every 280.
Then the clock. The CPU governor had reverted to its default on reboot, costing 1.87 times in bandwidth. Fixed, one queue pair reached 1.22 to 1.37 gibibytes per second.
The wall: adding queue pairs makes this driver slower. One queue pair with 16 frames in flight reached 640 mebibytes per second; two, with 8 each, managed 274. All of them share one transmit ring and one lock.
On a model that fits, splitting it across both machines gives 1.60 times on prefill and 1.19 on decode. A 284B model, 90.18 gibibytes, fails in the Mac's allocator, but across both machines it generates 3.51 tokens per second.
So the cable's value is capacity, not throughput. That 284B run ended with a corrupted heap, and the Mac then reset, cause unproven. The full write-up is at boracode.ai.
The two machines
Everything below was measured on this pair and this cable. The values in the table were read from the machines, not from documentation.
The link runs at 20 Gb/s each way, which is the full Thunderbolt 4 rate. A “40 Gb/s” TB4 link is two lanes of 20 Gb/s, and dual-lane operation across domains is optional in the USB4 specification. AMD USB4 controllers do not negotiate it, so this leg is one lane per direction. Both ends report rx_speed=20.0 Gb/s tx_speed=20.0 Gb/s.
usb4_rdma0 and usb4_rdma5 over it, and every number below is bounded by that single lane.The freeze
The run that started this work did not crash; it stopped. The client had completed send 13,242 and was waiting for a reply, and the server had posted 13,241 replies. There was no RNR, error, duplicate or timeout, and dmesg was empty on both ends.
The first of the five, at the bottom of the figure, was an interrupt throttle of 255 periods of 256 ns, which added a flat 65.28 µs to every message from 2 B to 4 KB. The freeze was the second.
The counters explained it. The server posted 13,241 replies, so it had received 13,241 requests. The client had sent 13,244 frames: 13,242 sends plus two retransmits. The duplicate-ACK counter read exactly 2, so the originals of both retransmits had already been delivered and only their ACKs were lost. Request 13,242 was therefore acknowledged at the wire level and never delivered to the application. The interface had DMA'd the frame, acknowledged it to the sender, and never signalled the CPU.
A supplemental RX poll already existed for this case. It was fully wired but disabled by a one-line = false, because dual-sourcing the RX ring can reorder frames on the Apple verbs path. It is safe on the native path, where frames carry sequence numbers. Enabled behind a parameter, the first run rescued 1,288 stranded frames on one end and 9,383 on the other. Under load, one frame strands roughly every 280; the previous estimate had been one in 50,000.
Three more bugs followed. Every UC send leaked a send-queue slot, so the connection died at exactly max_send_wr = 1. A receiver-side watchdog errored the connection at 5.00 s while the sender's retransmit was due at 5.09 s, and its error-ACK then killed the sender's queue pair as well. Finally, a tail fragment that arrived before its missing head was treated as a protocol error and executed, instead of being buffered until the retransmitted head arrived.
The clock
With the freeze gone, bandwidth was noisy: the same configuration measured between 450 and 850 MiB/s across a day. The fabric was not the cause. Machine A's CPU governor had reverted to schedutil. A governor is a runtime setting, so a reboot restores the default, and none of the health checks looked at it.
The test used the same cell and flags with one setting switched, run twice each way. The arms repeat to under one percent and do not overlap: 1.87x. The governor now has its own check in the leg-readiness gate, which refuses to measure while it is unset. At schedutil every number is low by roughly that factor, and nothing in the output says so.
With the clock fixed the same leg moved from about 850 MiB/s (7.1 Gbit/s) to 1.22–1.37 GiB/s on one queue pair.
The benchmark's own CPU
Two CPU measurements turned out to reflect the measurement method and not the transport.
ib_send_bw and ib_send_lat poll by default, so the client spins on the completion queue. That spin competes with the same machine's frame delivery, which runs in a kernel workqueue, and the benchmark starves the work it is waiting on. One cell, both ends given identical flags:
ib_send_bw -c RC -s 262144 -q 1 -n 4000 -F # poll (default) ib_send_bw -c RC -s 262144 -q 1 -n 4000 -F -e # sleep on CQ events poll 611.43 MiB/s receiver 1.44 s CPU -e 827.20 MiB/s receiver 0.23 s CPU
The trade-off reverses for latency, so events are not simply better:
ib_send_lat and ib_send_bw both default to poll mode, and the two goals want opposite modes. Spinning on completions wins latency by 2.2x; taking interrupts wins bandwidth, 827.20 against 611.43 MiB/s at 256 KiB. Neither arm is the honest one — the mode is part of the question being asked, and a number quoted without it is not a result.Polling gives a typical round trip of 19.42 µs against 43.14 µs event-driven, and the figures repeat to two decimal places. The event path costs about 24 µs per round trip. The two modes measure different operating points, and neither is the more accurate one.
The second measurement problem was scope. The CPU accounting used systemd's figures for the unit running the benchmark, which covers the benchmark process and nothing else. The work that moves frames runs elsewhere: the driver's pollers run in its own kernel workqueue, and the receive path runs in softirq, which is charged to no process. The whole machine was therefore sampled instead, over one 18-second window:
tbv_ibdev, accounts for 0.05 core-seconds — negligible — while the largest single term belongs to other tenants on the same host. A CPU claim here is a claim about somebody else's load, which is why none of the mode and governor comparisons above were taken from wall-clock CPU.The module's own workqueue accounted for 0.05 core-seconds in 18 seconds. The benchmark process was the largest attributable consumer, and the largest single term was other tenants on the same host.
Queue pairs
RDMA scales by adding queue pairs. On this driver it anti-scales: more queue pairs, less total throughput.
The test used independent processes with one queue pair each, separate ports and separate completion channels, sharing nothing in userspace. Total throughput still falls as processes are added. The effect reproduces at a small send window and at 64 KiB messages. To separate queue-pair count from send depth, one queue pair with 16 frames in flight reached 640 MiB/s, while two queue pairs with 8 frames each in flight, the same total depth through the same hardware, managed 274.
The source shows the mechanism. There is one transmit ring and one spinlock per rail, and none per queue pair: path->tx_ring = tb_ring_alloc_tx(nhd, tx_hop, ...), with tx_lock taken at five or more sites in the transmit path. Every queue pair posts through that one point. Adding contenders adds latency and reordering without adding parallelism. The cost shows up as waiting and not as CPU, which matches the flat CPU readings.
Mellanox addressed a version of this on the Ethernet side by moving from a single MMIO doorbell to multiple transmit and completion doorbells, and measured a rise from 9 to 56 million packets per second. Here the hop index is a hardware resource bound to the cable, and this leg has one cable. The available lever is therefore to make the single serialized post path cheaper per message, since adding rings is not possible.
What the cable carries
iperf3, direct cable, 8-second runs A -> B, 1 stream 16.2 Gbit/s A -> B, 2 streams 16.0 Gbit/s A -> B, 4 streams 16.2 Gbit/s A -> B, 8 streams 16.4 Gbit/s B -> A, 1 stream 8.89 Gbit/s
Parallel streams add nothing, so one flow already saturates the fabric. 16.2 Gbit/s is 81% of the per-direction cap and is the practical ceiling for anything above the wire.
The gap that can be closed is the 1.4x to TCP, and it is in software. The reverse direction runs at about half the forward one, 8.89 against 16.2 Gbit/s, and that asymmetry is unexplained.
The cliff that was not there
A note carried forward from earlier work said the fabric had a hard ceiling above 256 KiB: RDMA WRITE peaked there, and a 1 MiB run produced no result row at all. A finding like that shapes a design, because it argues for chunking every transfer, so it was measured instead of inherited.
It is not a cliff. The sweep varied message size with repeats at every point, with the sender on the Mac Studio and the target on the Strix Halo:
The defect is an intermittent failure of roughly one run in five above about 1.5 MiB, and not a boundary. The distinction matters: a boundary is a limit to design around, and a one-in-five failure is a bug to fix. The original reading was a single sample of a probabilistic fault on a leg whose bandwidth noise floor is about 67%. 1 MiB now passes five times out of five, and 1.5 MiB failed twice and then passed twice inside the same ten minutes.
One hard limit did turn up, and it should be reported upstream separately. ibv_devinfo advertises max_msg_sz of 0x1000000 — 16 MiB — while buffer registration fails with ENOMEM at 8. The advertised message size is twice what this stack can actually register, so a caller sizing its transfers from the device's own capability line gets a failure before a byte moves.
What the cable is for
The target workload is a model that does not fit on either machine alone, split across both by llama.cpp's RPC backend, with the split carried over verbs instead of TCP.
That needs a baseline first: the same model on each machine by itself. The file is 2.21 GiB with an identical checksum on both ends, and three backends were tested. Every arm below ran through one harness that writes the model's checksum, the binary's build commit and the device line the run opened into the same log as the number.
Decode on the Strix Halo runs at twice the Mac's rate, and prefill at 3.45 times it. The middle bar is the surprising one: on a single GPU under a single driver stack, Vulkan beats the vendor runtime by 14% on decode and 12% on a 2048-token prefill. The rule of using the vendor's runtime does not hold on this hardware.
The same server reports time to first token directly, which is a different quantity from a prefill rate. A rate describes a pipeline that is already full, and the first token is the one that waits for it to fill.
Strix Halo, Vulkan, llama-server timings.prompt_ms cold prompt, 1601 tokens 766.76 ms (2088 t/s prefill) prefix already resident 14.13 ms
Six identical requests appear to show a 54x spread until the response bodies are read: runs two through six each report prompt_n = 1, because the server caches the prompt prefix by default. One request processed 1601 tokens and the rest processed one. A spread that large between identical requests is rarely the machine, and here it was the harness reading its own cache.
The RPC split engages, and the Mac's server prints the line that proves it. That line is the only admissible proof. llama.cpp's RDMA transport falls back to TCP silently whenever its probe fails, and the QPN and PSN are exchanged over that TCP socket, so the socket exists whether or not verbs ever carried anything. A working connection proves nothing:
RDMA probed: dev=usb4_rdma0 gid=1 RoCEv2 qpn=6407 RDMA activated: qpn=6407->2700 mtu=4096 rx_depth=24
The first attempt never got past loading. At the transport's default queue depth of one, a 2.21 GiB model had not finished loading after eleven minutes. The device reports a maximum of four outstanding send work requests, and at four the same load completes and generates. This is a transport tuning fact and not a property of the cable, and it turns the result from “does not work” into a number.
RPC over the cable, 37/37 layers offloaded prompt 208.7 t/s generate 47.1 t/s the same model on the Strix Halo alone prompt 2043.0 t/s generate 78.0 t/s
The layers did cross the cable, but they landed on the other machine's CPU. The Mac's RPC server is built without a GPU backend and announces 194,583 MiB of host memory as device memory, so the splitter, which places by free memory, hands it every layer. Offloading gained 44.4 to 47.1 tokens/s over running the whole model on the client's own CPU. Moving a model across a cable so that the far machine's CPU can run it is a loss against the GPU already present in the client.
The transport question is therefore answered and the placement question is not. A split across two GPUs needs a server built with a GPU backend on the far end. That is a build task and not a limit of the fabric, and it is the next thing to measure.
A GPU on the far end
The build exists. The other machine in the fleet compiles llama.cpp's RPC server against Vulkan and libibverbs for x86_64, which is the far end this needed. The binary was copied over the LAN instead of being rebuilt. It is 62 MB with an identical SHA-256 at both ends, and it enumerates Radeon 8060S Graphics (RADV STRIX_HALO) on arrival. The split is now GPU to GPU over verbs, which answers the placement question from the previous section.
The test used the same model, file and harness as the CPU run, with one arm on the Mac alone and one arm split across both machines over the cable:
Qwen3-4B-Q4_0, llama-bench, warm floor of repeated runs
TP=1 Mac Studio alone pp128 290.78 +/- 0.15 t/s
tg32 40.30 +/- 0.05 t/s
TP=2 both machines, RDMA pp128 464.46 +/- 85.33 t/s 1.60x
tg32 48.02 +/- 0.51 t/s 1.19xPrefill scales and decode barely does, which is the expected shape. Prefill is arithmetic that divides cleanly across two GPUs, while decode produces one token at a time and waits on a round trip. The prefill error bar is large, with 85 t/s of spread on a leg whose measured bandwidth noise floor is 67%, and it is reported as measured.
A 1.6x gain on a model that already fits does not justify building a fabric. The real test is a model that fits on neither machine: a 284-billion-parameter checkpoint, Q2_K, 90.18 GiB resident. On the Mac alone it does not run. It fails before the first token, in the allocator:
Failed to allocate BO VMA BO creation failed llama_bench: error: failed to load model
Split across both machines over the cable, the same file loads and generates:
284B Q2_K, 90.18 GiB, Vulkan + RPC over usb4_rdma5 pp128 17.88 +/- 1.03 t/s tg32 3.51 +/- 0.12 t/s RDMA activated: qpn=6696->2600 mtu=4096 rx_depth=24
These are slow numbers. The relevant comparison is not 3.51 tokens per second but the alternative, which is an allocator error. This is the first result in the work where the cable is not an optimisation, because the model has nowhere else to go. A fabric that makes a 90 GiB checkpoint runnable on hardware that individually refuses it does something a faster single machine cannot.
Two things count against this result. The first is that the load transfer runs at about 146 MB/s while perftest reaches 900+ MiB/s on the same device. About six times the available bandwidth goes unused at model-load time, on a transport whose send ring is one deep.
The cause is not a missing knob, which is what I first claimed here and had wrong within the hour. GGML_RDMA_SEND_DEPTH exists and accepts 1 to 512 at runtime. The limit is pinned memory. The default receive ring is 24 chunks of 256 KiB, the chunk size is chosen in the source with the comment “fits default 8 MiB memlock”, and this host's RLIMIT_MEMLOCK is 8 MiB with the hard limit equal to the soft one, so an unprivileged process cannot raise it. Six MiB of receive ring leaves about two for transmit, which is a send depth of eight before registration fails. The setting works and is reachable without a rebuild, but the memlock limit constrains it.
The second problem is more serious than it first looked. The process aborted with double free or corruption (out) during teardown, after printing its results, and then the Mac hard-reset. Its journal stops mid-sentence at 22:39:00 on an ordinary disk-telemetry line, with no shutdown sequence, no panic, no OOM kill and nothing in pstore. The machine was back up at 22:40:58. That is the second unexplained reset on that host the same day. Through the run the link had been retransmitting steadily, with native ACK matched after retry … rnr_retries=1 logged once every few seconds. This is the same large-message retransmit signature that the size sweep found and did not explain.
I cannot show that the benchmark caused the reset, and two minutes separate the two events. The numbers above came from a run that ended with a corrupted heap and a machine that went down without explanation, and reporting the tokens per second without saying so would add a twelfth entry to the corrections list.
What the file actually contained
Every number above was taken after checking that both machines held the same model file. That check also found a fault on the Mac.
Three reads of one inode returned three different checksums, with nothing writing to the file and its modification and change timestamps unchanged since creation. Reading the same file with O_DIRECT, which bypasses the page cache and goes to the device, returned the same correct checksum every time, and it matched the independent copy on the other machine. cmp against a direct-read copy put the difference in a single contiguous run of 397 bytes at offset 1,939,111,937.
buffered (page cache) e13a4d3b0b1d5ff00858de695be36d90 device (O_DIRECT) ff009625971c56242d3f046ab7f53fc7 <- correct after evicting that one file's pages with posix_fadvise(DONTNEED) buffered (page cache) ff009625971c56242d3f046ab7f53fc7 <- agreed, and stayed agreed
The disk and the read path are fine. The copy resident in memory had been altered. Eight rounds of evict-and-reread on an idle machine were clean every time, and three short Vulkan runs produced one corrupted result with a fourth distinct checksum. A different wrong value each time points to an active writer and not to a broken read path, because a filesystem mis-decompressing an extent would produce the same wrong bytes on every attempt, and this never did. The mechanism is not identified, and no driver is accused.
llama.cpp memory-maps the model, so a load reads exactly those pages. A model can therefore run on weights that silently differ from the weights on disk, with no error, counter or log line, and non-deterministically, because the result depends on what is in cache. Throughput is unaffected: the same arm measured 591.30 and 591.62 prefill while the cache was in flux and after it was healed, inside the noise. Any claim about output quality from this machine would not be safe. The harness now digests the model both ways on every arm, heals once by evicting, and refuses if the two paths still disagree. It caught the corruption again on the very next run.
Corrections
Eleven numbers from this work were published and later withdrawn. They are listed here because the pattern in them says more than any single result.
Each of those was a measurement whose parts were not taken over the same thing. One was a ratio with numerator and denominator from different windows. Another read a process's CPU as the transport's. Another read a benchmark's spin as a wire cost, and another read a specification as a measurement.
Corrected 2026-10-10: the poll-against-events chart showed 425 and 611 MiB/s; the measured values in the code block above it are 611.43 (poll) and 827.20 (events), and the chart now uses them. The text named four of the five bugs in the title and figure; the interrupt throttle is now named as well.
Where this stands
The freeze is fixed and the run completes. Throughput is 1.22–1.37 GiB/s on one queue pair, 60–70% of what TCP achieves on the same cable. Round-trip latency is 18.29 µs typical and 11.74 µs at its floor, with a 24 µs event wakeup that polling hides and does not remove.
The open problem is queue-pair serialization. It is why a multi-GiB/s target is not yet reachable on this cable. The cause is not the wire, the CPU or a setting, and the fix is a change to the transmit path.
The previous post in this series left open whether a GPU-backed RPC server on the far end makes this a fabric for compute or only a fast way to move bytes. The measurements give a different answer from either option. On a model that fits, the split gives 1.60x on prefill and 1.19x on decode, which is a modest gain. On a model that does not fit, the split is the difference between 3.51 tokens per second and an allocator error. The value of this cable is capacity and not throughput.
Community measurements on the same hardware class: Level1Techs USB4 clustering notes. The module: thunderbolt-ibverbs, including its tuning sweep. Doorbell contention: the mlx5 multiple-doorbell series.
