Linux Gaming Performance Can Be Impaired By STIBP, But Hope May Be On The Horizon
Written by Michael Larabel in Linux Kernel on 18 November 2018 at 11:20 AM EST. 27 Comments
LINUX KERNEL --
It's been a busy past few days of benchmarking after discovering earlier this week the Linux 4.20 performance was dropping, bisecting the cause to be the introduction of STIBP for cross-hyperthread Spectre V2 mitigation, and seeing just how significant is the impact. Here are my latest tests and findings.

Some quick notes:

- STIBP was back-ported to Linux 4.19. With the recently released Linux 4.19.2 kernel, STIBP is present and active by default, causing a similar performance loss to Linux 4.20...

- There is an updated patch-set for providing property-based options that can allow for disabling STIBP for non-security-sensitive applications. "Leaving STIBP on all the time is expensive for certain applications that have frequent indirect branches...Users may not wish to incur performance overhead from IBPB and STIBP for general non security sensitive processes and use these mitigations only for security sensitive processes. This patchset provides a process property based lite protection mode. In this mode, IBPB and STIBP mitigation are applied only to security sensitive non-dumpable processes and processes that users want to protect by having indirect branch speculation disabled via PRCTL. So the overhead from IBPB and STIBP are avoided for low security processes that don't require extra protection." Though this might not be the default (haven't looked closely at the latest patches due to typing this from a laptop at the hospital; wife in ER, so apologies for this brief post).

- Those patches still need to be reviewed but if the code is up to scratch could still be merged for Linux 4.20 and then back-ported to the stable series now receiving STIBP.

While earlier Spectre and Meltdown mitigation work didn't affect gaming performance, STIBP when applied to those processes does at least for the lighter games that are more CPU demanding. I ran some basic tests confirming the hit to the performance.

Here are those numbers showing the imapct in the particularly more CPU bound games or with a faster graphics card:


At least in most games the impact is light.

But more noticeable in others.





So the performance hit for gaming can be measurable, but at least not as significant as what was seen in the more system/CPU focused tests over the past three days.

More details soon as well as testing the under-review patches.
About The Author
Author picture

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter or contacted via MichaelLarabel.com.

Related Linux Kernel News
Popular News This Week