An Initial Look At Spectre V4 "Speculative Store Bypass" With AMD On Linux
I ran some benchmarks on the Ryzen 7 2700X, Ryzen 3 2200G, and EPYC 7601 when using a Linux 4.17 Git kernel as of today. Testing was done with the stock behavior of having SSB disabled via prctl/seccomp and then testing again when using the nospec_store_bypass_disable option to disable all mitigations for the Speculative Store Bypass vulnerability in the name of enhancing system performance.
Tests were done on Ubuntu and the various system components are different, but the focus of this initial testing was just on the mitigated vs. vulnerable kernel performance from Linux 4.17 with this initial support.
With the earlier Spectre/Meltdown mitigation work, Linux I/O performance was dramatically affected. With SSBD, the I/O performance wasn't as affected generally speaking, but IOzone write performance appeared to be an outlier at least for the two systems with faster I/O storage performance. Then again, IOzone is far from an optimal Linux storage benchmark these days.
In most other I/O tests, the results were effectively identical.
In a majority of the tests, there was no measurable change in performance or only very faintly did having SSBD affect the kernel performance by a very slim amount when looking at the numbers across three distinct systems.
Granted, the performance was already lowered broadly by KPTI and Retpolines as a result of earlier mitigation work, but at least at this stage with the current AMD microcode the performance impact is close to nothing for a majority of the benchmarks I have been running now for the past day.
Stress-NG's Linux kernel synthetic micro-benchmarks was one of the areas where it was possible to see more measurable change out of the SSBD mitigation work albeit still relatively small.
At least from this initial testing on AMD hardware, the performance impact of SSBD for Spectre Variant 4 is much smaller than the performance hits experienced months ago with KPTI for Intel Meltdown handling and Retpolines for Spectre V2. Other mostly unchanged test data is available from this OpenBenchmarking.org result file. Stay tuned for extensive tests as more time for proper testing allows as well as the availability of the Intel microcode updates.
If you enjoyed this article consider joining Phoronix Premium to view this site ad-free, multi-page articles on a single page, and other benefits. PayPal or Stripe tips are also graciously accepted. Thanks for your support.