Skip to content

Instantly share code, notes, and snippets.

@dmzoneill
Created January 26, 2023 20:03
Show Gist options
  • Save dmzoneill/d13d88b16d4d0aa90cb108a00ab3cf01 to your computer and use it in GitHub Desktop.
Save dmzoneill/d13d88b16d4d0aa90cb108a00ab3cf01 to your computer and use it in GitHub Desktop.
10GB tuning
sysctl -w fs.file-max=2097152
sysctl -w vm.swappiness=10
sysctl -w vm.dirty_ratio=60
sysctl -w vm.dirty_background_ratio=2
sysctl -w kernel.sched_migration_cost_ns=5000000
sysctl -w kernel.sched_autogroup_enabled=0
sysctl -w net.ipv4.tcp_synack_retries=2
sysctl -w net.ipv4.ip_local_port_range=2000 65535
sysctl -w net.ipv4.tcp_rfc1337=1
sysctl -w net.ipv4.tcp_syncookies=1
sysctl -w net.ipv4.tcp_fin_timeout=15
sysctl -w net.ipv4.tcp_keepalive_time=300
sysctl -w net.ipv4.tcp_keepalive_probes=5
sysctl -w net.ipv4.tcp_keepalive_intvl=15
sysctl -w net.core.rmem_default=31457280
sysctl -w net.core.rmem_max=33554432
sysctl -w net.core.wmem_default=31457280
sysctl -w net.core.wmem_max=33554432
sysctl -w net.core.somaxconn=65535
sysctl -w net.core.netdev_max_backlog=65536
sysctl -w net.core.optmem_max=25165824
sysctl -w net.ipv4.tcp_mem=786432 1048576 26777216
sysctl -w net.ipv4.udp_mem=65536 131072 262144
sysctl -w net.ipv4.tcp_rmem=8192 87380 33554432
sysctl -w net.ipv4.udp_rmem_min=16384
sysctl -w net.ipv4.tcp_wmem=8192 65536 33554432
sysctl -w net.ipv4.udp_wmem_min=16384
sysctl -w net.ipv4.tcp_max_tw_buckets=1440000
sysctl -w net.ipv4.tcp_tw_recycle=1
sysctl -w net.ipv4.tcp_tw_reuse=1
sysctl -w net.ipv4.tcp_timestamps=0
sysctl -w net.ipv4.tcp_sack=0
sysctl -w net.ipv4.tcp_moderate_rcvbuf=1
ip link set dev eth4 mtu 9000
ethtool -K eth4 rx on
ethtool -K eth4 tx on
ethtool -K eth4 tso on
ethtool -K eth4 sg on
ethtool -K eth4 gso on
ip link set dev enp8s0f0 mtu 9000
ethtool -K enp8s0f0 rx on
ethtool -K enp8s0f0 tx on
ethtool -K enp8s0f0 tso on
ethtool -K enp8s0f0 sg on
ethtool -K enp8s0f0 gso on
ip link set dev eth4 mtu 9000
ethtool -K eth5 rx on
ethtool -K eth5 tx on
ethtool -K eth5 tso on
ethtool -K eth5 sg on
ethtool -K eth5 gso on
ash-4.4# ethtool -k eth4
Features for eth4:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: on
tx-checksum-ip-generic: off [fixed]
tx-checksum-ipv6: on
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: on
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp6-segmentation: on
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off
receive-hashing: on
highdma: on [fixed]
rx-vlan-filter: on
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-ipip-segmentation: off [fixed]
tx-sit-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
busy-poll: on [fixed]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment