DEV Community

Cover image for Network Optimization Tutorial For NVIDIA Jetson AGX Orin 64 GB
Sergio Andres Usma
Sergio Andres Usma

Posted on

Network Optimization Tutorial For NVIDIA Jetson AGX Orin 64 GB

Abstract

This tutorial documents a systematic approach to network performance optimization on an NVIDIA Jetson AGX Orin Developer Kit 64 GB running Ubuntu 22.04.5 LTS (aarch64) with JetPack 6.2.2, CUDA 12.6, cuDNN 9.3.0, OpenCV 4.8.0, and TensorRT 10.3.0.30. The procedure covers kernel TCP buffer tuning, MTU adjustment on the eno1 wired interface, APT parallel download configuration, and aria2 multi-connection download tooling. All steps include pre-change backups and a dedicated revert procedure.

The guide is structured as a production-oriented, step-by-step procedure rather than a reference summary. It includes a consolidated interactive Bash script that auto-detects the primary wired interface (eno1 or eth0), backs up affected configuration files before any changes, and applies each optimization only with explicit operator consent. Troubleshooting guidance is included for the RTNETLINK answers: Device or resource busy error encountered during MTU changes on Jetson hardware.

System administrators and Edge AI developers with intermediate Linux experience will benefit from this document when preparing a Jetson AGX Orin for workloads that involve frequent large model downloads, frequent package updates, or sustained high-bandwidth data transfers. The tutorial assumes shell access with sudo privileges and familiarity with a terminal text editor such as nano.


1. Prerequisites and Environment

1.1 Hardware and Software Specifications

The following table describes the environment in which all commands were validated. Applying these optimizations on a different JetPack release or kernel version may require adjusting parameter values.

Component Value
Hardware NVIDIA Jetson AGX Orin Developer Kit 64 GB
OS Ubuntu 22.04.5 LTS aarch64 (L4T 36.5.0)
JetPack nvidia-jetpack 6.2.2+b24
CUDA 12.6.68
cuDNN 9.3.0
OpenCV 4.8.0
TensorRT 10.3.0.30
Kernel 5.15.185-tegra

Table 1 — Validated hardware and software environment

1.2 Required Permissions and Tools

All system configuration steps require sudo access. The following tools are used throughout the tutorial and are available by default on JetPack installations: nano, cp, sysctl, ip, apt, ping, and bash. The aria2c binary is installed in Section 6.

1.3 Primary Wired Interface Name

On the Jetson AGX Orin Developer Kit, the wired Ethernet interface is exposed as eno1 under predictable network interface naming (udev rules). Some custom images or older configurations may still use eth0. Where commands target a specific interface, both names are provided. The ip link command identifies the correct name on any given system.


2. Pre-Change Backup Procedure

Before modifying any system configuration file, create timestamped backups using the .backup-pre-netopt suffix. This convention makes backup files easy to identify and is expected by the revert commands in Section 9.

Run the following once before proceeding to any subsequent section:

# Backup sysctl configuration
sudo cp /etc/sysctl.conf /etc/sysctl.conf.backup-pre-netopt

# Back up the APT parallel config only if it already exists
if [ -f /etc/apt/apt.conf.d/99parallel ]; then
  sudo cp /etc/apt/apt.conf.d/99parallel /etc/apt/apt.conf.d/99parallel.backup-pre-netopt
fi
Enter fullscreen mode Exit fullscreen mode

Verify the backup was created:

ls -lh /etc/sysctl.conf.backup-pre-netopt
Enter fullscreen mode Exit fullscreen mode

The backup captures the unmodified state of /etc/sysctl.conf. If the APT configuration file does not yet exist (first-time setup), no APT backup is created; the revert script handles this case by removing the file rather than restoring a backup.


3. Maximum Performance Mode

Dynamic CPU and GPU frequency scaling can reduce network throughput indirectly by limiting the processing available to TCP stack operations, protocol encryption, and receive-side data handling. NVIDIA provides two utilities to force the Jetson into its highest power and clock configuration:

sudo nvpmodel -m 0
sudo jetson_clocks
Enter fullscreen mode Exit fullscreen mode
  • nvpmodel -m 0 selects power model 0, which is the maximum performance profile on Jetson AGX Orin.
  • jetson_clocks locks CPU, GPU, and memory frequencies to their maximum values and disables dynamic frequency scaling.

These commands take effect immediately but do not persist across reboots. If your workload restarts after system reboots, add both commands to a startup service or run them manually before beginning large download or inference sessions.


4. Kernel Network Parameter Tuning

Kernel-level TCP parameters govern how much memory is allocated to socket buffers and how the TCP stack behaves under high-throughput conditions. The defaults in a stock Ubuntu image are conservative and were not tuned for sustained high-bandwidth transfers of the kind required when pulling large AI model checkpoints.

4.1 Edit sysctl Configuration

Open the sysctl configuration file:

sudo nano /etc/sysctl.conf
Enter fullscreen mode Exit fullscreen mode

Append the following block at the end of the file:

# Disable IPv6 (optional — avoids latency in name resolution on IPv4-only networks)
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

# Increase TCP buffers for high-speed downloads
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.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_window_scaling = 1
Enter fullscreen mode Exit fullscreen mode

Note: The IPv6 disable block is optional. Omit those three lines if the system connects to IPv6-only or dual-stack services. The interactive script in Section 8 prompts for this choice at runtime.

4.2 Apply the Configuration

Save the file and apply all settings immediately without rebooting:

sudo sysctl -p
Enter fullscreen mode Exit fullscreen mode

The output lists each applied parameter and its new value. The settings increase the maximum socket receive and send buffer sizes to 16 MB, expand the default and maximum TCP window memory, disable the slow-start penalty after a connection has been idle, and confirm that TCP window scaling is active.


5. MTU Adjustment for Wired Interface

The Maximum Transmission Unit (MTU) controls the largest payload that can be sent in a single Ethernet frame without IP fragmentation. A mismatch between the Jetson's MTU and the network path MTU can cause silent retransmissions and degraded throughput. On some networks, setting MTU to 1450 bytes avoids fragmentation caused by VPN or tunnel encapsulation overhead.

5.1 Identify the Active Wired Interface

List all network interfaces and their current MTU values:

ip link
Enter fullscreen mode Exit fullscreen mode

A typical output on Jetson AGX Orin looks like:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 ...
3: wlP1p1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 ...
5: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 4X:bX:4X:4X:6X:XX brd ff:ff:ff:ff:ff:ff
6: l4tbr0: <BROADCAST,MULTICAST> mtu 1500 ...
7: usb0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 ...
8: usb1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 ...
9: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 ...
Enter fullscreen mode Exit fullscreen mode

The active wired interface is the one in UP state with a hardware Ethernet address. On Jetson AGX Orin this is typically eno1. Only change the MTU of the interface that carries the traffic being optimized.

5.2 Change MTU at Runtime

For eno1:

sudo ip link set dev eno1 mtu 1450
Enter fullscreen mode Exit fullscreen mode

For systems using eth0:

sudo ip link set dev eth0 mtu 1450
Enter fullscreen mode Exit fullscreen mode

This change applies immediately but resets to 1500 on reboot. For a persistent configuration, use Netplan or NetworkManager as described in Section 5.4.

5.3 Troubleshooting: "RTNETLINK answers: Device or resource busy"

This error indicates that a higher-level service holds the interface or that the interface is a member of a bridge. It is common on Jetson because eno1 can be associated with the l4tbr0 bridge used for USB networking.

Option 1 — Bring the interface down, change MTU, then bring it back up:

sudo ip link set dev eno1 down
sudo ip link set dev eno1 mtu 1450
sudo ip link set dev eno1 up
Enter fullscreen mode Exit fullscreen mode

Replace eno1 with eth0 if that is the active interface. Connectivity is interrupted briefly while the interface is down.

Option 2 — Change MTU on the bridge instead of the physical interface:

If traffic passes through l4tbr0, apply the MTU to the bridge:

sudo ip link set dev l4tbr0 mtu 1450
Enter fullscreen mode Exit fullscreen mode

Verify connectivity immediately after this change.

Option 3 — Use the network manager to apply the change:

For NetworkManager-managed connections:

nmcli connection show
nmcli connection modify "<connection-name>" 802-3-ethernet.mtu 1450
nmcli connection down "<connection-name>"
nmcli connection up "<connection-name>"
Enter fullscreen mode Exit fullscreen mode

For Netplan-managed interfaces, edit the relevant YAML file (see Section 5.4) and apply.

If none of these options resolve the error without disrupting connectivity, leave the MTU at 1500 and focus on the kernel TCP tuning in Section 4 and the aria2 tooling in Section 6.

5.4 Persistent MTU via Netplan

To make the MTU change survive reboots, edit the Netplan configuration file for the interface. The file is typically located at /etc/netplan/01-netcfg.yaml or a similarly named file in /etc/netplan/:

sudo nano /etc/netplan/01-netcfg.yaml
Enter fullscreen mode Exit fullscreen mode

Add or update the mtu key for the interface:

network:
  ethernets:
    eno1:
      mtu: 1450
      dhcp4: true
  version: 2
Enter fullscreen mode Exit fullscreen mode

Apply the change:

sudo netplan apply
Enter fullscreen mode Exit fullscreen mode

6. APT Download Optimization and aria2 Installation

6.1 APT Parallel Download Configuration

APT downloads package lists and archives sequentially by default, which underutilizes available bandwidth when fetching many packages. A drop-in configuration file in /etc/apt/apt.conf.d/ can improve this behavior without modifying the main APT configuration.

Create the configuration snippet:

sudo nano /etc/apt/apt.conf.d/99parallel
Enter fullscreen mode Exit fullscreen mode

Add the following content:

Acquire::Languages "none";
Acquire::Queue-Mode "access";
Acquire::Retries "3";
Acquire::http::Pipeline-Depth "5";
Enter fullscreen mode Exit fullscreen mode
  • Acquire::Languages "none" suppresses the download of translated package description files, which are rarely needed on a headless Edge AI system.
  • Acquire::Queue-Mode "access" prioritizes fetching from the same server before switching, reducing connection overhead.
  • Acquire::Retries "3" retries failed downloads up to three times before failing.
  • Acquire::http::Pipeline-Depth "5" sends up to five HTTP requests in flight simultaneously on persistent connections, improving throughput on reliable links.

The changes take effect on the next sudo apt update or sudo apt upgrade invocation.

6.2 aria2 for Large File Downloads

For AI model checkpoints, dataset archives, or container images that exceed several gigabytes, aria2 opens multiple parallel connections to the same server and splits the file into segments. This approach can saturate available bandwidth more effectively than single-threaded tools such as wget or curl.

Install aria2:

sudo apt install aria2 -y
Enter fullscreen mode Exit fullscreen mode

Download a large file using 16 parallel connections and 16 segments:

aria2c -x 16 -s 16 "URL_TO_LARGE_FILE"
Enter fullscreen mode Exit fullscreen mode
  • -x 16 sets the maximum number of simultaneous connections per server.
  • -s 16 splits the download into 16 segments, each fetched by a separate connection.

Reduce both values on congested networks or when the target server enforces per-IP connection limits.


7. Consolidated Automation Script

The interactive script below consolidates all optimization steps into a single file. It detects the primary wired interface automatically, creates backups before any changes, and prompts for confirmation before each optimization section. IPv6 disabling and APT tuning are presented as optional to preserve compatibility with environments that depend on those behaviors.

Create the script file:

nano ~/jetson_network_opt.sh
Enter fullscreen mode Exit fullscreen mode

Paste the following content:

#!/usr/bin/env bash
set -e

echo "=== Jetson Network Optimization Script ==="
echo "This script will:"
echo "  - Backup /etc/sysctl.conf and /etc/apt/apt.conf.d/99parallel (if present)"
echo "  - Optionally tune kernel TCP parameters"
echo "  - Optionally disable IPv6"
echo "  - Optionally adjust MTU for the primary wired interface"
echo "  - Optionally optimize APT downloads"
echo "  - Optionally install aria2"
echo

read -rp "Continue? [y/N]: " CONTINUE
if [[ ! "$CONTINUE" =~ ^[Yy]$ ]]; then
  echo "Aborting."
  exit 0
fi

echo
echo "== Detecting primary wired interface =="

PRIMARY_IF=""
if ip link show eno1 &>/dev/null; then
  PRIMARY_IF="eno1"
elif ip link show eth0 &>/dev/null; then
  PRIMARY_IF="eth0"
fi

if [[ -z "$PRIMARY_IF" ]]; then
  echo "Warning: neither eno1 nor eth0 detected. You may need to edit this script to use your interface name."
else
  echo "Primary wired interface detected: $PRIMARY_IF"
fi

echo
echo "== 1) Backing up configuration files =="

if [ -f /etc/sysctl.conf ]; then
  sudo cp /etc/sysctl.conf /etc/sysctl.conf.backup-pre-netopt
  echo "Backup: /etc/sysctl.conf.backup-pre-netopt created."
fi

if [ -f /etc/apt/apt.conf.d/99parallel ]; then
  sudo cp /etc/apt/apt.conf.d/99parallel /etc/apt/apt.conf.d/99parallel.backup-pre-netopt
  echo "Backup: /etc/apt/apt.conf.d/99parallel.backup-pre-netopt created."
fi

echo
echo "== 2) Kernel TCP parameter tuning =="

read -rp "Apply TCP buffer and window tuning in /etc/sysctl.conf? [y/N]: " APPLY_TCP
if [[ "$APPLY_TCP" =~ ^[Yy]$ ]]; then
  sudo bash -c 'cat >> /etc/sysctl.conf <<EOF

# Jetson network optimization - TCP buffers
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.ipv4.tcp_slow_start_after_idle = 0
net.ipv4.tcp_window_scaling = 1
EOF'
  sudo sysctl -p
  echo "TCP parameters applied."
else
  echo "Skipping TCP parameter tuning."
fi

echo
echo "== 3) IPv6 behavior =="

echo "If you rely on IPv6 (e.g. IPv6-only or dual-stack networks), DO NOT disable it."
read -rp "Disable IPv6 via /etc/sysctl.conf? [y/N]: " DISABLE_IPV6
if [[ "$DISABLE_IPV6" =~ ^[Yy]$ ]]; then
  sudo bash -c 'cat >> /etc/sysctl.conf <<EOF

# Jetson network optimization - disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
EOF'
  sudo sysctl -p
  echo "IPv6 disabled (sysctl)."
else
  echo "Keeping IPv6 enabled."
fi

echo
echo "== 4) MTU adjustment for primary wired interface =="

if [[ -z "$PRIMARY_IF" ]]; then
  echo "No primary interface detected (eno1/eth0). Skipping MTU change."
else
  ip link show "$PRIMARY_IF"
  read -rp "Set MTU 1450 on $PRIMARY_IF (runtime only, reset on reboot)? [y/N]: " SET_MTU
  if [[ "$SET_MTU" =~ ^[Yy]$ ]]; then
    if ! sudo ip link set dev "$PRIMARY_IF" mtu 1450; then
      echo "Failed to set MTU on $PRIMARY_IF (device or resource busy?)."
      echo "You may need to adjust MTU via NetworkManager, Netplan, or a bridge (e.g. l4tbr0)."
    else
      echo "MTU adjustment attempted on $PRIMARY_IF."
    fi
  else
    echo "Skipping MTU change."
  fi
fi

echo
echo "== 5) APT optimization =="

echo "This will create or overwrite /etc/apt/apt.conf.d/99parallel."
read -rp "Apply APT optimization? [y/N]: " APPLY_APT
if [[ "$APPLY_APT" =~ ^[Yy]$ ]]; then
  sudo bash -c 'cat > /etc/apt/apt.conf.d/99parallel <<EOF
Acquire::Languages "none";
Acquire::Queue-Mode "access";
Acquire::Retries "3";
Acquire::http::Pipeline-Depth "5";
EOF'
  echo "APT optimization applied."
else
  echo "Skipping APT optimization."
fi

echo
echo "== 6) aria2 installation =="

read -rp "Install aria2 for multi-connection downloads? [y/N]: " INSTALL_ARIA2
if [[ "$INSTALL_ARIA2" =~ ^[Yy]$ ]]; then
  sudo apt update
  sudo apt install -y aria2
  echo "aria2 installed."
else
  echo "Skipping aria2 installation."
fi

echo
echo "All selected steps completed."
Enter fullscreen mode Exit fullscreen mode

Make the script executable and run it:

chmod +x ~/jetson_network_opt.sh
~/jetson_network_opt.sh
Enter fullscreen mode Exit fullscreen mode

The script exits cleanly if the operator declines any step. Interface detection runs once at startup and the result is reused for MTU operations. If neither eno1 nor eth0 is present, the MTU section is skipped automatically with a diagnostic message.


8. Reverting All Changes

If connectivity degrades or system behavior changes unexpectedly after applying these optimizations, revert to the pre-optimization state using the backups created in Section 2.

8.1 Restore sysctl and APT Configuration

Run the following to restore both configuration files:

# Restore sysctl configuration if backup exists
if [ -f /etc/sysctl.conf.backup-pre-netopt ]; then
  sudo cp /etc/sysctl.conf.backup-pre-netopt /etc/sysctl.conf
  echo "Restored /etc/sysctl.conf from backup."
  sudo sysctl -p
fi

# Restore APT optimization file if backup exists, otherwise remove it
if [ -f /etc/apt/apt.conf.d/99parallel.backup-pre-netopt ]; then
  sudo cp /etc/apt/apt.conf.d/99parallel.backup-pre-netopt /etc/apt/apt.conf.d/99parallel
  echo "Restored /etc/apt/apt.conf.d/99parallel from backup."
else
  if [ -f /etc/apt/apt.conf.d/99parallel ]; then
    sudo rm /etc/apt/apt.conf.d/99parallel
    echo "Removed /etc/apt/apt.conf.d/99parallel created by optimization."
  fi
fi
Enter fullscreen mode Exit fullscreen mode

The sysctl -p call within the restore block immediately reloads the original kernel parameters without requiring a reboot.

8.2 Revert MTU

The MTU change is runtime-only and resets automatically on the next reboot. To revert it immediately without rebooting:

sudo ip link set dev eno1 mtu 1500
Enter fullscreen mode Exit fullscreen mode

Or for eth0:

sudo ip link set dev eth0 mtu 1500
Enter fullscreen mode Exit fullscreen mode

8.3 Remove aria2

If aria2 was installed solely for this workflow and is no longer needed:

sudo apt remove -y aria2
Enter fullscreen mode Exit fullscreen mode

After reverting, re-run the connectivity verification in Section 9 to confirm normal operation.


9. Practical Outcomes

  • Maximum performance mode: nvpmodel -m 0 and jetson_clocks eliminate CPU and GPU frequency throttling, ensuring consistent processing headroom during sustained network activity. Both commands must be re-run after reboot unless integrated into a startup service.
  • Improved TCP buffer sizing: Kernel parameters raise socket buffer limits to 16 MB and disable the slow-start penalty after idle periods, measurably improving throughput on high-bandwidth links carrying large file transfers.
  • Optional IPv6 control: The IPv6 disable block is presented as an explicit choice rather than a default, preserving compatibility with dual-stack and IPv6-only environments. The interactive script enforces this distinction at runtime.
  • Correct interface targeting: MTU changes target eno1 by default on Jetson AGX Orin hardware, with automatic fallback to eth0 in the automation script. Three resolution paths for the RTNETLINK answers: Device or resource busy error are documented and tested.
  • APT efficiency: The 99parallel drop-in configuration reduces unnecessary package list downloads, enables HTTP pipelining, and adds retry resilience without modifying core APT behavior.
  • Multi-connection downloads: aria2c -x 16 -s 16 saturates available bandwidth when downloading large AI model archives from servers that permit multiple concurrent connections. The tool installs and removes cleanly via APT.
  • Safe configuration management: Backups with the .backup-pre-netopt suffix and a dedicated revert procedure reduce the risk of persistent misconfiguration. All changes can be undone without rebooting, except MTU (which also resets on reboot).

10. Conclusion

Applying the optimizations described in this tutorial to a Jetson AGX Orin 64 GB running JetPack 6.2.2 produces a measurable improvement in network throughput for Edge AI development workflows, particularly those involving repeated large model downloads and frequent JetPack package updates. The combination of maximum performance mode, expanded TCP buffers, interface-aware MTU adjustment, APT pipeline tuning, and aria2 multi-connection downloads addresses the principal bottlenecks encountered on this platform without requiring kernel rebuilds or third-party drivers.

The backup and revert procedures in Sections 2 and 8, together with the interactive automation script in Section 7, reduce operational risk to a level appropriate for both development and production-adjacent systems. Each optimization is applied with explicit consent and can be reversed independently.

For production deployments, consider encoding these settings into a configuration management tool such as Ansible, committing the Netplan YAML changes for persistent MTU configuration, and coordinating with the local network team to confirm that a 1450-byte MTU is appropriate for the network path in use. Document any deviations from the values shown here alongside the JetPack version in use, as kernel and L4T updates may change default TCP stack behavior.

Top comments (0)