Skip to content

GbE optimisations #5

Closed
Closed
@ThomasKaiser

Description

@ThomasKaiser

Tweaking RX/TX delay is an important step in the right direction. But assigning Ethernet IRQs to a dedicated CPU core might also be a good idea and also tweaking some tunables:

USB=usb2 ; MMC=sunxi-mmc ; GbE=1c30000.eth
echo 2 >/proc/irq/$(awk -F":" "/${USB}/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
echo 4 >/proc/irq/$(awk -F":" "/${MMC}/ {print \$1}" </proc/interrupts | head -n1 | sed 's/\ //g')/smp_affinity
echo 8 >/proc/irq/$(awk -F":" "/${GbE}/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity

sysctl -w net/core/rmem_max=8738000
sysctl -w net/core/wmem_max=6553600
sysctl -w net/ipv4/tcp_rmem="8192 873800 8738000"
sysctl -w net/ipv4/tcp_wmem="4096 655360 6553600"
sysctl -w vm/min_free_kbytes=65536
ip link set eth0 txqueuelen 10000

This is OS X to Pine64:

-----------------------------------------------------------
Accepted connection from 192.168.83.119, port 64508
[  5] local 192.168.83.88 port 5201 connected to 192.168.83.119 port 64509
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec   108 MBytes   901 Mbits/sec                  
[  5]   1.00-2.00   sec   111 MBytes   931 Mbits/sec                  
[  5]   2.00-3.00   sec   112 MBytes   939 Mbits/sec                  
[  5]   3.00-4.00   sec   112 MBytes   940 Mbits/sec                  
[  5]   4.00-5.00   sec   112 MBytes   940 Mbits/sec                  
[  5]   5.00-6.00   sec   111 MBytes   932 Mbits/sec                  
[  5]   6.00-7.00   sec   112 MBytes   940 Mbits/sec                  
[  5]   7.00-8.00   sec   112 MBytes   938 Mbits/sec                  
[  5]   8.00-9.00   sec   112 MBytes   940 Mbits/sec                  
[  5]   9.00-10.00  sec   112 MBytes   938 Mbits/sec                  
[  5]  10.00-10.01  sec   604 KBytes   937 Mbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.01  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.01  sec  1.09 GBytes   934 Mbits/sec                  receiver

In the other direction currently only ~430 Mbits/sec :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions