forked from openshift/cluster-node-tuning-operator
/
tuned.conf
65 lines (53 loc) · 2.59 KB
/
tuned.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# tuned configuration
#
[main]
summary=Optimize for CPU partitioning
include=network-latency
[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}}
cmd_isolcpus=${f:regex_search_ternary:${no_balance_cores}:\s*[0-9]: isolcpus=${no_balance_cores}:}
[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
[systemd]
cpu_affinity=${not_isolated_cores_expanded}
[irqbalance]
banned_cpus=${isolated_cores}
[script]
priority=5
script=${i:PROFILE_DIR}/script.sh
[scheduler]
isolated_cores=${isolated_cores}
ps_blacklist=.*pmd.*;.*PMD.*;^DPDK;.*qemu-kvm.*;^contrail-vroute$;^lcore-slave-.*;^rte_mp_handle$;^rte_mp_async$;^eal-intr-thread$
[bootloader]
priority=10
initrd_remove_dir=True
initrd_dst_img=tuned-initrd.img
initrd_add_dir=${tmpdir}
cmdline_cpu_part=+nohz=on${cmd_isolcpus} nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores} tuned.non_isolcpus=${not_isolated_cpumask} intel_pstate=disable nosoftlockup