WinXP: how do I avoid kernel paging?

MrBurns

Member
Sep 15, 2003
114
0
0
I now downloadet Cacheman XP and used the setting "Disable Executive Paging" under Tweaks to avoid the Win XP swaps program data. The only thing that is still swapped to the swapfile is the kernel.



Does anyone know, how I can avoid the kernel paging? I knew a registry key to avoid it, but it doesnt work anymore.

I only have found one registry key, but according to the MS Knowledgebase it only works in Win NT/2k.

Another reason could be, that I installed SP1 and SP2 in the mean time. I didnt install it w/ the official MS-patch, but w/ an update pack of www.wintotal.de or a simular site and WinXP still displays, taht i have the original version w/o SP. But according to Control Panel -> Software I have a few SP1- and one SP2-hotfix installed.

Maybe I would have to change a different registry key, but I only found this one w/ Google.


The registry key was

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Session Manager \ MemoryManagement \ DisablePagingExecutive

I changed the value from 0 to 1.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Out of curiosity... why do you want to disable it? The kernel has lots of modules, and some almost never get used. Not paging them is a waste of RAM.

Anyway, I thought "Disable Executive Paging" already disables swapping the kernel, and I don't know about controlling userland apps and swapping.
 

MrBurns

Member
Sep 15, 2003
114
0
0
Originally posted by: CTho9305
Out of curiosity... why do you want to disable it? The kernel has lots of modules, and some almost never get used. Not paging them is a waste of RAM.

I have 1024MB RAM, so i nearly never run out of memory and the 30-40Mb that are normally paged from the kernel dont make a big difference.

I also cannot completely disable the swapfile, because Inhave one game, which sometimes needs all 1024MB.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
This has been covered many, many times on this forum. The bottom line is: you can't disable the pagefile, and even if you try, Windows will use one anyway. The pagefile is not the same as virtual memory. The NT kernel manages memory pretty efficiently, and you are better off letting it do its job without any "tweaks".
 

MrBurns

Member
Sep 15, 2003
114
0
0
Originally posted by: MrChad
The NT kernel manages memory pretty efficiently, and you are better off letting it do its job without any "tweaks".


But disabling the kernel paging is allways more efficient, because in nearly all situations everything would fit into the memory and so using the pagefile only slows the system down, because the harddisk is slower than the RAM.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: MrBurns
Originally posted by: MrChad
The NT kernel manages memory pretty efficiently, and you are better off letting it do its job without any "tweaks".


But disabling the kernel paging is allways more efficient, because in nearly all situations everything would fit into the memory and so using the pagefile only slows the system down, because the harddisk is slower than the RAM.

Not if the stuff that gets paged neve needs to be used....
 

MrBurns

Member
Sep 15, 2003
114
0
0
Originally posted by: CTho9305
Originally posted by: MrBurns
Originally posted by: MrChad
The NT kernel manages memory pretty efficiently, and you are better off letting it do its job without any "tweaks".


But disabling the kernel paging is allways more efficient, because in nearly all situations everything would fit into the memory and so using the pagefile only slows the system down, because the harddisk is slower than the RAM.

Not if the stuff that gets paged neve needs to be used....

And how should Windows know, which stuff never needs to be used?
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: MrBurns
Originally posted by: CTho9305
Originally posted by: MrBurns
Originally posted by: MrChad
The NT kernel manages memory pretty efficiently, and you are better off letting it do its job without any "tweaks".


But disabling the kernel paging is allways more efficient, because in nearly all situations everything would fit into the memory and so using the pagefile only slows the system down, because the harddisk is slower than the RAM.

Not if the stuff that gets paged neve needs to be used....

And how should Windows know, which stuff never needs to be used?

Because it was designed and written by a group of very smart people? Don't you think they would have turned kernel paging off by default if it was beneficial, at least on OSes like Windows 2000 Advanced Server or Windows Server 2003? After all, anyone who has the 4 CPUs necessary to make 2kAS worthwhile probably has oodles of RAM, so they could afford to waste a couple dozen MB.

99% of the time, your printer driver just sits there doing nothing, while holding a few MB of ram. The one time a day you print something, is it really that bad to wait 10 milliseconds for the driver to come off disk? What about all the other drivers and modules that don't get used that aren't as obvious as your printer?
 

MrBurns

Member
Sep 15, 2003
114
0
0
Is there a tool, which can tell me what drivers are in the RAM and what drivers are on the pagefile, so thyt I can proof, if only unneeded drivers are swapped?

Edit: Reading a few MB from the disk takes rather something like 100-1000ms than 10ms. 10ms is less than the access time of a harddisk, which is about 20 ms (search time + a few ms).
 

Vadatajs

Diamond Member
Aug 28, 2001
3,475
0
0
Originally posted by: MrBurns
Is there a tool, which can tell me what drivers are in the RAM and what drivers are on the pagefile, so thyt I can proof, if only unneeded drivers are swapped?

Edit: Reading a few MB from the disk takes rather something like 100-1000ms than 10ms. 10ms is less than the access time of a harddisk, which is about 20 ms (search time + a few ms).

They're probably not drivers. From my O/S text:

The virtual address translation in NT uses several data structures. Each process has a page directory that contains 1,024 page-directory entries of size 4 bytes. Typically the page directory is private, but it could be shared among processes if the environment required. Each page-directory entry points to a page table that contains 1024 page-table entries (PTEs) of size 4 bytes. Each PTE points to a 4-kilobyte page frame in physical memory. The total size of all the page tables for a process is 4 megabytes, so the VM manager will swap out these tables to disk when necessary.

(from Applied Operating System Concepts, Silberschatz, et al.)

There are MANY processes in windows that never require the full 4GB address-space, so as a result, much of these PTEs will never be used and thus swapped to disk. Imagine what your memory usage would be like with every process using at least 4MB of ram. When I run windows, I usually have about 25-28 processes running while the system is idle (I don't really remember the exact number ATM). That is 100-112MB of ram, not for program code, or data, but the data structures required to access the program code and data.

Windows has good reasons for not letting you completely disable swapping.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,587
10,225
126
You can disable the pagefile under XP, if you have enough RAM to cover all memory-load situations. MS made changes to the kernel and VM subsystem specifically to allow this with XP. All prior versions of NT/W2K cannot run without a paging file.

I concur with CTho9305, I was under the understanding that "DisablePagingExecutive" diabled the kernel from swapping (technically, paging, I don't think W2K swaps) unused bits and pieces of itself out to disk. (I suppose, that in certain situations, that could keep the kernel from dying with a BSOD due to paging failure, if the drive the pagefile was on died while the server was running. If that happened to a user-mode program, it would still die, but the OS kernel could keep on running, at least.)
 

MrBurns

Member
Sep 15, 2003
114
0
0
Originally posted by: VirtualLarry
You can disable the pagefile under XP, if you have enough RAM to cover all memory-load situations. MS made changes to the kernel and VM subsystem specifically to allow this with XP. All prior versions of NT/W2K cannot run without a paging file.

I cannot turn the pagefile completely off, because I ahve one game which sometimes needs all my 1024MB RAM.