import tuned-2.18.0-2.el8

This commit is contained in:
CentOS Sources 2022-05-10 03:20:05 -04:00 committed by Stepan Oksanichenko
parent 7c8495948e
commit 3c09f9ff01
6 changed files with 205 additions and 15 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/tuned-2.16.0.tar.gz SOURCES/tuned-2.18.0.tar.gz

View File

@ -1 +1 @@
e20fcfb734f869fb175cb88dc7ef6e5eb3cd5946 SOURCES/tuned-2.16.0.tar.gz 9e94ee0e46bc1a3d0548eee6a33bc04b4676e825 SOURCES/tuned-2.18.0.tar.gz

View File

@ -0,0 +1,53 @@
From e1b21f23c9ca00bf9f399165c4d46d647f3946ca Mon Sep 17 00:00:00 2001
From: Paolo Abeni <pabeni@redhat.com>
Date: Wed, 9 Feb 2022 17:15:46 +0100
Subject: [PATCH] raise the netfilter hash table size in
openshift/atomic-{host,guest} to match the max netfilter conntrack entries,
reducing such hash table load.
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
profiles/atomic-guest/tuned.conf | 2 +-
profiles/atomic-host/tuned.conf | 2 +-
profiles/openshift/tuned.conf | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/profiles/atomic-guest/tuned.conf b/profiles/atomic-guest/tuned.conf
index c5a9417d..fe8d382a 100644
--- a/profiles/atomic-guest/tuned.conf
+++ b/profiles/atomic-guest/tuned.conf
@@ -10,7 +10,7 @@ include=virtual-guest
avc_cache_threshold=65536
[net]
-nf_conntrack_hashsize=131072
+nf_conntrack_hashsize=1048576
[sysctl]
kernel.pid_max=131072
diff --git a/profiles/atomic-host/tuned.conf b/profiles/atomic-host/tuned.conf
index 968366fa..91ea5555 100644
--- a/profiles/atomic-host/tuned.conf
+++ b/profiles/atomic-host/tuned.conf
@@ -10,7 +10,7 @@ include=throughput-performance
avc_cache_threshold=65536
[net]
-nf_conntrack_hashsize=131072
+nf_conntrack_hashsize=1048576
[sysctl]
kernel.pid_max=131072
diff --git a/profiles/openshift/tuned.conf b/profiles/openshift/tuned.conf
index 9019c05e..9815fb9e 100644
--- a/profiles/openshift/tuned.conf
+++ b/profiles/openshift/tuned.conf
@@ -10,7 +10,7 @@ include=${f:virt_check:virtual-guest:throughput-performance}
avc_cache_threshold=8192
[net]
-nf_conntrack_hashsize=131072
+nf_conntrack_hashsize=1048576
[sysctl]
net.ipv4.ip_forward=1

View File

