Author Topic: Defrag swap space in XP  (Read 1880 times)

0 Members and 1 Guest are viewing this topic.

Offline robrenz

  • Super Contributor
  • ***
  • Posts: 2657
  • Country: us
  • Real Machinist, Wannabe EE
Defrag swap space in XP
« on: March 31, 2012, 02:19:18 AM »
When I defrag my hard drive there is the protected swap space that does not get defragged. After 5 years the swap space is extremely fragmented and I can tell performance of my dell workstation is hampered.  Is there a way to defrag the swap space other than a total disk format and reload all software and files again?

Offline SoftwareSamurai

  • Regular Contributor
  • *
  • Posts: 170
  • Country: us
Re: Defrag swap space in XP
« Reply #1 on: March 31, 2012, 02:38:08 AM »

Offline Lightages

  • Supporter
  • ****
  • Posts: 1811
  • Country: cl
  • Canadian po
Re: Defrag swap space in XP
« Reply #2 on: March 31, 2012, 02:45:20 AM »
Although this is an electronics forum and not a computer support forum, I guess I will step in and help :)

You need to right click on My Computer then click on Properties/Advanced Tab/Performance Settings button/ Advanced Tab/Virtual Memory Change button. Then click on No paging file. Reboot, delete the pagefile, run your favorite defrag program. Once completed, do not do anything else except make a "Custom size:" paging file. Set the minimum to at least 2048 and a maximum of 4095. Once this is done, windows will build a new paging file that is contiguous and it will not fragment again.
« Last Edit: March 31, 2012, 05:14:14 AM by Lightages »

Offline robrenz

  • Super Contributor
  • ***
  • Posts: 2657
  • Country: us
  • Real Machinist, Wannabe EE
Re: Defrag swap space in XP
« Reply #3 on: March 31, 2012, 02:53:56 AM »
Thanks for making an exception :)  In your instructons can I use the standard windows defrag that I have been using or do I need a second source defrag to work?  Thanks again for your help.

Offline grenert

  • Frequent Contributor
  • **
  • Posts: 429
Re: Defrag swap space in XP
« Reply #4 on: March 31, 2012, 03:04:25 AM »
I use Raxco Perfectdisk, and it will defrag your swap files as well as other system files.  It is pretty cheap ($25) and you can download a trial version to see if it improves the performance of your computer.

Offline sonicj

  • Frequent Contributor
  • **
  • Posts: 749
  • Country: us
  • updata successed!
Re: Defrag swap space in XP
« Reply #5 on: March 31, 2012, 03:07:01 AM »
i like mydefrag.

Offline Deepak

  • Contributor
  • Posts: 41
  • Country: us
Re: Defrag swap space in XP
« Reply #6 on: March 31, 2012, 03:24:35 AM »
Thanks for making an exception :)  In your instructons can I use the standard windows defrag that I have been using or do I need a second source defrag to work?  Thanks again for your help.


Standard tools are fine. Here's a detailed guide if you need it:

http://windowsdevcenter.com/pub/a/windows/2004/11/23/defrag_pagefile.html

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 2303
  • Country: gb
Re: Defrag swap space in XP
« Reply #7 on: March 31, 2012, 03:30:53 AM »
Disable pagefile, reboot, delete pagefile, defrag, enable pagefile at a fixed size. It will never become fragmented again.

Offline mariush

  • Super Contributor
  • ***
  • Posts: 2169
  • Country: ro
  • .
Re: Defrag swap space in XP
« Reply #8 on: March 31, 2012, 03:46:30 AM »
I'm using O&O Defrag.

Go and set the pagefile to a fixed size, reboot and windows will create a new pagefile. Then defrag and o&o defrag will move the whole continuous page file at the start of the drive.

As it's fixed size, windows will never move it from that spot ever.

2-4 GB is plenty of page file, no need to set a bigger one.


Offline Sionyn

  • Frequent Contributor
  • **
  • Posts: 787
  • Country: gb
Re: Defrag swap space in XP
« Reply #9 on: March 31, 2012, 07:07:49 AM »
check out vopt
eecs guy

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 3055
  • Country: 00
  • An EEE (Eternal Electronics Enthusiast)
Re: Defrag swap space in XP
« Reply #10 on: March 31, 2012, 07:55:37 AM »
How many HD do you have there ? Or if you HD has more than 1 partitions, then the fastest, easiest and cleanest way to defrag the page file (swap file) is to disable the swap file by setting it to 0 (zero) on the current boot drive/partition. Then again set the swap fle at other drive/partition just for temporary.

This will effectively clean your from drive from swap file without any hassle, and from here launch your favorite defragger and if it has an option to defrag + to make contiguous free space, choose this option and use it, this will defrag those ordinary files easily without that big chunks of swap file. Once the defragger finished the job, move back the swap file back to the previous drive/partition and don't forget to disable (set to zero) at that temporary disk/partition.

The newly create swap file on the fresh defragged drive will occupy the freed contiguous free space without any defragmentation, and although it sounds complicated, this will beat any defragger out there in term of speed & quality of the swap file defragmentation.

Also to avoid further defragmentation in the future, set the minimum and maximum size to equal, this will set the page file permanently at the place where it was created from the 1st time, and it won't grow anymore causing defragmentation in the future. If you don't use heavy memory programs and have say 4 or 8 GB of memory, "usually" a fixed page file size of 4096 MB or 8192 MB is more than enough.
« Last Edit: March 31, 2012, 08:04:08 AM by BravoV »

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 1769
  • Country: au
  • Question Everything... Except This Statement
Re: Defrag swap space in XP
« Reply #11 on: March 31, 2012, 07:56:55 AM »
lightags, a better method is to make a paging files max and min the same, that way windows doesnt go resizing it and it will not fragment, it also helps a little on mechanical hard drives as windows wont be screwing around adding and removing chunks of itself,

Offline Psi

  • Super Contributor
  • ***
  • Posts: 4706
  • Country: nz
Re: Defrag swap space in XP
« Reply #12 on: March 31, 2012, 08:32:52 AM »
You can run without a pagefile entirely, but the PC will BSOD when it runs out of ram.

Guy i know with 12GB of ram has no pagefile and has never had any issue since he did it 2 years ago.
Greek letter 'Psi' (not Pounds per Square Inch)

Online G7PSK

  • Super Contributor
  • ***
  • Posts: 2670
  • Country: gb
  • It is hot until proved not.
Re: Defrag swap space in XP
« Reply #13 on: March 31, 2012, 08:41:05 AM »
Auslogics defrag is very good they also do a page defrag version.

Online benemorius

  • Regular Contributor
  • *
  • Posts: 174
Re: Defrag swap space in XP
« Reply #14 on: March 31, 2012, 09:02:22 AM »
This is offtopic of course, but you might want to consider that the fact that your swap space is being used at all is not ideal. Adding some ram would be a far more effective fix than defragmenting the swap file. Some 10 years ago virtual memory was just a fact of life, but the days of expensive ram are behind us now.
« Last Edit: March 31, 2012, 10:16:24 AM by benemorius »


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf