The Performance Cost Of Spectre / Meltdown / Foreshadow Mitigations On Linux 4.19
Written by Michael Larabel in Software on 30 August 2018. Page 2 of 5. 29 Comments

The benchmarks for this article were obviously focused on the ones relevant to Spectre/Meltdown where there is I/O involved or heavy kernel interactions tend to show the costs of these various mitigations. Workloads just running on the CPU and not heavily reliant upon the CPU cache, context switching, etc, generally don't show much of a performance difference with workloads like CPU-based rendering benchmarks, gaming, etc.

The CompileBench test profile tends to be one of the easiest cases for showing a performance impact from Spectre/Meltdown. As of the Linux 4.19 kernel, the default mitigations on the Intel CPUs cause the performance to come in 7~16% lower than an unmitigated kernel using the run-time switches. On the AMD side with having to worry about just the relevant Spectre vulnerabilities, its default configuration runs at 96~97% the speed of an unmitigated kernel rather than 84~93%.

It's a similar story with the sub-test of reading the compiled tree where the Intel CPUs were coming in at 85~86% the speed of the unmitigated kernel while the AMD EPYC systems were at 94~96%.

In real-world compilation workloads like building out the Linux kernel, there ends up being about a ~2% performance cost.

Related Articles
Trending Linux News