The best way to defrag a swap file is to set it to 0, restart, set it back to whatever, restart. Nothing in it needs to be saved.
Posted by: Dan Ullman at June 21, 2007 9:18 AM
Hi, just a tip: you can also use Diskeeper Pro to defrag your paging file by running a boot-time defrag during which it defragments the paging and other system files. Apparently, this is the method Microsoft recommends. Anyways, even for normal defragging of your drives, diskeeper is a great program with lots of very useful performance and scheduling features that the Windows Disk Defragmenter unfortunately lacks.
Posted by: Arena at June 21, 2007 11:19 AM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dan: Not quite true. If there's no contigous space available to hold the swap
file, it'll be fragmented from the start. (It's possible that even if there is
space somewhere that's large enough the swap file may still be allocated
elsewhere and start out fragmented - though I'm not totally certain on this.)
Posted by: Leo A. Notenboom at June 21, 2007 8:12 PM
I moved my swap file onto another drive over a year ago & have never had any problems with my setup. I have 768 ram & a 4 gig swap file on the FIRST partition on my second drive. By having it on the FIRST partition of a drive the seek time is quicker as the heads don't have to travel as far to reach the partition.
Posted by: David Burlakoff at June 22, 2007 6:31 PM
No useful comment but to prove I read the article -- it should be "eke" not "eek" and "editing" not "editting". Sorry, I'm an editor :-) (and you can delete this once you fix the errors, if you want).
Posted by: dunstergirl at June 22, 2007 9:17 PM
My defrag play in w98 is to set the swap file to 0 in "safe mode", defrag, re-set the swapfile to 500mb minimum with no maximum...this tends to put it at the end of the drive where frag doesn't occur as quickly...am I wrong?
Posted by: Wayne Scharf at June 22, 2007 9:19 PM
" Posted by: David Burlakoff at June 22, 2007 06:31 PM: I moved my swap file onto another drive over a year ago & have never had any problems with my setup. I have 768 ram & a 4 gig swap file on the FIRST partition on my second drive. By having it on the FIRST partition of a drive the seek time is quicker as the heads don't have to travel as far to reach the partition."
Thats a good suggestion. That is the setup I use too. I have 1 GB RAM and XP is installed on the first partition of drive 0, and my swap file is on the first partition (small one) on drive 1.
Posted by: Arena at June 23, 2007 3:39 AM
With hard drives as large as they are now, is there an advantage or disadvantage to setting up a swap file that equals with RAM the max memory your 32 bit system can handle (4 GB). Therefore your physical RAM and your static swap file would always equal 4096 MB's (4 GB).
Posted by: Richard Dore at March 18, 2008 11:52 PM
it's great it helps me too much..
Posted by: Archie at August 28, 2008 5:42 AM
You need minimum 50Meg of Swap file for some programs to actually work properly.
You can also set Min and Max to the same value, reducing fragmentation of the swap file.
The swap file ideally should be placed on another drive (not another partition, just in case)
Even with high amounts of Ram (over 3Gig) you can still have a reasonable swap file (say 2Gig Min and Max)
No one seems to have a definitive guide on what amounts to place in the Swap File, as it depends on what you run.
Comments
Read the article that everyone's commenting on.
Subscribe to the RSS Feed for comments on this article.
The best way to defrag a swap file is to set it to 0, restart, set it back to whatever, restart. Nothing in it needs to be saved.
Posted by: Dan Ullman at June 21, 2007 9:18 AMHi, just a tip: you can also use Diskeeper Pro to defrag your paging file by running a boot-time defrag during which it defragments the paging and other system files. Apparently, this is the method Microsoft recommends. Anyways, even for normal defragging of your drives, diskeeper is a great program with lots of very useful performance and scheduling features that the Windows Disk Defragmenter unfortunately lacks.
Posted by: Arena at June 21, 2007 11:19 AM-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dan: Not quite true. If there's no contigous space available to hold the swap
file, it'll be fragmented from the start. (It's possible that even if there is
space somewhere that's large enough the swap file may still be allocated
elsewhere and start out fragmented - though I'm not totally certain on this.)
Leo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
iD8DBQFGez4BCMEe9B/8oqERAu+2AJ43+KS5PfmkwCBMiOZdSyXj6SQ7pwCfQZbI
Posted by: Leo A. Notenboom at June 21, 2007 8:12 PM4+Y0nBr5rVBCyzgtxfz3GsY=
=IGNx
-----END PGP SIGNATURE-----
I moved my swap file onto another drive over a year ago & have never had any problems with my setup. I have 768 ram & a 4 gig swap file on the FIRST partition on my second drive. By having it on the FIRST partition of a drive the seek time is quicker as the heads don't have to travel as far to reach the partition.
Posted by: David Burlakoff at June 22, 2007 6:31 PMNo useful comment but to prove I read the article -- it should be "eke" not "eek" and "editing" not "editting". Sorry, I'm an editor :-) (and you can delete this once you fix the errors, if you want).
Posted by: dunstergirl at June 22, 2007 9:17 PMMy defrag play in w98 is to set the swap file to 0 in "safe mode", defrag, re-set the swapfile to 500mb minimum with no maximum...this tends to put it at the end of the drive where frag doesn't occur as quickly...am I wrong?
Posted by: Wayne Scharf at June 22, 2007 9:19 PM" Posted by: David Burlakoff at June 22, 2007 06:31 PM: I moved my swap file onto another drive over a year ago & have never had any problems with my setup. I have 768 ram & a 4 gig swap file on the FIRST partition on my second drive. By having it on the FIRST partition of a drive the seek time is quicker as the heads don't have to travel as far to reach the partition."
Thats a good suggestion. That is the setup I use too. I have 1 GB RAM and XP is installed on the first partition of drive 0, and my swap file is on the first partition (small one) on drive 1.
Posted by: Arena at June 23, 2007 3:39 AMWith hard drives as large as they are now, is there an advantage or disadvantage to setting up a swap file that equals with RAM the max memory your 32 bit system can handle (4 GB). Therefore your physical RAM and your static swap file would always equal 4096 MB's (4 GB).
Posted by: Richard Dore at March 18, 2008 11:52 PMit's great it helps me too much..
Posted by: Archie at August 28, 2008 5:42 AMYou need minimum 50Meg of Swap file for some programs to actually work properly.
You can also set Min and Max to the same value, reducing fragmentation of the swap file.
The swap file ideally should be placed on another drive (not another partition, just in case)
Even with high amounts of Ram (over 3Gig) you can still have a reasonable swap file (say 2Gig Min and Max)
No one seems to have a definitive guide on what amounts to place in the Swap File, as it depends on what you run.
:)
Posted by: KimslanD at September 4, 2008 12:07 AMTo post a comment on "How should I configure my swap file / virtual memory settings?", please return to that article's main page.