@ -1,5 +1,5 @@
diff --git a/profiles/latency-performance/tuned.conf b/profiles/latency-performance/tuned.conf diff --git a/profiles/latency-performance/tuned.conf b/profiles/latency-performance/tuned.conf
index da1e357..66f06ae 100644 index d200b5c..877229f 100644
--- a/profiles/latency-performance/tuned.conf --- a/profiles/latency-performance/tuned.conf
+++ b/profiles/latency-performance/tuned.conf +++ b/profiles/latency-performance/tuned.conf
@@ -32,3 +32,16 @@ vm.dirty_background_ratio=3 @@ -32,3 +32,16 @@ vm.dirty_background_ratio=3
@ -20,7 +20,7 @@ index da1e357..66f06ae 100644
+# (system default is 500000, i.e. 0.5 ms) +# (system default is 500000, i.e. 0.5 ms)
+sched_migration_cost_ns = 5000000 +sched_migration_cost_ns = 5000000
diff --git a/profiles/sap-hana/tuned.conf b/profiles/sap-hana/tuned.conf diff --git a/profiles/sap-hana/tuned.conf b/profiles/sap-hana/tuned.conf
index 81d5930..c91a9ee 100644 index aeecf53..8dcee57 100644
--- a/profiles/sap-hana/tuned.conf --- a/profiles/sap-hana/tuned.conf
+++ b/profiles/sap-hana/tuned.conf +++ b/profiles/sap-hana/tuned.conf
@@ -20,3 +20,7 @@ kernel.numa_balancing = 0 @@ -20,3 +20,7 @@ kernel.numa_balancing = 0
@ -68,13 +68,13 @@ index 98c6b26..ebb3f7d 100644
+cpuinfo_regex=${amd_cpuinfo_regex} +cpuinfo_regex=${amd_cpuinfo_regex}
+sched_migration_cost_ns=5000000 +sched_migration_cost_ns=5000000
diff --git a/profiles/virtual-host/tuned.conf b/profiles/virtual-host/tuned.conf diff --git a/profiles/virtual-host/tuned.conf b/profiles/virtual-host/tuned.conf
index c1942da..3358105 100644 index 5301d9f..74a5fb0 100644
--- a/profiles/virtual-host/tuned.conf --- a/profiles/virtual-host/tuned.conf
+++ b/profiles/virtual-host/tuned.conf +++ b/profiles/virtual-host/tuned.conf
@@ -14,3 +14,9 @@ vm.dirty_background_ratio = 5 @@ -14,3 +14,9 @@ vm.dirty_background_ratio = 5
[cpu] [cpu]
# Setting C3 state sleep mode/power savings # Setting C3 state sleep mode/power savings
force_latency=cstate.id:3|70 force_latency=cstate.id_no_zero:3|70
+ +
+[scheduler] +[scheduler]
+# The total time the scheduler will consider a migrated process +# The total time the scheduler will consider a migrated process

View File

@ -0,0 +1,80 @@
diff --git a/profiles/cpu-partitioning/script.sh b/profiles/cpu-partitioning/script.sh
index 84e04fd..8677050 100755
--- a/profiles/cpu-partitioning/script.sh
+++ b/profiles/cpu-partitioning/script.sh
@@ -2,6 +2,38 @@
. /usr/lib/tuned/functions
+no_balance_cpus_file=$STORAGE/no-balance-cpus.txt
+
+change_sd_balance_bit()
+{
+ local set_bit=$1
+ local flags_cur=
+ local file=
+ local cpu=
+
+ for cpu in $(cat $no_balance_cpus_file); do
+ for file in $(find /proc/sys/kernel/sched_domain/cpu$cpu -name flags -print); do
+ flags_cur=$(cat $file)
+ if [ $set_bit -eq 1 ]; then
+ flags_cur=$((flags_cur | 0x1))
+ else
+ flags_cur=$((flags_cur & 0xfffe))
+ fi
+ echo $flags_cur > $file
+ done
+ done
+}
+
+disable_balance_domains()
+{
+ change_sd_balance_bit 0
+}
+
+enable_balance_domains()
+{
+ change_sd_balance_bit 1
+}
+
start() {
mkdir -p "${TUNED_tmpdir}/etc/systemd"
mkdir -p "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev"
@@ -9,6 +41,9 @@ start() {
cp 00-tuned-pre-udev.sh "${TUNED_tmpdir}/usr/lib/dracut/hooks/pre-udev/"
setup_kvm_mod_low_latency
disable_ksm
+
+ echo "$TUNED_no_balance_cores_expanded" | sed 's/,/ /g' > $no_balance_cpus_file
+ disable_balance_domains
return "$?"
}
@@ -18,6 +53,7 @@ stop() {
teardown_kvm_mod_low_latency
enable_ksm
fi
+ enable_balance_domains
return "$?"
}
diff --git a/profiles/cpu-partitioning/tuned.conf b/profiles/cpu-partitioning/tuned.conf
index 979e40b..842e2bd 100644
--- a/profiles/cpu-partitioning/tuned.conf
+++ b/profiles/cpu-partitioning/tuned.conf
@@ -35,8 +35,6 @@ 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}:}
-
[sysctl]
kernel.hung_task_timeout_secs = 600
kernel.nmi_watchdog = 0
@@ -68,4 +66,4 @@ 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
+cmdline_cpu_part=+nohz=on nohz_full=${isolated_cores} rcu_nocbs=${isolated_cores} tuned.non_isolcpus=${not_isolated_cpumask} intel_pstate=disable nosoftlockup

View File

@ -17,10 +17,11 @@
%global make_python_arg PYTHON=%{__python3} %global make_python_arg PYTHON=%{__python3}
%else %else
%{!?python2_sitelib:%global python2_sitelib %{python_sitelib}} %{!?python2_sitelib:%global python2_sitelib %{python_sitelib}}
%global make_python_arg PYTHON=%{__python2}
%if 0%{?rhel} && 0%{?rhel} < 8 %if 0%{?rhel} && 0%{?rhel} < 8
%global make_python_arg PYTHON=%{__python}
%global _py python %global _py python
%else %else
%global make_python_arg PYTHON=%{__python2}
%global _py python2 %global _py python2
%endif %endif
%endif %endif
@ -33,8 +34,8 @@
Summary: A dynamic adaptive system tuning daemon Summary: A dynamic adaptive system tuning daemon
Name: tuned Name: tuned
Version: 2.16.0 Version: 2.18.0
Release: 1%{?prerel1}%{?dist} Release: 2%{?prerel1}%{?dist}
License: GPLv2+ License: GPLv2+
Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}/%{name}-%{version}%{?prerel2}.tar.gz Source0: https://github.com/redhat-performance/%{name}/archive/v%{version}%{?prerel2}/%{name}-%{version}%{?prerel2}.tar.gz
# RHEL-8 specific recommend.conf: # RHEL-8 specific recommend.conf:
@ -48,10 +49,16 @@ Requires(postun): systemd
BuildRequires: make BuildRequires: make
BuildRequires: %{_py}, %{_py}-devel BuildRequires: %{_py}, %{_py}-devel
# BuildRequires for 'make test' # BuildRequires for 'make test'
BuildRequires: %{_py}-unittest2, %{_py}-configobj, %{_py}-mock # python-mock is needed for python-2.7, but it's not available on RHEL-7
%if %{without python3} && ( ! 0%{?rhel} || 0%{?rhel} >= 8 )
BuildRequires: %{_py}-mock
%endif
BuildRequires: %{_py}-pyudev BuildRequires: %{_py}-pyudev
Requires: %{_py}-pyudev, %{_py}-configobj Requires: %{_py}-pyudev
Requires: %{_py}-linux-procfs, %{_py}-perf Requires: %{_py}-linux-procfs, %{_py}-perf
%if %{without python3}
Requires: %{_py}-schedutils
%endif
# requires for packages with inconsistent python2/3 names # requires for packages with inconsistent python2/3 names
%if %{with python3} %if %{with python3}
# BuildRequires for 'make test' # BuildRequires for 'make test'
@ -72,17 +79,25 @@ Recommends: dmidecode
Recommends: hdparm Recommends: hdparm
Recommends: kernel-tools Recommends: kernel-tools
Recommends: kmod Recommends: kmod
Recommends: iproute
%endif %endif
# syspurpose # syspurpose
%if 0%{?rhel} > 8 %if 0%{?rhel} > 8
Requires: subscription-manager # not on CentOS
%if 0%{!?centos:1}
Recommends: subscription-manager
%endif
%else %else
%if 0%{?rhel} > 7 %if 0%{?rhel} > 7
Requires: python3-syspurpose Requires: python3-syspurpose
%endif %endif
%endif %endif
# Revert upstream profiles changes which have not been approved for RHEL-8 (yet) # Revert upstream profiles changes which have not been approved for RHEL-8 (yet)
Patch0: tuned-2.16.0-rhel-8-profiles.patch Patch0: tuned-2.18.0-rhel-8-profiles.patch
# Revert no balancing cores to use SD_LOAD_BALANCE (see rhbz#1874596 for details)
Patch1: tuned-2.18.0-sd-load-balance.patch
# rhbz#2052886
Patch2: tuned-2.18.0-nf-conntrack-hashsize.patch
%description %description
The tuned package contains a daemon that tunes system settings dynamically. The tuned package contains a daemon that tunes system settings dynamically.
@ -235,9 +250,15 @@ Requires: %{name} = %{version}
%description profiles-postgresql %description profiles-postgresql
Additional tuned profile(s) targeted to PostgreSQL server loads. Additional tuned profile(s) targeted to PostgreSQL server loads.
%package profiles-openshift
Summary: Additional TuneD profile(s) optimized for OpenShift
Requires: %{name} = %{version}
%description profiles-openshift
Additional TuneD profile(s) optimized for OpenShift.
%prep %prep
%setup -q -n %{name}-%{version}%{?prerel2} %autosetup -p1 -n %{name}-%{version}%{?prerel2}
%patch0 -p1
# Replace the upstream recommend.conf with a RHEL-8-specific one # Replace the upstream recommend.conf with a RHEL-8-specific one
rm -f recommend.conf rm -f recommend.conf
@ -401,6 +422,9 @@ fi
%exclude %{_prefix}/lib/tuned/cpu-partitioning %exclude %{_prefix}/lib/tuned/cpu-partitioning
%exclude %{_prefix}/lib/tuned/spectrumscale-ece %exclude %{_prefix}/lib/tuned/spectrumscale-ece
%exclude %{_prefix}/lib/tuned/postgresql %exclude %{_prefix}/lib/tuned/postgresql
%exclude %{_prefix}/lib/tuned/openshift
%exclude %{_prefix}/lib/tuned/openshift-control-plane
%exclude %{_prefix}/lib/tuned/openshift-node
%{_prefix}/lib/tuned %{_prefix}/lib/tuned
%dir %{_sysconfdir}/tuned %dir %{_sysconfdir}/tuned
%dir %{_sysconfdir}/tuned/recommend.d %dir %{_sysconfdir}/tuned/recommend.d
@ -518,7 +542,40 @@ fi
%{_prefix}/lib/tuned/postgresql %{_prefix}/lib/tuned/postgresql
%{_mandir}/man7/tuned-profiles-postgresql.7* %{_mandir}/man7/tuned-profiles-postgresql.7*
%files profiles-openshift
%{_prefix}/lib/tuned/openshift
%{_prefix}/lib/tuned/openshift-control-plane
%{_prefix}/lib/tuned/openshift-node
%{_mandir}/man7/tuned-profiles-openshift.7*
%changelog %changelog
* Thu Feb 10 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 2.18.0-2
- openshift/atomic: increased nf_conntrack_hashsize
resolves: rhbz#2052886
* Wed Feb 9 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 2.18.0-1
- new release
- rebased tuned to latest upstream
related: rhbz#2003833
- tuned-gui: fixed creation of new profile
* Wed Feb 2 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 2.18.0-0.1.rc1
- new release
- rebased tuned to latest upstream
resolves: rhbz#2003833
- profiles: fix improper parsing of include directive
resolves: rhbz#2017924
- disk: added support for the nvme
resolves: rhbz#1854816
- cpu: extended cstate force_latency syntax to allow skipping zero latency
resolves: rhbz#2002744
- net: added support for the txqueuelen
resolves: rhbz#2015044
- bootloader: on s390(x) remove TuneD variables from the BLS
resolves: rhbz#1978786
- daemon: don't do full rollback on systemd failure
resolves: rhbz#2011459
* Wed Jul 21 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 2.16.0-1 * Wed Jul 21 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 2.16.0-1
- new release - new release
- rebased tuned to latest upstream - rebased tuned to latest upstream