Intro Download and install Frequently Asked Questions Tips and tricks

Homepage







© J.C. Kessels 2009
MyDefrag Forum
May 22, 2013, 08:12:31 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Moving swap file to another drive  (Read 2883 times)
gadgarra
JkDefrag Junior
**
Posts: 7


View Profile
« on: April 02, 2008, 12:54:44 am »

I have an XP system with 2 physical drives, C and F.  Based on the tip to move the swap file to improve defrag performance, I changed the virtual memory to zero on the C drive and 100 Mb on the F drive.

I then rebooted, started the system in safe mode, and ran defrag.   Watching the screen, I notied that during the defrag phase, quite a lot of time was spent moving clusters of C:\pagefile.sys. Isn't this the swap file?  If so, why was it still showing up on the C drive?  Do I have to actually delete C:\pagefile.sys as well as setting the virtual memory?
Logged
jeroen
Administrator
JkDefrag Hero
*****
Posts: 7155



View Profile WWW
« Reply #1 on: April 02, 2008, 06:35:07 am »

Yes, C:\pagefile.sys is the swap file. Windows should automatically delete it when you set the virtual memory size to zero. I wonder why it did not do that on your computer....
Logged
gadgarra
JkDefrag Junior
**
Posts: 7


View Profile
« Reply #2 on: April 02, 2008, 06:53:03 am »

Should I therefore try to delete C:\pagefile.sys, or will I not be able to do this, since it is a hidden/system file?

Edit:  I think there must be something strange about my system.  I now find that I have 2 swap files, of the same size, one on the C drive (not requested) and one on the F drive (requested).   I also noticed that when I requested to change the drive on which the swap file is located, the computer did not ask me to re-boot after the change, which it did on another computer of mine.

I need to look into this further, unless anyone has any suggestions as to what is happeneing.   It is clearly NOT a JkDefrag problem!
« Last Edit: April 02, 2008, 07:34:34 am by gadgarra » Logged
cquinn
JkDefrag Hero
*****
Posts: 81


View Profile WWW
« Reply #3 on: April 02, 2008, 03:05:51 pm »

Quote
I changed the virtual memory to zero on the C drive


 Did you set the initial and maximum sizes each to zero, or did you select "No paging file"?
Logged
Esprit
JkDefrag Hero
*****
Posts: 70


View Profile
« Reply #4 on: April 02, 2008, 04:39:53 pm »

After changing page file you must press Set. Button OK will not change anything. If you want no page file you must select no page file not set size to 0.
Logged
Rob C.
JkDefrag Senior
****
Posts: 26


View Profile
« Reply #5 on: April 02, 2008, 05:07:51 pm »

If the pagefile.sys file on your c: drive is no longer used and is properly set under virtual memory settings as using no pagefile for c:, then you can safely delete it.

Rob
Logged
gadgarra
JkDefrag Junior
**
Posts: 7


View Profile
« Reply #6 on: April 02, 2008, 09:18:26 pm »

I selected “No paging file” for the C drive and pressed “Set”.  I then set “System managed size” for the F drive.  After rebooting, when I re-entered the virtual memory management screen, it showed the settings to be what I had just set.  However, on examination of the actual drive contents, there was a pagefile.sys of exactly the same size (767 MB) on both C and F drives.  This is the "correct" size for the amount of RAM I have.

I then left the setting for the C drive as "no paging file", and set the F drive page file to “Initial size 2MB, Maximum size 500 MB.”   After rebooting, the virtual memory screen correctly showed what I had just set, although this time there was no pagefile.sys on the F drive and the original 767 MB on the C drive.

It seems that a safe course of action would be to go back to “System managed size” for the F drive and “No paging file” for the C drive”, reboot, and then after confirmation that the F drive had the correct pagefile.sys, delete the pagefile.sys on the C drive.  Although I suppose that whatever is causing the C drive pagefile not to be deleted automatically might recreate it after I delete the file manually.

Does my suggested course of action seem sensible?

Many thanks for the help.
Logged
Rob C.
JkDefrag Senior
****
Posts: 26


View Profile
« Reply #7 on: April 02, 2008, 10:28:19 pm »

Yes, doing what you are doing is correct.  If you try to delete pagefile.sys when it's in use, windows will deny you deleting it.  If it's not in use (setting no page file for the drive you wish not to have one) then windows will allow deletion on that drive even if windows didn't delete it.  Windows prefers to have the pagefile.sys on the system drive.  That's why it won't delete it for you.

Rob
Logged
gadgarra
JkDefrag Junior
**
Posts: 7


View Profile
« Reply #8 on: April 02, 2008, 11:01:51 pm »

I’ve done some more research, and it appears that it may not be a good idea to try to remove the C drive paging file.   

See the following KB article

http://support.microsoft.com/kb/314466/

"Windows XP requires a paging file on the system drive large enough to hold all physical memory plus 1 megabyte (MB), in order to write debugging information."

Another article says:

"By default, Windows puts the paging file on the boot partition where the operating system is installed and creates a default size of the paging file that is 1.5 times the physical RAM, up to a maximum of 4095 MB.  However, placing the paging file on the boot partition does not optimize performance because Windows has to perform disk I/O on both the system directory and the paging file.  Therefore, it is recommended that you place the paging file on a different partition and different physical hard disk drive so that Windows can handle multiple I/O requests more quickly.

Windows will use the paging file on the less frequently used partition over the paging file on the heavily used boot partition.  Windows uses an internal algorithm to determine which page file to use for virtual memory management.”


So, in my case, with 512 MB of RAM (old machine!) I should set the page file on the C drive (where I am short of space) to 513, and let the system set the page file on the F drive to 767 MB (1.5 times RAM).
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!