Linux Schedutil Governor's Quirky Behavior Persists In 2023
Earlier this week I posted benchmarks looking at how the AMD Ryzen Threadripper 3990X performance has evolved in the three years to the day since that 64-core / 128-thread HEDT chip launched. While overall the Threadripper 3990X performance has evolved nicely under Linux since 2020, when it came to the video encoding tests in particular they performed worse overall. As I had raised in that earlier article and now elaborated with some follow-up tests, that regression is driven by the default "schedutil" frequency scaling governor used by default.
The video encode performance was consistently lower on the Threadripper 3990X system with the Ubuntu 23.04 development snapshot compared to Pop!_OS / Ubuntu 20.04 back in 2020:
The same video encoder versions/configuration were obviously maintained in the 2020 and 2023 comparison with version-locking the tests. But many Phoronix readers were curious about the big drop-off in these tests...
Since 2020 we've seen distributions like Ubuntu Linux switch from using the "ondemand" CPU frequency scaling governor (or "powersave" when using Intel P-State) to now defaulting to the "schedutil" governor that makes use of scheduler utilization data in making CPU frequency scaling decisions. Schedutil in theory is great, but as we've seen the past several years it's not always worked out as well as one would like to see.
As today's follow-up article is a look at how well Ubuntu 23.04 with Linux 6.2 performs on the Threadripper 3990X if switching back to ACPI-CPUFreq ondemand that was the default configuration back for Ubuntu 20.04 LTS or if opting to go for the "performance" governor as the best-case configuration. Some distributions like CentOS Stream, RHEL, and Clear Linux default to the performance governor for desktop/server hardware in the name of delivering the best experience but sadly the likes of Ubuntu Linux still default to Schedutil.
This Zen 2 Threadripper 3990X workstation does not support the AMD P-State driver over lack of ACPI support even when CPPC is forced on in the BIOS, so for today's article is just looking at the different governor options with ACPI CPUFreq compared to the original 2020 results with ACPI CPUFreq. During the governor comparison was also adding in CPU power consumption data too from each run for showing any impact on CPU package power consumption when swapping out the governors. The configurations tested were:
2020 - The original Ubuntu 20.04 results on this Threadripper 3990X system when using Ubuntu's default ACPI CPUFreq ondemand setting.
February 2023 - The Ubuntu 23.04 + Linux 6.2 run as shown earlier this week.
acpi-cpufreq schedutil (Default) - Repeating the "February 2023" configuration, albeit with power monitoring enabled now... Just repeating/reproducing the earlier data shown in the prior article.
acpi-cpufreq performance - The ACPI CPUFreq driver with the optimal "performance" governor set.
acpi-cpufreq ondemand - Running ACPI CPUFreq with the "ondemand" governor to match the governor default found on Ubuntu 20.04 LTS with this Threadripper 3990X workstation.