Skip to content

Commit

Permalink
Merge pull request #13457 from JohnHammell/patch-2
Browse files Browse the repository at this point in the history
Update network_increase_bandwidth.md document with details for u18.04+
  • Loading branch information
tomponline committed May 17, 2024
2 parents 7c62405 + f9e20c0 commit affed4e
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions doc/howto/network_increase_bandwidth.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,32 @@ For the `net.core.netdev_max_backlog` value, a good guideline is to use the mini

## Increase the network bandwidth on the LXD host

````{tabs}
```{group-tab} Ubuntu >= 18.04
Complete the following steps to increase the network bandwidth on the LXD host:
1. Increase the transmit queue length (`txqueuelen`) of both the real NIC (for example, `enp5s0f1`) and the LXD NIC (for example, `lxdbr0`).
To make the change permanent, create a file named `/etc/udev/rules.d/60-custom-txqueuelen.rules` with the following content:
KERNEL=="enp5s0f1", RUN+="/sbin/ip link set %k txqueuelen 10000"
KERNEL=="lxdbr0", RUN+="/sbin/ip link set %k txqueuelen 10000"
Apply the above `udev` rules via:
udevadm trigger
1. Increase the receive queue length (`net.core.netdev_max_backlog`).
To make the change permanent, add the following configuration to `/etc/sysctl.conf`:
net.core.netdev_max_backlog = 182757
Apply the above `sysctl.conf` change via:
sysctl -p
```
```{group-tab} Ubuntu <= 17.04
Complete the following steps to increase the network bandwidth on the LXD host:
1. Increase the transmit queue length (`txqueuelen`) of both the real NIC and the LXD NIC (for example, `lxdbr0`).
Expand All @@ -38,6 +64,9 @@ Complete the following steps to increase the network bandwidth on the LXD host:
To make the change permanent, add the following configuration to `/etc/sysctl.conf`:
net.core.netdev_max_backlog = 182757
```
````

## Increase the transmit queue length on the instances

Expand All @@ -46,3 +75,6 @@ To do this, use one of the following methods:

- Apply the same changes as described above for the LXD host.
- Set the `queue.tx.length` device option on the instance profile or configuration.
For example, to do this for the LXD default profile:

lxc profile device set default eth0 queue.tx.length "10000"

0 comments on commit affed4e

Please sign in to comment.