Available system optimizations?

I found this document but I think it can get improved:

In my case Im at 1.4 rolling so perhaps thats why some commands differs?

  1. Network card and driver optimization:

It mentions using ethtool to set the ring-buffers but today one can do this through configuration:

set interfaces ethernet eth0 ring-buffer rx 4096
set interfaces ethernet eth0 ring-buffer tx 4096

  1. SMP Affinity.

The commands mentioned here for example:

set interfaces ethernet eth0 smp_affinity 1
set interfaces ethernet eth1 smp_affinity 2

doesnt exist at all in version VyOS 1.4-rolling-202307060317 or am I missing something here?

Followup to above is that perhaps various interface offload settings should be mentioned?

Such as:

set interfaces ethernet eth0 offload gro
set interfaces ethernet eth0 offload gso
set interfaces ethernet eth0 offload lro
set interfaces ethernet eth0 offload rfs
set interfaces ethernet eth0 offload rps
set interfaces ethernet eth0 offload sg
set interfaces ethernet eth0 offload tso

And the system option performance:

set system option performance throughput

or:

set system option performance latency

as described in:

https://docs.vyos.io/en/equuleus/configuration/system/option.html#performance

Other than that whats your experience of needed optimizations (compare to default) to make VyOS work better/faster?

2 Likes

Maybe not completely tuning… but needed when using an i40e card like the Intel XL710. In the /config/scripts/vyos/vyos-preconfig-bootup.script

for f in /sys/class/net/*; do
    dev=$(basename $f)
    driver=$(readlink $f/device/driver/module)
    if [[ -n $driver ]] && [[ x"$(basename $driver)" -eq x"i40e" ]]; then
        ethtool --set-priv-flags $dev disable-source-pruning on
        ethtool --set-priv-flags $dev disable-fw-lldp on
        ethtool -C $dev adaptive-rx off adaptive-tx off
    fi
done

Out of the blue that sounds like something that should already be included by default in vyos-preconfig-bootup.script?

You don’t need any tunning as you don’t have any bottlenecks.
So it depends