The Performance Impact Of AMD Changing Their Retpoline Method For Spectre V2

Written by Michael Larabel in Software on 11 March 2022. Page 2 of 3. 14 Comments

First up were some Retpoline comparison tests on an AMD Ryzen 9 5950X desktop. Again, all testing was done on Linux 5.17 Git where the default for AMD CPUs is now using "generic" Retpolines. The tests were then repeated when using spectre_v2=retpoline,lfence for switching back to the old AMD (LFENCE) Retpoline method that is now deemed no longer safe enough as the default/

Across a wide variety of benchmarks that in the past at times have shown to be impacted by Retpolines, this change now for AMD processors has overall only a small impairment on the system performance across dozens of benchmarks carried out.

Or when looking at the benchmarks where there was measurable change between the Retpolines method, it's mostly in the few expected synthetic benchmarks where there is a dramatic difference. For I/O benchmarks there was up to a few percent hit where using the prior AMD/LFENCE Retpoline was faster. WireGuard was also 2% faster using that AMD Retpoline technique no longer enabled by default.


Related Articles