Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE Enterprise Storage 6

C Network Tuning Edit source

This script uses Salt to apply a number of settings to a cluster. This was used during testing so that parameters could be rapidly adjusted. It is intended to be an example only and is not intended for use without modification.

 #!/bin/bash
 #These commands tune the write size of the pcie interface for the NIC cards.
 salt '*' cmd.run 'setpci -s 5b:00.0 68.w=5936'
 salt '*' cmd.run 'setpci -s 5b:00.1 68.w=5936'

 #Set Jumbo Frames
 salt '*' cmd.run 'ip link set bond0 mtu 9000'

 #Set the rx queue for rx-0 to use all CPU cores local to the device.
 salt '*' cmd.run 'for j in `cat /sys/class/net/bond0/bonding/slaves`;do LOCAL_CPUS=`cat /sys/class/net/$j/device/local_cpus`;echo $LOCAL_CPUS > /sys/class/net/$j/queues/rx-0/rps_cpus;done'

 #Set send and recieve buffers for both network interfaces involved in the bond
 salt '*' cmd.run 'ethtool -G eth4 rx 8192 tx 8192'
 salt '*' cmd.run 'ethtool -G eth5 rx 8192 tx 8192'

 #Ensure SACK is on
 salt '*' cmd.run 'sysctl -w net.ipv4.tcp_sack=1'
 #Ensure timestamps are on to prevent possible drops
 salt '*' cmd.run 'sysctl -w net.ipv4.tcp_timestamps=1'

 #Set the max conections to 2048
 salt '*' cmd.run 'sysctl -w net.core.somaxconn=2048'

 #Set TCP to low latency
 salt '*' cmd.run 'sysctl -w net.ipv4.tcp_low_latency=1'
 salt '*' cmd.run 'sysctl -w net.ipv4.tcp_fastopen=1'

 #Set min, default, and max send and receive buffers
 salt '*' cmd.run 'sysctl -w net.ipv4.tcp_rmem="10240 87380 2147483647"'
 salt '*' cmd.run 'sysctl -w net.ipv4.tcp_wmem="10240 87380 2147483647"'

 salt '*' cmd.run 'sysctl -w net.core.netdev_max_backlog=250000'