Windows News and info 15th Anniversary 2009-2024

Other Operating Systems => Fixes => Windows 7 All => Windows 7 | Windows 9 => Tweaks => Topic started by: anykey on December 14, 2009, 07:25:52 PM

Title: Understanding the Windows Pagefile
Post by: anykey on December 14, 2009, 07:25:52 PM
Do you disable your pagefile in win7.
This article says you shouldn't.
What do you say...
http://lifehacker.com/5426041/understanding-the-windows-pagefile-and-why-you-shouldnt-disable-it (http://lifehacker.com/5426041/understanding-the-windows-pagefile-and-why-you-shouldnt-disable-it)
 ;)
Title: Re: Understanding the Windows Pagefile
Post by: javajolt on December 15, 2009, 03:08:07 AM

I have disabled the Page file in my copies of Windows since W2K and in many of the systems I have build for clients.  I have had no problems with any of my installations.  You can also move it to another Hard Drive too.  here is the fors mentioned  article in its entirety.

Understanding the Windows Pagefile and Why You Shouldn't Disable It

(http://i45.tinypic.com/adkgva.jpg)

As a tech writer, I regularly cringe at all the bad tweaking advice out there, and disabling the system pagefile is often a source of contention among geeks. Let's examine some of the pagefile myths and debunk them once and for all.

What is a Pagefile and How Do I Adjust It?
(http://i45.tinypic.com/2wgakgl.jpg)
Before we get into the details, let's review what the pagefile actually does. When your system runs low on RAM because an application like Firefox is taking too much memory, Windows moves the least used "pages" of memory out to a hidden file named pagefile.sys in the root of one of your drives to free up more RAM for the applications you are actually using. What this actually means to you is that if you've had an application minimized for a while, and you are heavily using other applications, Windows is going to move some of the memory from the minimized application to the pagefile since it's not being accessed recently. This can often cause restoring that application to take a little longer, and your hard drive may grind for a bit.

If you want to take a look at your own pagefile settings, launch sysdm.cpl from the Start menu search or run box (Win+R) and navigate to Advanced –> Settings –> Advanced –> Change. From this screen you can change the paging file size (see image above), set the system to not use a paging file at all, or just leave it up to Windows to deal with—which is what I'd recommend in most cases.

Why Do People Say We Should Disable It?

Look at any tweaking site anywhere, and you'll receive many different opinions on how to deal with the pagefile—some sites will tell you to make it huge, others will tell you to completely disable it. The logic goes something like this: Windows is inefficient at using the pagefile, and if you have plenty of memory you should just disable it since RAM is a lot faster than your hard drive. By disabling it, you are forcing Windows to keep everything in much faster RAM all the time.

The problem with this logic is that it only really affects a single scenario: switching to an open application that you haven't used in a while won't ever grind the hard drive when the pagefile is disabled. It's not going to actually make your PC faster, since Windows will never page the application you are currently working with anyway.

Disabling the Pagefile Can Lead to System Problems

The big problem with disabling your pagefile is that once you've exhausted the available RAM, your apps are going to start crashing, since there's no virtual memory for Windows to allocate—and worst case, your actual system will crash or become very unstable. When that application crashes, it's going down hard—there's no time to save your work or do anything else

(http://i45.tinypic.com/adkgva.jpg)

In addition to applications crashing anytime you run up against the memory limit, you'll also come across a lot of applications that simply won't run properly if the pagefile is disabled. For instance, you really won't want to run a virtual machine on a box with no pagefile, and some defrag utilities will also fail. You'll also notice some other strange, indefinable behavior when your pagefile is disabled—in my experience, a lot of things just don't always work right.

Less Space for File Buffers and SuperFetch
(http://i50.tinypic.com/vn2zc4.jpg)
If you've got plenty of RAM in your PC, and your workload really isn't that huge, you may never run into application crashing errors with the pagefile disabled, but you're also taking away from memory that Windows could be using for read and write caching for your actual documents and other files. If your drive is spending a lot of time thrashing, you might want to consider increasing the amount of memory Windows uses for the filesystem cache, rather than disabling the pagefile.

Windows 7 includes a file caching mechanism called SuperFetch that caches the most frequently accessed application files in RAM so your applications will open more quickly. It's one of the many reasons why Windows 7 feels so much more "snappy" than previous versions—and disabling the pagefile takes away RAM that Windows could be using for caching. Note: SuperFetch was actually introduced in Windows Vista.

Put the Pagefile on a Different Drive, Not Partition
The next piece of bad advice that you'll see or hear from would-be system tweakers is to create a separate partition for your pagefile-which is generally pointless when the partition is on the same hard drive. What you should actually do is move your pagefile to a completely different physical drive to split up the workload.

What Size should my Pagefile Be?
(http://i50.tinypic.com/15yao4.jpg)


Seems like every IT guy I've ever talked to has stated the "fact" that your pagefile needs to be 1.5 to 2x your physical RAM—so if you have a 4GB system, you should have an 8GB pagefile. The problem with this logic is that if you are opening 12 GB worth of in-use applications, your system is going to be extremely slow, and your hard drive is going to grind to the point where your PC will be fairly unusable. You simply will not increase or decrease performance by having a gigantic pagefile; you'll just use up more drive space.

Mark Russinovich, the well-known Windows expert and author of the Sysinternals tools, says that if you want to optimize your pagefile size to fit your actual needs, you should follow a much different formula: The Minimum should be Peak Commit – Physical RAM, and the Maximum should be double that.

For example, if your system has 4GB of RAM and your peak memory usage was 5GB (including virtual memory), you should set your pagefile to at least 1GB and the maximum as 2GB to give you a buffer to keep you safe in case a RAM-hungry application needs it. If you have 8GB of RAM and a max 3GB of memory usage, you should still have a pagefile, but you would probably be fine with a 1 GB size. Note: If your system is configured for crash dumps you'll need to have a larger pagefile or Windows won't be able to write out the process memory in the event of a crash—though it's not very useful for most end-users.

The other size-related advice is to set the minimum and maximum size as the same so you won't have to deal with fragmentation if Windows increases the size of the pagefile. This advice is rather silly, considering that most defrag software will defragment the pagefile even if Windows increases the size, which doesn't happen very often.

The Bottom Line: Should You Disable It?

As we've seen, the only tangible benefit of disabling the pagefile is that restoring minimized applications you haven't used in a while is going to be faster. This comes at the price of not being able to actually use all your RAM for fear of your applications crashing and burning once you hit the limit, and experiencing a lot of weird system issues in certain applications.

The vast majority of users should never disable the pagefile or mess with the pagefile settings—just let Windows deal with the pagefile and use the available RAM for file caching, processes, and Superfetch. If you really want to speed up your PC, your best options are these:

Upgrade your RAM.

Clean off the crapware—the biggest cause of system slowdown.

Switch to Microsoft Security Essentials and stop paying for bloated Windows security packages.

Windows 7 handles multi-tasking much better than Windows XP did.

On my Windows 7 system with 6GB of RAM and a Windows-managed pagefile, every application opens quickly, and even the applications I haven't used in a while still open almost instantaneously. I'm regularly running it up to 80-90% RAM usage, with dozens of application windows open, and I don't see a slowdown anywhere.

If you want to read more extremely detailed information about how virtual memory and your pagefile really work, be sure to check out Mark Russinovich's article on the subject, which is where much of this information was sourced.
Title: Re: Understanding the Windows Pagefile
Post by: javajolt on December 15, 2009, 03:15:40 AM
The page file is basically wannabe RAM. MS's Technet states that page file should be 1.5 times the ram that you have. If you're runnin at 4gb's of ram then you don't need that much. However there are some programs that are out there that are written to utilize it. In that case you want to run 1:1 ratio. I know I took the long way around a short bush to say that. set your page file to 4gb's (that'll allow easy swap) and forget about it.

After 98 no one has demonstrated any advantage to disabling the "page file". Sure all kinds of anecdotal crap on the Internet. OK yea sure you have 8GB's RAM and a 12GB HDD sure disable as you lack the HDD space. But if someone did have that config I would want to address more serious emotional and intelligence issues than page file.

But if you let Windows manage it will be 1:1.5 and if Windows needs it, can take more.

Why do some think setting page file size is important in the 1st place? Old school it had to do with fragmentation. If we follow the above advice of setting size it will reserve so fragmentation will not happen. Well if you let Windows manage it will do the same but at 1:1.5 (unless you added RAM then 1.5x original amount when installed). But when Windows manages if it ever thinks it wants more it can create. Yes it will fragment but if needed it is there.

Further said some have a mistaken belief that if the PF is there it will be used? Incorrect if it is not there what would go there will just be dumped. Windows keeps things likely to be used more up front. That first means in RAM, second if you have an asymmetrical dual channel RAM config set up it will keep the most likely to be requested in the part that is running "true" dual channel (128bit), hence why asymmetric and symmetric perform very close.