The Meltdown and Spectre CPU flaw affects hundreds of millions of devices. Whenever a command is executed, the CPU gives system control to the kernel. The kernel then stays locked into the virtual memory address of all processes. This happens in order to make systems more efficient and deliver better performance. Microsoft says it has not been subjected to any attempt to exploit this flaw, but the company quickly started mitigating it. Last week a patch was issued for Windows 10 and fixes for Windows 7 and Windows 8.1 followed. However, it is widely believed the patch in question causes performance collapses. The fix is called the Page Table Isolation (PTI) workaround. Intel uses PTI on its newer processors, which are optimized for the patch. However, in older processors it is predicted PTI will have a performance impact. It is unclear whether this will be noticeable on individual machines, but on complex computing like cloud datacenters it could be. Microsoft is today attempting to clear up the performance trade-off of the PTI workaround. It is worth remembering the company is only patching Intel chips at the moment. A case of miscommunication with AMD meant systems with those chips were not booting following a patch. Microsoft has since decided to pause the patch.
Performance Cost
Terry Myerson, Executive Vice President, Windows and Devices Group, published an extensive blog post that addresses the performance impact of the patch. Meltdown and Spectre has three different variants, and performance is impacted differently depending the variant: “We’re performing our own sets of benchmarks and will publish them when complete, but I also want to note that we are simultaneously working on further refining our work to tune performance. In general, our experience is that Variant 1 and Variant 3 mitigations have minimal performance impact, while Variant 2 remediation, including OS and microcode, has a performance impact.”
With Windows 10 on newer silicon (2016-era PCs with Skylake, Kabylake or newer CPU), benchmarks show single-digit slowdowns, but we don’t expect most users to notice a change because these percentages are reflected in milliseconds. With Windows 10 on older silicon (2015-era PCs with Haswell or older CPU), some benchmarks show more significant slowdowns, and we expect that some users will notice a decrease in system performance. With Windows 8 and Windows 7 on older silicon (2015-era PCs with Haswell or older CPU), we expect most users to notice a decrease in system performance. Windows Server on any silicon, especially in any IO-intensive application, shows a more significant performance impact when you enable the mitigations to isolate untrusted code within a Windows Server instance. This is why you want to be careful to evaluate the risk of untrusted code for each Windows Server instance, and balance the security versus performance tradeoff for your environment.
Myerson says older systems may have a performance impacts due to processor architecture and what Myerson calls “legacy design decisions”. “For context, on newer CPUs such as on Skylake and beyond, Intel has refined the instructions used to disable branch speculation to be more specific to indirect branches, reducing the overall performance penalty of the Spectre mitigation. Older versions of Windows have a larger performance impact because Windows 7 and Windows 8 have more user-kernel transitions because of legacy design decisions, such as all font rendering taking place in the kernel.”