Disable paging of drivers and kernel core

There is an option to force the kernel core and drivers to stay in RAM (non-pageable) and not swap to the harddisk. When the option is enabled, then it will lock a "large" amount of RAM, that the paging algorithm cannot touch, even if it might be able to make a more optimal use of the RAM.

By default it is possible for the kernel core and the drivers to mark themselves as non-pageable, so it is only in rare situations that one should force all to become non-pageable. If having plenty of RAM available then this option doesn't make any difference, as it will have no need to page out the kernel core and drivers.

This setting is useful for debugging drivers as it ensures that all kernel code and data is always memory resident. Also on 64 bit Windows by forcing the kernel into RAM, then it will allow proper kernel stack traces.

To force the core into RAM edit this DWORD registry key:

[HKEY_LOCAL_MACHINE \System \CurrentControlSet \Control \Session Manager \Memory Management]
DisablePagingExecutive = 1 (1 = Force to RAM, 0 = Allow to page, Default = 0)

More Info MS KB184419

Note until Win2k SP4 a flaw existed which could cause the system to hang when this registry entry was enabled. More Info MS KB323608

Credits ArsTechnica.com

Updated: 9 June 2010

Comments:

  1. Larry Miller says:

    It should be noted that this setting effects only a small portion of the kernel. Windows will only page this out if the memory is needed for other purposes. A portion of the kernel can never be paged under any circumstances while others will remain pageable. If you have a reasonable amount of RAM (512MB or more) this setting is unlikely to do anything. Also, what Task Manager shows as "Paged" is really means pageable. How much is actually paged out at any given time is impossible to tell. Windows simply does not make this information available outside the system.

    Larry Miller
    Microsoft MCSA

Leave a Reply

Your email address will not be published. Required fields are marked *