• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

WinXP ignores swap settings

FMH

Junior Member
Hello,

I have a really strange problem with the swapfile settings on my Toshiba 5000-514 Laptop. I'm running Windows XP and I tried to disable the swapfile, or at leat let Windows use the whole 512MB RAM before swapping. This would reduce disk access, make the laptop quiter and save power. But Windows completely ignores my settings. When I disable the swapfile or set its size to a small value, Windows ignores it and continues swapping. I've also tried some registry tweaks, but they seem to be ignored, too.

I tried the following setting, which should reduce swapping and increase disk caching:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management

DisablePagingExecutive=1
LargeSystemCache=1

But Windows still pages the kernel.
I have no reasonable explanation for this behavior and I would appreciate any hint or solution.
 
There have been a LOT of threads about this. I'm afraid that most of them may not be terribly informative, perhaps because a lot of people seem to be emotionally bound to this idea that they should be able to run completely from memory, writing to the hard drive ONLY when they're actually saving a data file. This idea seems, however, to fly in the face of the way Windows XP was designed to behave. Windows XP doesn't really choose between using RAM and the page file. It uses BOTH. As far as I can tell, it will ALWAYS use both. It's designed to do that. Among other things this arrangement has to do with ensuring the system's ability to keep track of its system state so that it can recover from error conditions (both in the OS and in the file system with which it was designed to work). If you manage to force a reduction in the space Windows XP thinks it needs for taking care of this business, then the OS will resort to other methods of caching to disk which are much less efficient. In the extreme case if you force an insufficient physical limit on the disk space that can be allocated for these purposes by shoehorning the OS into a too-small partition and denying it any access to other disk space, then the system will fail to run. It's an OS that's designed to preserve data, running under the assumption that you want to keep the files and applications and operating system on your computer in good order. It's simply not designed to do what it appears that you're trying to do. The way to keep disk accessing to the minimum on a given system is to maximize RAM, but you'll never be able to run the OS entirely out of memory because it was designed to keep track of its internal operations AND (in the case of NTFS) to keep track of all file manipulations in NONvolatile memory. (It doesn't do much good to keep track of that stuff in volatile memory.)

There is/was a RAMdisk implementation made available by Microsoft itself for Windows 2000. It was posted as an example of ways to write device drivers for the OS, primarily. For a lark a friend of mine downloaded it and tried to optimize both a server and a workstation to see if he could make them run "faster" by operating entirely out of the RAMdisk, once the OS was loaded. No matter how he fiddled with it he couldn't actually get it to do that. He did appear to succeed in locating all "normal" temporary file caching in RAM by setting the appropriate environment settings to use the RAMdisk. The resulting benchmarks were slower (by a considerable margin) than those two systems achieved when running under the default configurations for the OS. I'm sure there would be considerable variation in the viability (or lack of it) for various page file tweaks from one type of machine to another. I suppose there might even be some really weird hardware configurations which would actually benefit from direct intervention by the operator to force a change in this paradigm. But I can't imagine what that hardware configuration would be.

Anyone else have a take on this? (Like I have any doubt. 😀)

- Collin
 
Thank you for your detailed explanation. It seems, that disabling the swapfile is not the best solution. But one thing, I didn't make clear in my first post is, that Windows is obviously not really using the 512MB RAM. At the moment, the system cache is 170MB, although 344MB physical memory are free. And AFAIK Windows should use all but 4MB of RAM, if the option LargeSystemCache is enabled. 18MB of the kernel are also paged out, but I have disabled Kernel Paging. I guess that getting this settings to work would improve performance considerably. Then there would be no need to disable the swapfile.

Perhaps anyone who tried the memory tweaks I mentioned can confirm, that they work.
 
Okay, I think I see why this bothers you. Actually, you'll probably have to load a bunch more stuff into memory to see a higher percentage of your RAM in use at any one time in Task Manager. Chances are that running some big-time graphics rendering engines in memory would use up a significantly higher portion of your RAM. It would also use more of the page file, too, and might even expand it. 😀 As a matter of fact, some of the graphics packages make use of their own swap files because they actually do swap. (Technically speaking, the WinXP page file is NOT a swap file.)

The fact that you don't see big-time RAM use going on doesn't mean that Windows is using the hard drive INSTEAD of RAM. It just means that it doesn't need all of the RAM you have on your system. And you really don't want your applications to be bumping their heads on the RAM limit. Just as with the disk drive, the OS needs elbow room in RAM for certain types of in-memory manipulations. The ideal appears to me to be the situation where you're using about half of RAM at any one time, except for brief spurts of activity, and that's what Windows appears to be shooting for. Perhaps one of the hotshot developer types around her could shed some more light on this.

I've done a lot of programming before, most of it machine language, but that was a LONG time ago in a galaxy far, far away -- strike that, I mean on some very different system architectures. Forgive me. Got into Star Wars mode for a second there.

😀

- Collin
 
Back
Top