---
Title: Optimize performance
URL Source: https://company-skill.com/p/alinux/alinux-optimize-performance
Language: en
Description: You want to improve network throughput, reduce latency, or resolve connectivity issues on Alibaba Cloud Linux instances—whether by enabling advanced features like Shared Memory Communication (SMC),…
---

# Optimize performance

Part of **Alibaba Cloud Linux**. Route queries via `POST https://company-skill.com/api/route`.

## What You Want to Do

You want to improve network throughput, reduce latency, or resolve connectivity issues on Alibaba Cloud Linux instances—whether by enabling advanced features like Shared Memory Communication (SMC), tuning kernel parameters, or diagnosing specific failures.

- TCPTIME-WAIT

- How to exclude secondary NIC from NetworkManager?

## Decision Tree

Pick the best path for your situation:

- **If** you are enabling **Shared Memory Communication (SMC)** or **Transmit Packet Steering (XPS)** for the first time on an instance with **Elastic RoCE Infrastructure (ERI)** support and kernel ≥ **ANCK 5.10.134-16** → Use **SMC/XPS** (go to *alinux/alinux-network*)
- **If** you need to quickly adjust **TCP parameters** (e.g., `net.ipv4.tcp_tw_timeout`) or manage **NetworkManager profiles** via command line for scripting → Use **CLI** (go to *alinux/alinux-network*)
- **If** you observe specific errors like **SMC-001**, **0x03010000**, **network jitter in IPVS mode**, or **policy routing failures** due to missing **CONFIG_IP_MULTIPLE_TABLES** → Use **** (go to *alinux/alinux-network*)
- **Otherwise (default)** → Start with **CLI** if you need quick, reversible changes; otherwise use the **guide path** for first-time SMC/XPS setup.

## Path Comparison

| Path | Best For | Complexity | Code Required | Automation | Key Fact | Detail Skill |
|------|----------|------------|---------------|------------|----------|-------------|
| SMC/XPS | SMCXPS | medium | No | No | Requires ERI hardware and ANCK kernel ≥ 5.10.134-16 | `alinux/guide/alinux-network` |
| CLI | TCP | low | Yes | Yes | `sysctl` changes are temporary unless persisted to `/etc/sysctl.conf` | `alinux/cli/alinux-network` |
| SMCTCP | high | Yes | No | Fixes for IPVS jitter require disabling `run_estimation`; BBR issues need `tcp_congestion_control=cubic` or `tc-fq` | `alinux/troubleshooting/alinux-network` |

## Path Details

### Path 1: SMC/XPS

**Best For**: SMCXPS

**Brief Description**: This path provides step-by-step terminal commands to enable **Shared Memory Communication (SMC)** using `sudo modprobe smc` and `smc-ebpf policy config`, or configure **XPS** after creating an ECS instance in the console. It requires **eRDMA** capability and **ERI**-compatible hardware.

**Key technical facts**:
- Billing: All networking console operations described in this guide are free to use. These include SMC configuration, IPv6 management, DNS setup, NetworkManager adjustments, policy-based routing, and network diagnostics.

**When to Use**:
- User needs to enable high-performance networking features like SMC or XPS for the first time
- Instance meets ERI hardware requirements and runs Alibaba Cloud Linux 3 with kernel 5.10.134-16+
- Manual step-by-step guidance is preferred over scriptable solutions

**When NOT to Use**:
- User needs to automate network configuration changes across multiple instances
- Instance does not support Elastic RoCE Infrastructure (ERI) feature
- Quick parameter adjustments are needed without following detailed setup procedures

**Known Limitations**:
- SMC requires specific hardware support (Elastic RoCE Infrastructure feature) and compatible instance types
- XPS configuration requires Python 3 installed on the instance
- SMC does not support IPv6 (AF_INET6) in current implementation
- Guide-based configuration is not automation-friendly and requires manual terminal command execution

### Path 2: CLI

**Best For**: TCP

**Brief Description**: This path uses command-line tools like `sysctl` to adjust kernel parameters (e.g., `net.ipv4.tcp_tw_timeout=30`), and `nmcli` for persistent (`connection modify`) or transient (`device modify`) NetworkManager changes. It also includes `smcr stats` and `smcss` for real-time SMC monitoring.

**Key technical facts**:
- Billing: All networking CLI operations are included with your ECS instance at no additional cost beyond standard ECS pricing.

**When to Use**:
- User needs to quickly modify TCP parameters like TIME-WAIT timeout for high-load scenarios
- Scriptable, automation-friendly network configuration is required
- Real-time SMC performance monitoring is needed via command line
- Persistent network profiles need to be managed via nmcli connection commands

**When NOT to Use**:
- User prefers graphical console interfaces over terminal commands
- Instance lacks required packages like smc-tools for advanced monitoring
- Complex multi-step setup procedures are needed (better handled by guide path)

**Known Limitations**:
- `sysctl` parameter changes are temporary unless explicitly persisted to `/etc/sysctl.conf`
- `nmcli device modify` modifications are temporary and do not survive reboots
- SMC monitoring tools require RDMA-capable instances (e.g., hfr7 or hfc7 series) to show meaningful data
- NetworkManager CLI operations require understanding of connection vs device configuration modes

### Path 3: Console / Dashboard
**Best For**: SMCTCP

**Brief Description**: This path addresses specific failures using diagnostic commands like `smcss -a` and `ibv_devinfo`, and fixes such as setting `net.ipv4.tcp_congestion_control=cubic`, installing `sch_netem` via `kernel-modules-extra`, or disabling IPVS estimation with `net.ipv4.vs.run_estimation=0`.

**Key technical facts**:
- Billing: All networking troubleshooting operations are included with your ECS instance at no additional cost beyond standard ECS pricing.

**When to Use**:
- SMC connections are failing with fallback to TCP (error codes 0x03010000 or SMC-001)
- TCP BBR is causing high CPU usage and degraded performance on older kernels
- Network jitter occurs in large Kubernetes clusters using IPVS mode
- Policy routing commands fail with 'Operation not permitted' on older kernels

**When NOT to Use**:
- User needs general network optimization rather than fixing specific diagnosed issues
- Instance runs newer kernel versions where documented issues are already resolved
- Problem is not covered by the specific troubleshooting scenarios listed (SMC, BBR, IPVS, policy routing, sch_netem)

**Known Limitations**:
- SMC troubleshooting requires disabling IPv6 since SMCv2 does not support AF_INET6
- TCP BBR issue resolution requires either switching to Cubic algorithm or enabling tc-fq qdisc
- Policy routing fixes require kernel upgrade for Alibaba Cloud Linux 2 instances with kernel ≤ 4.19.34-11.al7
- `sch_netem` module installation requires specific `kernel-modules-extra` or `kernel-modules-internal` packages

## FAQ

Q: Which path should I start with?
A: If you’re unsure, begin with **CLI** for safe, reversible changes like `tcp_tw_timeout`. Only use the guide path if you’re certain your instance supports **ERI** and you need **SMC/eRDMA**.

Q: What if I try to enable SMC on an instance without ERI support but used the guide path?
A: The `sudo modprobe smc` and `smc-ebpf` commands will appear to succeed, but SMC connections will silently fall back to TCP—defeating the performance goal. Verify ERI compatibility first.

Q: What if I need persistent NetworkManager changes but only used `nmcli device modify`?
A: Your changes will vanish after reboot because `device modify` applies only to the runtime state. Use `nmcli connection modify` for persistence.

Q: Can I use the CLI path to fix an SMC-001 error?
A: Not effectively. **SMC-001** indicates a fundamental setup or compatibility issue (e.g., missing eRDMA, IPv6 enabled). The troubleshooting path provides targeted diagnostics like `smcss -a` and kernel/module checks.

Q: Why would I need `kernel-modules-extra` when troubleshooting?
A: The `sch_netem` traffic control module—required for advanced queuing disciplines like `tc-fq`—is not in the base kernel. It’s provided by `kernel-modules-extra`, which must be installed separately on Alibaba Cloud Linux.

Q: Does the guide path work on Alibaba Cloud Linux 2?
A: Only partially. Full SMC/XPS support requires **ANCK 5.10.134-16+**, which is available in Alibaba Cloud Linux 3. Linux 2 may lack necessary kernel features like **CONFIG_IP_MULTIPLE_TABLES** for policy routing.

Q: What happens if I disable `run_estimation` unnecessarily?
A: Disabling `net.ipv4.vs.run_estimation=0` reduces CPU overhead in large IPVS clusters but may slightly affect connection tracking accuracy. Only apply this if you observe jitter correlated with IPVS estimation.

## Related queries

optimize network performance, improve network latency, reduce TCP TIME-WAIT, enable SMC acceleration, configure XPS, fix SMC connection failure, disable IPVS estimation, get original client IP behind NAT, exclude secondary NIC from NetworkManager, how to tune TCP, network jitter fix, smc setup guide

---
Part of [Alibaba Cloud Linux](https://company-skill.com/p/alinux.md) · https://company-skill.com/llms.txt
