|
|
## Optimise Ethernet-based Fronthaul ##
|
|
|
This tutorial helps to improve the performance of Ethernet-based fronthaul.
|
|
|
|
|
|
First we need to stop all the irrelevant services, such as
|
|
|
|
|
|
```bash
|
|
|
$ service cpuspeed stop
|
|
|
$ service auditd stopupdate-rc.d ondemand disable
|
|
|
```
|
|
|
|
|
|
Second, we optimize the Ethernet using ethtool (`sudo apt install ethtool`):
|
|
|
|
|
|
1. Disable pause frames on Ethernet
|
|
|
2. Increase Ethernet Buffer rings
|
|
|
3. Set Ethernet interrupt coalescence mode (dynamic conservative mode is recommended)
|
|
|
4. Increase interface queue length
|
|
|
|
|
|
Assuming that your interface is `eth0`, perform the following commands:
|
|
|
|
|
|
```bash
|
|
|
$ ethtool –A eth0 autoneg off rx off tx off
|
|
|
$ ethtool –G eth0 rx 4096 tx 4096
|
|
|
$ ethtool –C eth0 rx-usecs 3
|
|
|
$ ifconfig eth0 txqueuelen 1000
|
|
|
```
|
|
|
Finally, we shall increase kernel socket buffer as follows:
|
|
|
|
|
|
```bash
|
|
|
sysctl -w net.core.rmem_max=8388608
|
|
|
sysctl -w net.core.wmem_max=8388608
|
|
|
sysctl -w net.core.rmem_default=65536
|
|
|
sysctl -w net.core.wmem_default=65536
|
|
|
```
|
|
|
|
|
|
Note that the actual value needs to be tuned most of these are coded in ethernet drive.
|
|
|
|
|
|
Additional optimisation:
|
|
|
|
|
|
1. Enable jumbo frames as follows:
|
|
|
|
|
|
```bash
|
|
|
$ ip link set eth0 mtu 9000
|
|
|
```
|
|
|
|
|
|
2. Offload all possible processing from kernel software into hardware.
|
|
|
|
|
|
```bash
|
|
|
$ ethtool -k eth0
|
|
|
$ ethtool -K tx-checksum-ipv4 on
|
|
|
$ ethtool -K tx-checksum-ipv6 on
|
|
|
```
|
|
|
|
|
|
3. For more, please have a look at [this](https://cromwell-intl.com/open-source/performance-tuning/ethernet.html)
|
|
|
|
|
|
|