Windows Registry – Does DisablePagingExecutive Have Any Effect?

performancewindowswindows-registry

On a number of machines in the past, across different versions of Windows (2000, XP, and no Vista), I've enabled DisablePagingExecutive to try and improve performance. In each case, and I've had plenty of memory, and in the especially so in the current case. However, after enabling this registry tweak and rebooting, I've checked task manager after a while, and I still show a huge chunk of the kernel paged to disk, even though I have 2GB of physical memory free.

Has anybody ever used this tweak successfully? Ever? Maybe I'm viewing the wrong indicator when I check the task manager (Performance tab -> "Kernel Memory" section), but I'd like to prevent Windows from paging everything it can to disk, especially considering the amount of memory provided in desktops these days. It seems like a "Don't page to disk unless there's extreme memory pressure" option ought to exist – is there one?

Best Answer

There is an enormous amount of confusion on the internet regarding this function. The setting only affects the portion of the kernel known as the executive, and then only to the portions that are pageable. There are other parts of the kernel that are completely unaffected by this setting.

Kernel paging works the same way as any other paging. Code and data that is frequently accessed will be kept in RAM while the remainder will remain on disk - where it belongs. The system will not remove any portion of the kernel from RAM unless it has found a better use for it. Microsoft has devoted an enormous amount of research and testing to the paging systems.

In the context of the kernel, "Nonpaged" means code and data that can never be paged out under any circumstances. "Paged" means code and data that CAN be paged out if necessary. How much actually IS paged out is impossible to tell from Task Manager. A portion of the code that is paged out was never read from disk in the first place because it wasn't needed yet. Not all of the kernel is frequently accessed. You should not expect Paged and Nonpaged numbers to be affected by the setting in question.

Note: When code is paged out it is not normally copied to the pagefile. This is not necessary as it can simply be reloaded from the original files. This applies to most code, not just the kerenl.

With a reasonable amount of RAM the setting will do essentially nothing. It simply prevents the system from paging out data that it didn't want to page out anyway.