101 lines
3.3 KiB
Plaintext
101 lines
3.3 KiB
Plaintext
[main]
|
|
summary=Optimize for TSG-OS
|
|
|
|
[cpu]
|
|
force_latency=cstate.id_no_zero:1|3
|
|
governor=performance
|
|
energy_perf_bias=performance
|
|
min_perf_pct=100
|
|
|
|
[variables]
|
|
# User is responsible for updating variables.conf with variable content such as isolated_cores=X-Y
|
|
include=/etc/tuned/cpu-partitioning-variables.conf
|
|
|
|
isolated_cores_assert_check = \\${isolated_cores}
|
|
# Make sure isolated_cores is defined before any of the variables that
|
|
# use it (such as assert1) are defined, so that child profiles can set
|
|
# isolated_cores directly in the profile (tuned.conf)
|
|
isolated_cores = ${isolated_cores}
|
|
# Fail if isolated_cores are not set
|
|
assert1=${f:assertion_non_equal:isolated_cores are set:${isolated_cores}:${isolated_cores_assert_check}}
|
|
|
|
# tmpdir
|
|
tmpdir=${f:strip:${f:exec:mktemp:-d}}
|
|
# Non-isolated cores cpumask including offline cores
|
|
isolated_cores_expanded=${f:cpulist_unpack:${isolated_cores}}
|
|
isolated_cpumask=${f:cpulist2hex:${isolated_cores_expanded}}
|
|
not_isolated_cores_expanded=${f:cpulist_invert:${isolated_cores_expanded}}
|
|
isolated_cores_online_expanded=${f:cpulist_online:${isolated_cores}}
|
|
not_isolated_cores_online_expanded=${f:cpulist_online:${not_isolated_cores_expanded}}
|
|
not_isolated_cpumask=${f:cpulist2hex:${not_isolated_cores_expanded}}
|
|
# Make sure no_balance_cores is defined before
|
|
# no_balance_cores_expanded is defined, so that child profiles can set
|
|
# no_balance_cores directly in the profile (tuned.conf)
|
|
no_balance_cores=${no_balance_cores}
|
|
no_balance_cores_expanded=${f:cpulist_unpack:${no_balance_cores}}
|
|
|
|
# Fail if isolated_cores contains CPUs which are not online
|
|
assert2=${f:assertion:isolated_cores contains online CPU(s):${isolated_cores_expanded}:${isolated_cores_online_expanded}}
|
|
|
|
[sysfs]
|
|
/sys/bus/workqueue/devices/writeback/cpumask = ${not_isolated_cpumask}
|
|
/sys/devices/virtual/workqueue/cpumask = ${not_isolated_cpumask}
|
|
/sys/devices/virtual/workqueue/*/cpumask = ${not_isolated_cpumask}
|
|
/sys/devices/system/machinecheck/machinecheck*/ignore_ce = 1
|
|
|
|
[sysctl]
|
|
# read/write buffer
|
|
net.core.rmem_default = 256960
|
|
net.core.rmem_max = 33554432
|
|
net.core.wmem_default = 256960
|
|
net.core.wmem_max = 33554432
|
|
|
|
# disable rpfilter
|
|
net.ipv4.conf.all.rp_filter=0
|
|
net.ipv4.conf.default.rp_filter=0
|
|
|
|
# fs
|
|
fs.file-max=1048576
|
|
net.core.netdev_max_backlog=1000000
|
|
net.core.somaxconn=131072
|
|
|
|
# tcp options about TIME_WAIT
|
|
net.ipv4.tcp_fin_timeout=10
|
|
net.ipv4.tcp_tw_reuse=1
|
|
net.ipv4.tcp_max_tw_buckets=4096
|
|
net.ipv4.tcp_max_orphans=131072
|
|
net.ipv4.tcp_max_syn_backlog=131072
|
|
|
|
# bbr
|
|
net.ipv4.tcp_congestion_control=bbr
|
|
|
|
# tcp feature
|
|
net.ipv4.tcp_ecn=0
|
|
net.ipv4.tcp_sack=1
|
|
net.ipv4.tcp_timestamps=1
|
|
|
|
# disable tcp windows scaling for kernel bugs
|
|
net.ipv4.tcp_window_scaling=0
|
|
|
|
|
|
[systemd]
|
|
cpu_affinity=${not_isolated_cores_expanded}
|
|
|
|
[irqbalance]
|
|
banned_cpus=${isolated_cores}
|
|
|
|
[script]
|
|
priority=5
|
|
script=/usr/lib/tuned/cpu-partitioning/script.sh
|
|
|
|
[scheduler]
|
|
group.default=0:*:0:${not_isolated_cpumask}:.*:.*
|
|
group.isolate=1:*:0:*:.*:^(pkt:worker|shape-work-.*|sapp_marsio_.*|sce:worker-.*|lcore-worker-.*|.*pmd.*|.*PMD.*|DPDK|.*qemu-kvm.*|contrail-vroute|lcore-slave-.*|rte_mp_handle|rte_mp_async|eal-intr-thread)$
|
|
isolated_cores=${isolated_cores}
|
|
ps_blacklist=^pkt:worker;^shape-work-.*;^sapp_marsio_.*;^sce:worker-.*;^lcore-worker-.*;.*pmd.*;.*PMD.*;^DPDK;.*qemu-kvm.*;^contrail-vroute$;^lcore-slave-.*;^rte_mp_handle$;^rte_mp_async$;^eal-intr-thread$
|
|
perf_process_fork=True
|
|
perf_mmap_pages=4096
|
|
runtime=1
|
|
|
|
|