Linux Kernel "Zen" Downstream Pulls In A MuQSS Fix To Help Gaming Performance
This weekend I posted some fresh benchmarks of the Liquorix kernel against upstream Linux 5.4 and found the gaming performance to be rather disappointing for that kernel flavor derived from the "Zen" patches and more. Fortunately, the Zen kernel patches now include a fix that should make their gaming performance more competitive.
A Phoronix reader pointed out to us this commit made shortly after our article went live. The patch corrects the MuQSS scheduler's __read_mostly tunable and should help restore/improve the Linux gaming competitiveness compared to upstream.
I'll have some fresh benchmarks up soon. Over the past few days I also have been running some Xanmod kernel tests, various Arch Linux kernel options, and also some Clear Linux kernel configuration tests. Enjoy my relentless Linux benchmarking? Show your support by going premium.
A Phoronix reader pointed out to us this commit made shortly after our article went live. The patch corrects the MuQSS scheduler's __read_mostly tunable and should help restore/improve the Linux gaming competitiveness compared to upstream.
Turns out when I investigated performance issues with RPCS3 on Linux with MuQSS, my choice to set yield_type to 2 was flawed since I didn't benchmark or any other applications that cared about it.
Phoronix wrote an article measure performance of Liquorix against a stock 5.4 configuration here: https://www.phoronix.com/vr.php?view=28750
All the benchmarks measured framerate and Liquorix for the most part got up to 20% less FPS than stock CFS, depending on the game. Turns out some of it had to do with yield_type, and always yielding when requested dropped minimum frame times quite a bit. Disabling yield entirely raised the average frame rate a bit and the minimum frametimes on Deus Ex: Mankind Divided by nearly 10%.
Also, Linus Torvalds wrote in a forum about sched_yield. He indicated that yield used to make sense on uniprocessor configurations, but now with multi-core being the norm, yield almost always causes performance issues due to cache thrashing and thread/process migration on multicore systems: https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752
And finally, even if we don't yield, MuQSS will reschedule the thread that's spinning anyway. All setting yield_type to 2 did was reschedule the thread sooner. Lets let MuQSS decide when a thread needs to be rescheduled, not the program.
I'll have some fresh benchmarks up soon. Over the past few days I also have been running some Xanmod kernel tests, various Arch Linux kernel options, and also some Clear Linux kernel configuration tests. Enjoy my relentless Linux benchmarking? Show your support by going premium.
22 Comments