Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions assets/performanceprofile/tuned/openshift-node-performance
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,14 @@ summary=Openshift node optimized for deterministic performance at the cost of in
# This has two possible results:
# openshift-node,cpu-partitioning
# openshift-node,cpu-partitioning,openshift-node-performance-rt-<PerformanceProfile name>
#> arm64,amd64 doesn't support realtime
{{if not .ppc64le}}
include=openshift-node,cpu-partitioning${f:regex_search_ternary:${f:exec:uname:-r}:rt:,openshift-node-performance-rt-{{.PerformanceProfileName}}:};
openshift-node-performance-${f:lscpu_check:Vendor ID\:\s*GenuineIntel:intel:Vendor ID\:\s*AuthenticAMD:amd:Architecture\:\s*aarch64:arm}-${f:lscpu_check:Architecture\:\s*x86_64:x86:Architecture\:\s*aarch64:aarch64}-{{.PerformanceProfileName}}
{{else}}
include=openshift-node,cpu-partitioning${f:regex_search_ternary:${f:exec:uname:-r}:rt:,
openshift-node-performance-ppc64le-{{.PerformanceProfileName}}
{{end}}

# Inheritance of base profiles legend:
# cpu-partitioning -> network-latency -> latency-performance
Expand Down
165 changes: 165 additions & 0 deletions assets/performanceprofile/tuned/openshift-node-performance-ppc64le
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
[main]
summary=Openshift node optimized for deterministic performance at the cost of increased power consumption, focused on low latency network performance. Based on Tuned 2.11 and Cluster node tuning (oc 4.5)

# The final result of the include depends on cpu vendor, cpu architecture, and whether the real time kernel is enabled
# The first line will be evaluated based on the CPU vendor and architecture
# This has three possible results:
# include=openshift-node-performance-amd-x86;
# include=openshift-node-performance-arm-aarch64;
# include=openshift-node-performance-intel-x86;
# The second line will be evaluated based on whether the real time kernel is enabled
# This has one result for power
# openshift-node,cpu-partitioning
include=openshift-node,cpu-partitioning${f:regex_search_ternary:${f:exec:uname:-r}:rt:,openshift-node-performance-rt-{{.PerformanceProfileName}}:};

# Inheritance of base profiles legend:
# cpu-partitioning -> network-latency -> latency-performance
# https://github.com/redhat-performance/tuned/blob/master/profiles/latency-performance/tuned.conf
# https://github.com/redhat-performance/tuned/blob/master/profiles/network-latency/tuned.conf
# https://github.com/redhat-performance/tuned/blob/master/profiles/cpu-partitioning/tuned.conf

# All values are mapped with a comment where a parent profile contains them.
# Different values will override the original values in parent profiles.

[variables]
#> isolated_cores take a list of ranges; e.g. isolated_cores=2,4-7
{{if .IsolatedCpus}}
isolated_cores={{.IsolatedCpus}}
{{end}}

not_isolated_cores_expanded=${f:cpulist_invert:${isolated_cores_expanded}}

{{if .PerPodPowerManagement}}
[cpu]
enabled=false
{{else}}
[cpu]
#> latency-performance
#> (override)
force_latency=cstate.id:1|3
governor=performance
energy_perf_bias=performance
min_perf_pct=100
{{end}}

[vm]
#> network-latency
transparent_hugepages=never

{{if not .GloballyDisableIrqLoadBalancing}}
[irqbalance]
# Disable the plugin entirely, which was enabled by the parent profile `cpu-partitioning`.
# It can be racy if TuneD restarts for whatever reason.
#> cpu-partitioning
enabled=false
{{end}}

[scheduler]
runtime=0
group.ksoftirqd=0:f:11:*:ksoftirqd.*
group.rcuc=0:f:11:*:rcuc.*
group.ktimers=0:f:11:*:ktimers.*
{{if not .GloballyDisableIrqLoadBalancing}}
default_irq_smp_affinity = ignore
irq_process=false
{{end}}

[sysctl]
{{if .RealTimeHint}}
#> cpu-partitioning #RealTimeHint
kernel.hung_task_timeout_secs=600
#> cpu-partitioning #RealTimeHint
kernel.nmi_watchdog=0
#> RealTimeHint
kernel.sched_rt_runtime_us=-1
#> cpu-partitioning #RealTimeHint
vm.stat_interval=10
{{end}}

#> network-latency
net.ipv4.tcp_fastopen=3

# If a workload mostly uses anonymous memory and it hits this limit, the entire
# working set is buffered for I/O, and any more write buffering would require
# swapping, so it's time to throttle writes until I/O can catch up. Workloads
# that mostly use file mappings may be able to use even higher values.
#
# The generator of dirty data starts writeback at this percentage (system default
# is 20%)
#> latency-performance
vm.dirty_ratio=10

# Start background writeback (via writeback threads) at this percentage (system
# default is 10%)
#> latency-performance
vm.dirty_background_ratio=3

# The swappiness parameter controls the tendency of the kernel to move
# processes out of physical memory and onto the swap disk.
# 0 tells the kernel to avoid swapping processes out of physical memory
# for as long as possible
# 100 tells the kernel to aggressively swap processes out of physical memory
# and move them to swap cache
#> latency-performance
vm.swappiness=10

# also configured via a sysctl.d file
# placed here for documentation purposes and commented out due
# to a tuned logging bug complaining about duplicate sysctl:
# https://issues.redhat.com/browse/RHEL-18972
#> rps configuration
# net.core.rps_default_mask=${not_isolated_cpumask}


[selinux]
#> Custom (atomic host)
avc_cache_threshold=8192

{{if .NetDevices}}
{{.NetDevices}}
{{end}}

[bootloader]
# !! The names are important for Intel and are referenced in openshift-node-performance-intel-x86

# set empty values to disable RHEL initrd setting in cpu-partitioning
initrd_remove_dir=
initrd_dst_img=
initrd_add_dir=

# overrides cpu-partitioning cmdline
cmdline_cpu_part=+nohz=on rcu_nocbs=${isolated_cores} tuned.non_isolcpus=${not_isolated_cpumask} systemd.cpu_affinity=${not_isolated_cores_expanded}

# No default value but will be composed conditionally based on platform
cmdline_iommu=

{{if .StaticIsolation}}
cmdline_isolation=+isolcpus=domain,managed_irq,${isolated_cores}
{{else}}
cmdline_isolation=+isolcpus=managed_irq,${isolated_cores}
{{end}}

{{if .HighPowerConsumption}}
# No default value but will be composed conditionally based on platform
cmdline_power_performance=
{{end}}

{{if .DefaultHugepagesSize}}
cmdline_hugepages=+ default_hugepagesz={{.DefaultHugepagesSize}} {{end}} {{if .Hugepages}} {{.Hugepages}} {{end}}

{{if .AdditionalArgs}}
cmdline_additionalArg=+{{.AdditionalArgs}}
{{end}}

[rtentsk]

{{ if .HardwareTuning }}
[sysfs]
# sets provided frequencies to isolated and reserved cpus
{{ range .IsolatedCpuList }}
/sys/devices/system/cpu/cpufreq/policy{{.}}/scaling_max_freq={{$.IsolatedCpuMaxFreq}}
{{- end -}}
{{ range .ReservedCpuList }}
/sys/devices/system/cpu/cpufreq/policy{{.}}/scaling_max_freq={{$.ReservedCpuMaxFreq}}
{{- end -}}
{{ end }}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const (
ProfileNameArmAarch64 = "openshift-node-performance-arm-aarch64"
// ProfileNameIntelX86 defines the Intel X86 specific tuning parameters
ProfileNameIntelX86 = "openshift-node-performance-intel-x86"
// ProfileNamePowerPC defines the PowerPC LE specific tuning parameters
ProfileNamePowerPC = "openshift-node-performance-ppc64le"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,12 @@ func NewNodePerformance(profile *performancev2.PerformanceProfile) (*tunedv1.Tun
}
IntelX86ProfileName := components.GetComponentName(profile.Name, components.ProfileNameIntelX86)

PowerPCProfileData, err := getProfileData(filepath.Join("tuned", components.ProfileNamePowerPC), templateArgs)
if err != nil {
return nil, err
}
PowerPCProfileName := components.GetComponentName(profile.Name, components.ProfileNamePowerPC)

profiles := []tunedv1.TunedProfile{
{
Name: &name,
Expand All @@ -261,6 +267,10 @@ func NewNodePerformance(profile *performancev2.PerformanceProfile) (*tunedv1.Tun
Name: &IntelX86ProfileName,
Data: &IntelX86ProfileData,
},
{
Name: &PowerPCProfileName,
Data: &PowerPCProfileData,
},
}

priority := uint64(20)
Expand Down