Performance Differences Between CentOS 7.9 and Rocky Linux 8.9 - a Root Cause Analysis and Recommendations
Introduction
A mutex
(meaning mutual exclusion
) prevents multiple threads from accessing the same resource simultaneously. When CIQ was running a futex
test (a form of testing that checks the Linux kernel futex
system call API), we observed mutex
slowdown when running the futex
testing on Rocky Linux 8.9 compared with CentOS 7.9.
We investigated this performance discrepancy further and this article will reveal why there was a performance differential between the two operating systems.
Resolution
The reason for the performance differences from both operating systems, was due to the BIOS settings on the HPE Blade machines that were used for testing. The CPU governor settings were set to balanced power saving
mode.
Upon configuring the CPU governor to static high performance
mode in the BIOS, we saw a dramatic increase in performance for Rocky Linux 8.9.
Running the futex
tests again on both Rocky Linux 8.9 and CentOS 7.9, produced the performance results as expected.
We also advise setting the tuned-adm
profile to hpc-compute
to ensure maximum performance from Rocky Linux.
Conclusion
When comparing performance between a Rocky Linux X.X version and another operating system, CIQ advises to check the BIOS settings are set to have the CPU governor configured for maximum performance.
In addition, we advise setting the tuned-adm
profile to hpc-compute
to ensure maximum performance from Rocky Linux.
References
-
Futex Testing from the Linux Kernel Docs Team: https://www.kernel.org/doc/readme/tools-testing-selftests-futex-README
-
General Mutex Subsystem from the Linux Kernel Docs Team: https://docs.kernel.org/locking/mutex-design.html
-
tuned-adm man page: https://linux.die.net/man/1/tuned-adm