Link test report: PD hub has no measurable effect; adb push slowness is adbd-specific

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
2026-10-11 16:11:50 +09:00
parent 6a91909945
commit 66eab916bc
2 changed files with 72 additions and 10 deletions
+9 -10
View File
@@ -106,18 +106,17 @@ Tested with the tablet on the Orin, charging through the PD hub:
165 MB debug APK install failed, and so will `flutter run`'s first install.
The app's own traffic (small, 5 Hz) is unaffected so far.
**The PD hub causes the packet loss.** With the tablet on a plain C-to-C cable
straight to the Orin, ping loss is 0% at every size, even at 100 packets/s, and a
raw one-way TCP transfer Orin → tablet runs at **~4.3 MB/s** with 4 retransmits
in 20 MB.
**Follow-up the same day: the hub is not the cause.** A replug later, the link
tested clean through the PD hub with and without the charger, and on a plain
cable: 0% loss up to 500 packets/s, 0 retransmits. The lossy state did not come
back. Details: [link test report](impl/reports/LINK-TEST-2026-10-11.md).
**adb push is still slow without the hub: ~0.14 MB/s, 175 retransmits in 20 MB**,
against 4 for the raw transfer. Cause not found. A bulk transfer running beside a
ping burst loses nothing, so it is not simply traffic in both directions.
**adb push stays slow on a healthy link: ~0.14 MB/s**, with the Orin
retransmitting ~220 segments per 20 MB, while the app's own TCP over the same
link runs at 2–6 MB/s with none. Specific to the adbd connection; unexplained.
Until both are understood, install at the desk over USB, and use the car path for
`logcat`, `shell` and screenshots. The car still needs the PD hub to charge the
tablet, so the hub, or its replacement, needs its own test.
So: install at the desk over USB, and use the car path for `logcat`, `shell`,
screenshots and `am start`.
A test trap: commands started from `adb shell` on the tablet use Android's
default network (WiFi), not the USB link. `nc 192.168.55.1 …` from there gets
+63
View File
@@ -0,0 +1,63 @@
---
type: report
date: 2026-10-11
---
# USB link test: plain cable vs PD hub
Does the PD hub degrade the tablet ⇄ Orin USB (NCM) link? Measured from the app
(the only place on the tablet whose sockets use the link) with the link test,
`lib/linktest.dart` + `tool/linktest_server.py`.
## Short version
- **No measurable effect of the PD hub**, with or without the charger connected.
All three setups: 0% loss at every size and rate up to 500 packets/s, the same
latencies, 0 TCP retransmits.
- **The loss seen earlier the same day did not come back.** Before these runs,
ICMP ping from the Orin lost 2.5–32% at 20 packets/s through the hub. After a
replug, the same ping sweep is 0% through the hub too. That connection was in
a bad state; the hub is not shown to be the cause. Cause unknown; worth
watching for (the soak below is the app-shaped check).
- **The link is asymmetric:** tablet → Orin ~22 MB/s, Orin → tablet 1.9–5.6 MB/s
and variable, with ~30 ms RTT under load and no loss (the Orin's gadget TX side
queues rather than drops).
- **App-shaped traffic is fine:** 30 s at 10 packets/s, longest silence ≤ 144 ms,
against a 5 s heartbeat timeout.
- **adb push through the SSH tunnel stays slow (0.14 MB/s, 223 Orin retransmits
per 20 MB) on a healthy link**, while the app's TCP over the same link runs at
5.6 MB/s with none. Specific to the adbd connection; not the hub, not routing
(`tcp_fwmark_accept=1`). Unexplained.
## Results
Link USB 2.0 high-speed in all runs. TCP: 5 s each way; UDP: 3 s per cell, RTT
p50 / p99 / max in ms.
| | Plain C-to-C | Hub + charger | Hub, no charger |
|---|---|---|---|
| UDP loss, 64 B and 1400 B, 10–500 /s | 0% | 0% | 0% |
| UDP 64 B 10/s RTT | 4.1 / 24.2 / 24.2 | 4.0 / 10.5 / 10.5 | 4.1 / 5.6 / 5.6 |
| UDP 1400 B 500/s RTT | 2.8 / 7.3 / 39.7 | 2.7 / 9.4 / 42.5 | 2.7 / 16.6 / 60.2 |
| Soak 64 B 10/s 30 s: loss, max gap | 0%, 144 ms | 0%, 135 ms | 0%, 104 ms |
| TCP Orin → tablet | 1.85 MB/s | 4.06 MB/s | 5.57 MB/s |
| TCP tablet → Orin | 21.8 MB/s | 22.4 MB/s | 22.6 MB/s |
| Orin TCP retransmits | 0 | 0 | 0 |
| ICMP ping from the Orin, 20/s, 56–1472 B | 0% | 0% | 0% |
For reference, the same test over WiFi to the Orin's LAN address: 0% loss, about
25 MB/s each way.
Raw records: `~/linktest/results.jsonl` on the car Orin; tabulate with
`python3 tool/linktest_summary.py ~/linktest/results.jsonl [label…]`.
## Running it
On the Orin: `python3 linktest_server.py` (from `tool/`, copied to `~/linktest/`).
On the tablet: **Link test** in the link bar, or remotely:
```bash
adb -s localhost:15555 shell am start -n dev.yukart.display/.MainActivity --es linktest <label>[@<host>]
```
The host defaults to the gateway's. A run takes about 75 s and reports each
result to the Orin as it goes.