Security mitigations

Disabling Spectre and Meltdown mitigations

A real performance setting with a real security cost — read this one carefully

Last updated

Should you disable Spectre and Meltdown mitigations for gaming?

The mitigations for speculative-execution vulnerabilities do cost performance, mostly in system-call-heavy and I/O-heavy work. Disabling them via FeatureSettingsOverride is documented by Microsoft, because there are legitimate scenarios for it. It also removes protection against a class of vulnerability that allows one process to read memory it should not be able to read. This page documents it rather than recommending it.

Registry location and values

FeatureSettingsOverride

Location
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Value name
FeatureSettingsOverride
Type
REG_DWORD
Default
not present (mitigations enabled)
ValueWhat it does
3Disables the mitigations for CVE-2017-5715 (Spectre variant 2) and CVE-2017-5754 (Meltdown).
0Explicitly enables them.

FeatureSettingsOverrideMask

Location
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Value name
FeatureSettingsOverrideMask
Type
REG_DWORD
Default
not present
ValueWhat it does
3The mask indicating which bits of FeatureSettingsOverride are being set. Required alongside it.

What Windows actually does with this

Meltdown is mitigated by kernel virtual address shadowing, which maintains separate page tables for kernel and user mode and so adds work to every transition between them. Spectre variant 2 mitigations constrain indirect branch prediction across privilege boundaries. Both add overhead proportional to how often your workload crosses those boundaries -- which is why the cost is largest for syscall-heavy and I/O-heavy work and smallest for pure compute.

What it affects

System call and context switch overhead. On CPUs from roughly 2019 onward, many of these mitigations are handled in silicon and the software cost is already small or absent. On older processors, particularly pre-Skylake, the software cost is substantially larger.

Is it worth changing?

Honest position: this is the only setting on this site with a genuine security consequence, and we are not going to recommend it. The performance available is real but modest on modern hardware, and it is largest exactly where gaming is least sensitive. If you are running an older CPU on a machine that never browses the web, handles no credentials and runs no untrusted code, the trade is at least arguable and Microsoft documents how to make it. On a machine you also use for anything else, it is not a good trade. Check what is currently active with the Get-SpeculationControlSettings PowerShell module before assuming there is anything to gain -- on recent hardware the answer is often that the software mitigation is not in use anyway.

What can go wrong

Removes protection against a documented class of attack in which one process reads memory belonging to another process or to the kernel. This is not theoretical. Do not do this on a machine that handles anything you would not want read.

How to undo it

Set both values to 0, or delete them, and restart. Verify with Get-SpeculationControlSettings.

Create a System Restore Point before editing the registry. Every setting on this page is reversible, but a restore point is the difference between undoing one change and reinstalling Windows.

Which Windows versions this applies to

Windows 10, Windows 11, Windows Server. Applicability depends on CPU generation and microcode.

Disabling Spectre and Meltdown mitigations: common questions

How much performance is actually on the table?

It depends heavily on CPU generation and workload, and we are not going to publish a figure we have not measured. Measure your own machine with and without, using a benchmark that reflects what you actually do. Expect the difference to be larger on pre-2019 processors and smaller on current ones.

Is this what 'InSpectre' shows?

Tools of that kind read the same state that Get-SpeculationControlSettings reports. The PowerShell module is the authoritative check because it reports which mitigations are present, enabled and supported by your microcode.

Sources

Does JINSHI Tweaks change this?

This page documents settings that correspond to the following toggles in JINSHI PC Tweaks: Disable Spectre/Meltdown Mitigations, Disable Kernel Mitigations (KVA Shadow).

The reference above is written to be usable without the product. Everything here can be applied by hand for free. What the application adds is that the change is applied in one pass, a System Restore Point is created first, and each toggle can be reversed individually.

What JINSHI Tweaks changes