9

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?

8 Answers 8

14

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.

4

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.

3
  • 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, 2009 at 15:28
  • 1
    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, 2009 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, 2009 at 15:53
4

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

http://blogs.msdn.com/b/pigscanfly/archive/2009/08/06/stack-walking-in-xperf.aspx

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.

2

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.

1
  • 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, 2009 at 1:01
1

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.

1

If you make a change to a system setting you need to understand this information or the equivallent of it in order to know what type of results a change to the system setting makes, where the results could be positive, neutral, or negative in respect to system performance.

What you can do is open "Resource Monitor" in Windows. Go to the search tool and search 'Resource Monitor'. Or open the run command tool (I'll assume anyone reading this knows how to do that) and type in 'resmon'.

Use this tool to monitor all kinds of system activity, such as, CPU activity, Memory Activity, and Hard Disk Activity. If you're not already familiar with the information 'Resource Monitor' contains then study it a bit because you will need to be familiar with it to run tests that will help you measure the type of results a change to a system setting makes.

The basic idea is that you run 'Resource Monitor' when having your computer system run certain tasks in order to measure the performance related results that a change to the system settings makes. Run tasks that use the system resources your trying to test the performance of. For example, there are tasks that can test the processor, the RAM memory, the hard disk(s), the graphics processor unit, or a network device. Use google to find out how to test the performance of the computer resource(s) you want to test.

If for example, you make a change to the system setting, 'Disable Paging Executive' you can run a test on the computer resources and use 'Resource Monitor' to measure what kinds of results the change makes (if any change at all).

Then make a comparison between the data and see if there is any significant differences between the old system setting and the new system setting that you changed.

You might not always need to use 'Resource Monitor' as some methods of testing system resource performance come with software that monitor and measure for you.

The point is you want to follow a systematic method to see if a change does anything at all to the performance of your system relative to the tasks you request the computer to perform.

Change one setting. Test it for performance change. Determine the results of the test. Based on the results, decide if you will change the setting back to what it was, or to something else, or leave it where it is. 1)Setting 2)Test 3)Results 4)Decision.

You can use this method of logical deduction for all kinds of system setting adjustments including 'Disable Paging Executive'.

Happy Tweaking.

1

There is a lot! Of very good information on this post i was impressed. I have noticed DisablePagingExecutive with a value of one is best done at the first site of the desktop after a clean install of any windows version from xp to windows 10, 32 bit to 64 bit (as long as there's enough ram on your motherboard) but after the value of 1 is applied to DisablePagingExecutive.

Also as mentioned above these tweaks are usually made in windows servers but also handy when debugging.

These modifications are used at your own risk so take into consideration what everyone has mentioned above also it doesn't hurt to google each of the keys mentioned which were DisablePagingExecutive.

Make sure you have enough ram. Not enough ram causes problems on your system that you don't want to deal with and would probably cause a blue screen (bsod) on your system.

4gb of ram will be the minimum that i would apply these tweaks above to and that's if you don't use intense applications that use a lot of ram or if you do any gaming,if you do then its best to leave these alone.

(XP: at least 256 mb of ram minimum)

Before you do anything in the registry it's a good idea to backup the registry to a storage device rather it's the Operating Systems hard drive or a separate storage of ANY kind so you can restore the registry if you needed.

The info above me really crosses the T's and dots the i's.

Note: Another good tweak to go along with DisablePagingExecutive is "Size" Which is located in Lanman Server/Parameters. The "Size" registry key helps by taking the strain off of hard drives. You'll notice how once this key is added and changed to a value of 3 your applications start out some what slow but when you have DisablePagingExecutive set to 1 and the Size value set to 3 your most used application or applications intensive I/o parts are placed into the cached section of ram which in return makes the application load faster.

Using passmark performance tests I have seen pretty big improvements after applying the DisablePagingExecutive=1 and Size=3.

                    Make sure to backup your system.
0

It does what it says, dont page out kernel or driver code.

It just ensures that the kernel and drivers are always present in the ram.

Back in the day where you had a pentium 6xx and 256 mb ram it would have made a diffrence if you had a mb more if some of your driver code or kernel code would be swapped out but nowdays it´s wayne windows is so bloated anyway 10GB hi.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .