Subscribe

What is Pagefile.sys in Windows Operating System?

Posted by Nikhil on Sunday, January 11, 2009

All of us must have seen a huge file in the C:\ of our computers in the name of pagefile.sys and wondered why is such a huge file (sometimes as big as 2 GB) residing on the system? What is the use? Is it right, if I delete this file and free up some space? Well, we will try to get answers to some of thoe questions here...
What is pagefile.sys?
Windows NT uses a paging file for virtual memory called PAGEFILE.SYS. This file is created during Windows NT Setup and is always located in the root directory. No matter what your system configuration is, Windows NT will create and use a paging file.
This part of your hard disk would behave as a RAM in cases where the RAM is being fully utilized, and there is need for more, infomation/data not currently being accessed can be 'swaped' to that location and thus free physical RAM for immediate use. That same data can be transferred back if need be into physical RAM at any time.
Without some memory area so defined (on the hard-drive) W2K (and also NT XP) will not run properly, especially when running applications that demand/use large areas of RAM. Size (and location) can be set by default or as you prefer.
The paging file is not necessarily a single file; it can be a group of files stored in various locations, across hard disks and partitions.
Optimizing the page file:
The following two guidelines should be met when optimizing the paging file:
  1. In general, you should set the size of the paging file to the same size as your system RAM plus 12 MB. There is a minimum size requirement of 22 MB for the operating system. If system RAM plus 12 MB is less than 22 MB, increase the size of the paging file until your system RAM plus paging file is at least 22 MB. This is just for the operating system's own requirments. For reasonable application performance, a 40 MB total is recommended.
  2. If you have multiple hard disks, splitting up the paging file is a good idea, as it will speed up the access time. If you have two hard disks, and you split the paging file, both hard disks can be accessing information simultaneously, greatly increasing the throughput. However, if you have two hard disks, and one hard disk is faster than the other, it may be more effective to store the paging file on only the faster hard disk. Some experimentation may be necessary to arrive at the best configuration for your system.

Note: There is no point in splitting up the paging file between multiple partitions as it does not increase the ability of the hard disk to access the paging file. This may be a good idea, however, if your logical drives aren't large enough for the entire paging file.

Can I Delete the page file?
It is not wise to remove it completely under normal circumstances, you can turn the virtual memory Off however.
  • right click my computer
  • click properties
  • click advanced (tab)
  • under performance click settings
  • click advanced (tab) under virtual memory click change
  • Enter the desired value here or select "no paging file" to turn the virtual memory off.

Clearing the Page file:

Alternatively, you can clear the paging file as well while switching off the Computer. To do so, follow the below steps:

  • Go to Start
  • Click on "Run"
  • Type "regedit" in the "open" textbox and click OK
  • In the registry window that opens, nevigate to "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Memory Management" and then change the value of "ClearPageFileAtShutdown" to 1 ie:- dword:00000001

Clearing the paging file is a good practice, as this file can otherwise be used to retrieve your personal information.

0 comments:

Subscribe to: Post Comments (Atom)
Add to Technorati Favorites