Memory management

DisablePagingExecutive

Keeping kernel code resident, and what that is actually worth

Last updated

What does DisablePagingExecutive do?

DisablePagingExecutive stops Windows from paging kernel-mode drivers and system code out to disk, keeping it resident in physical memory. On a machine with plenty of RAM and an SSD, the situation it prevents was already rare and already fast. It is a legitimate debugging aid and a marginal performance setting.

Registry location and values

DisablePagingExecutive

Location
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
Value name
DisablePagingExecutive
Type
REG_DWORD
Default
0
ValueWhat it does
0Kernel code and drivers may be paged out.
1Kernel code and drivers stay resident.

What Windows actually does with this

Parts of the kernel and many drivers are marked pageable. Under memory pressure Windows can write them out and fault them back in on demand. Setting this value marks that code as non-pageable, so it always stays in physical memory.

What it affects

Latency of the first call into a kernel path that had been paged out. Its main legitimate use is kernel debugging, where paged-out code makes stack traces incomplete.

Is it worth changing?

Harmless and close to pointless on a modern machine. Kernel paging happens under memory pressure; if you have enough RAM you were not paging, and if you have an NVMe drive the fault you avoided cost a fraction of a millisecond. Enable it if you like the idea of it. Do not expect to measure it, and do not enable it on a memory-constrained system, where forcing kernel residency takes memory from applications.

What can go wrong

Reduces memory available to applications by the size of the kernel and driver code held resident. On a low-memory system that is a real cost.

How to undo it

Set to 0 and restart.

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

All modern Windows versions.

Sources

Does JINSHI Tweaks change this?

This page documents a setting that corresponds to the following toggle in JINSHI PC Tweaks: Keep Kernel in RAM.

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, the original value is stored first, and each toggle can be reversed individually. PC Tweaks does not create a System Restore Point for you, so make one before the first run. The JINSHI Tweaks homepage explains what the four apps include.

What JINSHI Tweaks changes

Related settings

Guides that cover this setting

Every change JINSHI PC Tweaks can make is listed on the complete tweak list, and the product itself is described on PC Tweaks for gaming.


If you would rather not do it by hand

JINSHI Tweaks: all four apps

£29.99one-time

Get all four apps

Every change can be reversed on its own. No subscription, nothing to renew.

Get all four — £29.99