Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 12 down vote accepted

There is an enormous amount of confusion on the internet regarding this function. The setting effects only a 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 effected 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.

share|improve this answer

I'm not sure if you realise this, but page-faults are the mechanism which Windows uses to load executable code. So, for example, a DLL is mapped to virtual memory, and then page-faults are used to do the actual loading from disk as required. The pagefile is not involved in this.

So lots of what you think of as 'paged to disk' might be stuff that was on disk in the first place.

share|improve this answer
I did not realize that, and it makes sense, though I don't think it answers my question. If I disable the paging of the windows kernel, why does my task manager continue to tell me that 75% of it is paged out (400MB kernel total with 275MB paged)? This also doesn't address my question about why Windows seems to page so heavily when there's still multiple GB of RAM free. – SqlRyan May 26 '09 at 15:28
You're reading 'paged' as 'writeable memory which has been paged-out', whereas in the context of kernel memory, 'paged' means 'could be paged-out' and 'nonpaged' means 'won't ever be paged-out'. The latter is important for KM programming when you need memory in circumstances where the paging system cannot operate (interrupt handlers, for example). – Will Dean May 27 '09 at 7:23
In the context of the terms you're using (I'm not a kernel developer, so I don't know any better), I would expect this registry change to mark the entire kernel as "non-paged" (meaning "will never be paged-out"), and that's not what it does. I just wanted to see if others had the same expectation as me, or if I was mis-interpreting what this change was supposed to do. – SqlRyan May 29 '09 at 15:53

The DisablePagingExecutive tweak does not stop paging, it's purpose was to prevent the "Executive" (i.e. the Kernel itself) being paged and thus causing whole system slowdown, not just individual paged apps.

You can try and disable paging completely by removing all pagefiles in System Properties (or in HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PagingFiles). This works well for me, but things get rather unpleasant when you run out of physical memory, and you must have a page file to debug STOP errors.

share|improve this answer
I've been running with no pagefile for a few days and it works pretty well, Windows 7 actually offers suggestions of memory hungry apps to kill when it starts to run low. – Froosh Jun 3 '09 at 1:01

System level components, such as the kernel, executive, and device drivers, can allocate memory from two pools. These are the paged pool, which can be paged out at the memory managers discretion, and the non-paged pool which must remain in RAM at all times. The developer decides according to his needs what pool will be used. It is recommended that the paged pool be used whenever possible as this allows the system memory manager maximum flexibility. Both pools are of limited size and in 32 bit systems in particular these limits can pose a problem. The paged pool is considerably larger. If the non-paged pool were used excessively the size limit could be reached and this will cause some serious system problems.

The items labeled in Task Manager as "Paged" and "Non paged" kernel memory are showing the allocations of these pools. It has absolutely nothing to do with the dynamic state of how much memory actually is paged out. The "DisablePagingExceutive" registry entry influences the dynamic paging state of a portion of the paged pool so it's effects will never be shown by ask Manager.

share|improve this answer

Just to add one additional use of this setting: it is needed by xperf stack walking.

Disable Paging Executive

In order for tracing to work on 64-bit Windows you need to set the DisablePagingExecutive registry key. This tells the operating system not to page kernel mode drivers and system code to disk, which is a prerequisite for getting 64-bit call stacks using xperf, because 64-bit stack walking depends on metadata in the executable images, and in some situations the xperf stack walk code is not allowed to touch paged out pages.

One additional piece of info about the setting. This quote can be found over the internet, I do not know its primary source.

DisablePagingExecutive applies only to ntoskrnl.exe. It does not apply to win32k.sys (much larger than ntoskrnl.exe!), the pageable portions of other drivers, the paged pool and of course the file system cache. All of which live in kernel address space and are paged to disk. On low memory systems this can force application code to be needlessly paged and reduce performance. If you have more than enough RAM for your workload, yes, this won't hurt, but then again, if you have more than enough RAM for your workload, the system isn't paging very much of that stuff anyway. This setting is useful when debugging drivers and generally recommended for use only on servers running a limited well-known set of applications

So one can conclude that besides the xperf-usage its benefit is obscure: Essentially it limits some "almost random" stuff from paging and on further thought - consequently causes something else to be paged out more often instead.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.