You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: stop messing with C-states in performance tests
When running performance tests, the devtool script was disabling lower
C-states, leaving only C0 (e.g. "CPU actively polling for new
instructions") enabled, with the goal to reduce latencies of switching
between C-states, and therefore increase test stability. However, we
found out that on m6i (Icelake) this was causing performance to become
erratic, with most performance metrics taking on bi-modal
characteristics.
Since back when we originally disabled sleep states, we did not see any
impact on metrics, the theory that it helps with test stability doesn't
have any experimental support, so removing the C-state configuration to
fix the volatility on m6i is not expected to have any drawbacks.
Signed-off-by: Patrick Roy <[email protected]>
Copy file name to clipboardExpand all lines: tools/devtool
+1-14Lines changed: 1 addition & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -630,11 +630,10 @@ apply_linux_61_tweaks() {
630
630
}
631
631
632
632
633
-
# Modifies the processors C- and P-state configuration (x86_64 only) for consistent performance. This means
633
+
# Modifies the processors CPU governor and P-state configuration (x86_64 only) for consistent performance. This means
634
634
# - Disable turbo boost (Intel only) by writing 1 to /sys/devices/system/cpu/intel_pstate/no_turbo
635
635
# - Disable turbo boost (AMD only) by writing 0 to /sys/devices/system/cpu/cpufreq/boost
636
636
# - Lock the CPUs' P-state to the highest non-turbo one (Intel only) by writing 100 to /sys/devices/system/cpu/intel_pstate/{min,max}_perf_pct
637
-
# - Disable all idle C-states, meaning all CPu cores will idle by polling (busy looping) by writing 1 to /sys/devices/system/cpu/cpu*/cpuidle/state*/disable
638
637
# - Set the cpu frequency governor to performance by writing "performance" to /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
639
638
apply_performance_tweaks() {
640
639
# m6a instances do not support the amd_pstate driver (yet), so nothing we can do there
@@ -660,15 +659,6 @@ apply_performance_tweaks() {
660
659
# their maximum safe frequency. It seems to be the default for Amazon Linux, but it doesn't hurt to make this explicit.
661
660
# See also https://wiki.archlinux.org/title/CPU_frequency_scaling
662
661
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor &> /dev/null
663
-
664
-
# When a CPU core has nothing to do, it enters an idle state, also called "C-state". These are enumerated, with C0
665
-
# being the shallowest idle state (corresponding to "currently executing instructions", aka "not actually idling"),
666
-
# and higher numbers being deeper sleep states (how many there are depends on the specific processor). The deeper
667
-
# a C-state a CPU core enters, the higher the latency to wake it up again. We can disable deeper C-states altogether
668
-
# by forcing each CPU core to constantly stay in C-0 (e.g. have them actively poll for new things to do).
669
-
# See also https://www.kernel.org/doc/html/v5.0/admin-guide/pm/cpuidle.html.
670
-
# The below also set "disable=1" on "state0", but this does not do anything (as disabling C-0 makes no sense).
671
-
echo 1 |sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state*/disable &> /dev/null
0 commit comments