(Disclaimer: Assistance generated with AI support for Linux network stack tuning on Jetson platforms).
Getting ~700 Mbps aggregate during a simultaneous TCP bidirectional (--bidir) test on a 1GbE interface is common on embedded ARM64 platforms.
When running bidirectional traffic, the network controller and CPU must handle heavy simultaneous RX and TX interrupt processing, softirqs, and TCP socket buffer context switching. On resource-constrained embedded cores, this creates CPU bottlenecking and packet queue contention before hitting wire speed.
Here are the key network tuning steps you can apply to push bidirectional throughput closer to line rate (~940+ Mbps):
1. Optimize NIC Ring Buffers (ethtool)
Check your current Ethernet driver ring buffer sizes and increase them to prevent packet drops during heavy bursts:
# Check current ring buffer settings
ethtool -g eth0
# Set RX and TX ring buffers to maximum supported values (example)
ethtool -G eth0 rx 4096 tx 4096
2. Adjust Interrupt Coalescing
Lowering interrupt coalescing can improve throughput under high packet rates, though it slightly increases CPU usage:
# Disable adaptive coalescing and tune rx/tx usecs
ethtool -C eth0 adaptive-rx off adaptive-tx off rx-usecs 15 tx-usecs 15
3. Tune Linux Kernel TCP Socket Buffers
Increase default and maximum TCP socket buffer sizes to allow better window scaling during concurrent bidirectional streams:
Add these lines to /etc/sysctl.conf (or apply them temporarily via sysctl -w):
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.core.netdev_max_backlog = 10000
Apply the changes with:
sudo sysctl -p
4. Enable Jumbo Frames (If Supported by Switch/Peer)
If your network switch and peer testing machine support Jumbo Frames, increasing the MTU to 9000 drastically reduces the total packet count and lowers CPU interrupt overhead:
sudo ip link set eth0 mtu 9000
5. iperf3 Stream Tuning
When running iperf3, explicitly defining parallel streams (-P) or increasing the TCP window size (-w) often yields more stable aggregate results than a single monolithic bidirectional stream:
iperf3 -c <server_ip> -p 5201 -t 60 -P 4 --bidir