]>
git.proxmox.com Git - ceph.git/blob - ceph/src/seastar/scripts/posix_net_conf.sh
3 # ! Usage: posix_net_conf.sh [iface name, eth0 by default] [-mq|-sq] [--cpu-mask] [-h|--help] [--use-cpu-mask <mask>]
5 # ! Ban NIC IRQs from being moved by irqbalance.
7 # ! -sq - set all IRQs of a given NIC to CPU0 and configure RPS
8 # ! to spreads NAPIs' handling between other CPUs.
10 # ! -mq - distribute NIC's IRQs among all CPUs instead of binding
11 # ! them all to CPU0. In this mode RPS is always enabled to
12 # ! spreads NAPIs' handling between all CPUs.
14 # ! --options-file <YAML file> - YAML file with perftune.py options
16 # ! If there isn't any mode given script will use a default mode:
17 # ! - If number of physical CPU cores per Rx HW queue is greater than 4 - use the '-sq' mode.
18 # ! - Otherwise use the '-mq' mode.
20 # ! --use-cpu-mask <mask> - mask of cores to use, by default use all available cores
22 # ! --cpu-mask - Print out RPS CPU assignments. On MQ NIC, just print all cpus.
24 # ! -h|--help - print this help information
26 # ! Enable XPS, increase the default values of somaxconn and tcp_max_syn_backlog.
31 cat $0 |
grep ^
"# !" | cut
-d"!" -f2-
50 CPU_MASK
="--get-cpu-mask"
53 CPU_FILTER_MASK
="--cpu-mask $2"
57 OPTIONS_FILE
="--options-file $2"
81 $MY_DIR/perftune.py
--nic $IFACE $MQ_MODE $CPU_FILTER_MASK $CPU_MASK $OPTIONS_FILE --tune net