Skip to content

Commit 12eb337

Browse files
committed
Small text changes
1 parent f87da75 commit 12eb337

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

articles/virtual-network/virtual-network-optimize-network-bandwidth.md

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -89,64 +89,64 @@ sudo reboot
8989

9090
Most modern distributions should have significant improvements with kernels newer than 4.19+. Check the current kernel version to make sure that you're running a newer kernel.
9191

92-
### Optimizing network performance in Linux VMs on Azure
92+
## Optimizing cross-region transfer speeds in Azure Linux VMs
9393

9494
Azure Linux VMs often experience network performance issues, particularly when transferring large files (1GB to 50GB) between regions, such as West Europe and West US. These issues are caused by suboptimal kernel configurations, network buffer settings, and default congestion control algorithms, which result in delayed packets, limited throughput, and inefficient resource usage.
9595

9696
To enhance network performance, consider implementing the following optimizations that have been proven effective in a number of situations on Azure:
9797

9898
- **Network buffer settings**: Adjust kernel parameters to maximize read and write memory buffers. Add these configurations to `/etc/sysctl.d/99-azure-network-buffers.conf`:
9999

100-
```plaintext
101-
net.core.rmem_max = 2147483647
102-
net.core.wmem_max = 2147483647
103-
net.ipv4.tcp_rmem = 4096 67108864 1073741824
104-
net.ipv4.tcp_wmem = 4096 67108864 1073741824
105-
```
100+
```plaintext
101+
net.core.rmem_max = 2147483647
102+
net.core.wmem_max = 2147483647
103+
net.ipv4.tcp_rmem = 4096 67108864 1073741824
104+
net.ipv4.tcp_wmem = 4096 67108864 1073741824
105+
```
106106

107107
- **Congestion control**: Enabling BBR congestion control can often result in better throughput. Add this configuration to `/etc/sysctl.d/99-azure-congestion-control.conf`:
108108

109109
- Ensure the BBR module is loaded by adding it to `/etc/modules-load.d/99-azure-tcp-bbr.conf`:
110110

111-
```plaintext
112-
tcp_bbr
113-
```
111+
```plaintext
112+
tcp_bbr
113+
```
114114

115-
```plaintext
116-
net.ipv4.tcp_congestion_control = bbr
117-
```
115+
```plaintext
116+
net.ipv4.tcp_congestion_control = bbr
117+
```
118118

119119
- **Queue discipline (qdisc)**: Packet processing in Azure is generally improved by setting the default qdisc to `fq`. Add this configuration to `/etc/sysctl.d/99-azure-qdisc.conf`:
120120

121-
```plaintext
122-
net.core.default_qdisc = fq
123-
```
121+
```plaintext
122+
net.core.default_qdisc = fq
123+
```
124124

125125
- Create a udev rule in `/etc/udev/rules.d/99-azure-qdisc.rules` to ensure the qdisc is applied to network interfaces:
126126

127-
```plaintext
128-
ACTION=="add|change", SUBSYSTEM=="net", KERNEL=="enP*", PROGRAM="/sbin/tc qdisc replace dev \$env{INTERFACE} root noqueue"
129-
ACTION=="add|change", SUBSYSTEM=="net", KERNEL=="eth*", PROGRAM="/sbin/tc qdisc replace dev \$env{INTERFACE} root fq“
130-
```
127+
```plaintext
128+
ACTION=="add|change", SUBSYSTEM=="net", KERNEL=="enP*", PROGRAM="/sbin/tc qdisc replace dev \$env{INTERFACE} root noqueue"
129+
ACTION=="add|change", SUBSYSTEM=="net", KERNEL=="eth*", PROGRAM="/sbin/tc qdisc replace dev \$env{INTERFACE} root fq“
130+
```
131131

132132
- **IRQ scheduling**: Depending on your workload, you may wish to restrict the irqbalance service from scheduling IRQs on certain nodes. Update `/etc/default/irqbalance` with the following configuration:
133133

134-
```bash
135-
IRQBALANCE_BANNED_CPULIST=0-2
136-
```
134+
```bash
135+
IRQBALANCE_BANNED_CPULIST=0-2
136+
```
137137

138138
- **udev rules**: Add rules to optimize queue length and manage device flags efficiently. Create the following rule in `/etc/udev/rules.d/99-azure-txqueue-len.rules`:
139139

140-
```plaintext
141-
SUBSYSTEM=="net", ACTION=="add|change", KERNEL=="eth*", ATTR{tx_queue_len}="10000“
142-
```
140+
```plaintext
141+
SUBSYSTEM=="net", ACTION=="add|change", KERNEL=="eth*", ATTR{tx_queue_len}="10000“
142+
```
143143

144-
#### For Packets delayed twice
144+
### For Packets delayed twice
145145

146146
When it comes to Linux performance networking we use SR-IOV with Mellanox drivers (mlx4 or mlx5), something specific to Azure is that this creates two interfaces a synthetic and a virtual interface. [Learn More](/azure/virtual-network/accelerated-networking-how-it-works).
147147

148148

149-
#### Additional Notes
149+
### Additional Notes
150150

151151
System administrators can implement these solutions by editing configuration files such as `/etc/sysctl.d/`, `/etc/modules-load.d/`, and `/etc/udev/rules.d/`. Ensure that kernel driver updates and systemd configurations are reviewed for potential regressions.
152152

0 commit comments

Comments
 (0)