Sunday 20 September 2015

windows vista/7/8 how to increase ram size using virtual ram


What is a Pagefile and How Do I Adjust It?





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.





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





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?





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.
 
REFERENCE-http://techminders.blogspot.in/2015/04/windows-vista78-how-to-increase-ram.html

No comments:

Post a Comment