defragmentation

B

Bill Cunningham

I want to defragment the swap file. This should only need to be done
once. I have rename pagefile.sys on my XP MCE tp pag. I should be able to
run the defragmenter and it will defragment pag then I can erase the new
pagefile.sys sp creates and rename pag to pagefile.sys and have a defragged
swap.
This technique used to work with win386.swp from win 9x and I shouldn't
see why it wouldn't work with xp. What does others think that know more than
me?

Bill
 
J

JS

Keeping in mind that some files are 'in use' and
that XP defrag tool can't handle these types of files.
Here is a tool that may help: PageDefrag v2.32
http://www.microsoft.com/technet/sysinternals/FileAndDisk/PageDefrag.mspx

Note that on my PC the pagefile is a fixed size on another drive,
so it is already defragmented and stays defragmented.
On a typical PC PageDefrag may or may not help with the pagefile,
but it will with the others file types that it defrags.

JS
http://www.pagestart.com
 
B

Bill Cunningham

JS said:
Keeping in mind that some files are 'in use' and
that XP defrag tool can't handle these types of files.
Here is a tool that may help: PageDefrag v2.32

Yes I tried that tool it is very nice. This opens another question. When
the registry files and now there are what about 6-8 of them are defragged
would they have to be defragged again unlike the swap file? It was so much
simpler with user.dat and system.dat. Does XP have registry import and
export capability like the old win9x ?

Bill
 
J

JS

Once the files listed in the page defrag utility have been defragmented, at
least on my PC they stay defragmented for a very long time.

As to exporting a registry key it's easy to do, just select the key and
right click and choose the Export option. This method is not meant to export
the entire key (Example: HKEY_LOCAL_MACHINE) and then import it as a means
of defragmenting the registry. For that you should look into two tools:
ERUNT and NTREGOPT:
http://www.larshederer.homepage.t-online.de/erunt/

As always there is the slight possibility of something going wrong and
leaving you with an unbootable PC. Therefore create an Image Backup before
you start.

True Image 2009 - has a 15 day trial version available,
(Trial version can create a Restore CD/Rescue Media)
Note: it is critical that you create the 'Rescue' CD and the Image Backup
file must be stored on a second internal or external drive or DVD media will
do in a pinch.
http://www.acronis.com/homecomputing/products/trueimage/
User's Guide: http://us1.download.acronis.com/pdf/TrueImage12_ug.en.pdf

JS
http://www.pagestart.com
 
P

philo

Bill Cunningham said:
I want to defragment the swap file. This should only need to be done
once. I have rename pagefile.sys on my XP MCE tp pag. I should be able to
run the defragmenter and it will defragment pag then I can erase the new
pagefile.sys sp creates and rename pag to pagefile.sys and have a defragged
swap.
This technique used to work with win386.swp from win 9x and I shouldn't
see why it wouldn't work with xp. What does others think that know more than
me?

Bill

First off, it's kind of pointless
but if that's what you want...
all you need do is turn off your page file completely (in the control panel)

reboot

recreate your page file

then reboot

you have a new one
 
K

Ken Blake

I want to defragment the swap file. This should only need to be done
once. I have rename pagefile.sys on my XP MCE tp pag. I should be able to
run the defragmenter and it will defragment pag then I can erase the new
pagefile.sys sp creates and rename pag to pagefile.sys and have a
defragged swap.
This technique used to work with win386.swp from win 9x and I shouldn't
see why it wouldn't work with xp. What does others think that know more
than me?


What I think is that it's entirely unnecessary and shouldn't be bothered
with.
 
T

Twayne

I want to defragment the swap file. This should only need to be
done once. I have rename pagefile.sys on my XP MCE tp pag. I should
be able to run the defragmenter and it will defragment pag then I can
erase the new pagefile.sys sp creates and rename pag to pagefile.sys
and have a defragged swap.
This technique used to work with win386.swp from win 9x and I
shouldn't see why it wouldn't work with xp. What does others think
that know more than me?

Bill

That sounds a little iffy, I'm not certain. When you switch the
pagefile back, it may no longer agree with the tables and indexes from
the pagefile you deleted. I would think turning the pagefile completely
OFF and deleting it would be better, would it not? If you turn it off,
then you can delete the pagefile itself, defrag, and then simply turn it
back on.
Zero defragmentation of the pagefile, BTW, isn't really practical as
a permanent target. It really depends on how many fragments it's in. A
few isn't going to be meaningful, where a few hundred or thousand
especailly might make a difference. How many fragments is it in? It's
not unusual for the pagefile to be in a few fragments, and not usually
bad.
Be sure to do Restarts between each step of course.

HTH
 
B

Bill Cunningham

JS said:
Once the files listed in the page defrag utility have been defragmented,
at least on my PC they stay defragmented for a very long time.

As to exporting a registry key it's easy to do, just select the key and
right click and choose the Export option. This method is not meant to
export the entire key (Example: HKEY_LOCAL_MACHINE) and then import it as
a means of defragmenting the registry. For that you should look into two
tools: ERUNT and NTREGOPT:
http://www.larshederer.homepage.t-online.de/erunt/
[snip]

There's a tool called powerdefrag at www.powerdefrag.com that is
supposed to defrag the swap file too. I just don't understand how you can
defrag pagefile.sys when it's in memory. Hence my idea of renaming it. To
create a new registry what keys need to be exported? There are about six reg
files now.

Bill
 
J

JS

The only way I know of that a utility could defragment the page file is for
it to run when you reboot your PC.
The utility would run prior to when Windows starts to load/run, therefore
since Windows is not running the pagefile is not in use and the utility can
defrag the pagefile, once the process/defragmentation has completed the
utility would stop running and allow the boot process to complete, which
means Windows is now loaded and running.

As for the registry I did not mean to imply that exporting an entire
registry key and then importing it would create a new defragmented registry
file. Note: I DO NOT recommend that you try this as you could very well end
up with a PC that will not boot.

Unless the registry files are severely fragmented I would not attempt any
fix as a few fragments are not likely to hurt performance.

However if you insist then take a look at:
ERUNT and NTREGOPT:
http://www.larshederer.homepage.t-online.de/erunt/

*** Also as mentioned in my earlier post:
There is always the slight possibility of something going wrong and
leaving you with an unbootable PC. Therefore create an Image Backup before
you start. Be safe and backup, take the time to learn True Image, it may
just
end up being your life line.

True Image 2009 - has a 15 day trial version available,
(Trial version can create a Restore CD/Rescue Media)
Note: it is critical that you create the 'Rescue' CD and the Image Backup
file must be stored on a second internal or external drive or DVD media will
do in a pinch.
http://www.acronis.com/homecomputing/products/trueimage/
User's Guide: http://us1.download.acronis.com/pdf/TrueImage12_ug.en.pdf

JS
http://www.pagestart.com


Bill Cunningham said:
JS said:
Once the files listed in the page defrag utility have been defragmented,
at least on my PC they stay defragmented for a very long time.

As to exporting a registry key it's easy to do, just select the key and
right click and choose the Export option. This method is not meant to
export the entire key (Example: HKEY_LOCAL_MACHINE) and then import it as
a means of defragmenting the registry. For that you should look into two
tools: ERUNT and NTREGOPT:
http://www.larshederer.homepage.t-online.de/erunt/
[snip]

There's a tool called powerdefrag at www.powerdefrag.com that is
supposed to defrag the swap file too. I just don't understand how you can
defrag pagefile.sys when it's in memory. Hence my idea of renaming it. To
create a new registry what keys need to be exported? There are about six
reg files now.

Bill
 
B

Bill Cunningham

That sounds a little iffy, I'm not certain. When you switch the pagefile
back, it may no longer agree with the tables and indexes from the pagefile
you deleted. I would think turning the pagefile completely OFF and
deleting it would be better, would it not? If you turn it off, then you
can delete the pagefile itself, defrag, and then simply turn it back on.
Zero defragmentation of the pagefile, BTW, isn't really practical as a
permanent target. It really depends on how many fragments it's in. A few
isn't going to be meaningful, where a few hundred or thousand especailly
might make a difference. How many fragments is it in? It's not unusual
for the pagefile to be in a few fragments, and not usually bad.
Be sure to do Restarts between each step of course.

HTH

Turn the pagefile off. Where does the kernel swap out to? Is there
someplace in memory that it uses? The whole point of a swap is to store
processes because of not enough memory.
 
B

Bruce Chambers

Bill said:
I want to defragment the swap file. This should only need to be done
once. I have rename pagefile.sys on my XP MCE tp pag. I should be able to
run the defragmenter and it will defragment pag then I can erase the new
pagefile.sys sp creates and rename pag to pagefile.sys and have a defragged
swap.
This technique used to work with win386.swp from win 9x and I shouldn't
see why it wouldn't work with xp. What does others think that know more than
me?


Frankly, I can't imagine why you'd think that anything that applied to
Win98 would even be remotely related to WinXP. Other than a superficial
similarity in the user interface, the two operating systems are
completely and radically different. It's rather like comparing a Yugo
to a Ferrari.




--

Bruce Chambers

Help us help you:


http://support.microsoft.com/default.aspx/kb/555375

They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. ~Benjamin Franklin

Many people would rather die than think; in fact, most do. ~Bertrand Russell

The philosopher has never killed any priests, whereas the priest has
killed a great many philosophers.
~ Denis Diderot
 
B

Bill Cunningham

JS said:
As for the registry I did not mean to imply that exporting an entire
registry key and then importing it would create a new defragmented
registry file. Note: I DO NOT recommend that you try this as you could
very well end up with a PC that will not boot.

Unless the registry files are severely fragmented I would not attempt any
fix as a few fragments are not likely to hurt performance.
[snip]

If the registry key with the registry header is saved. and another or so
necessary reigistry keys. Every file that is the registry could be deleted
and imported with regedit hince a new registry. Here's the thing. On the old
win9x there was dos mode. WIndows wasn't in memory when I used to do this. I
don't know if it would work now.

Bill
 
J

JS

For Windows to load and run it needs the registry,
so you can not simply do this as there is no DOS
in Windows XP, just a command prompt window
which looks like the old DOS mode but it is not DOS!

JS
http://www.pagestart.com


Bill Cunningham said:
JS said:
As for the registry I did not mean to imply that exporting an entire
registry key and then importing it would create a new defragmented
registry file. Note: I DO NOT recommend that you try this as you could
very well end up with a PC that will not boot.

Unless the registry files are severely fragmented I would not attempt any
fix as a few fragments are not likely to hurt performance.
[snip]

If the registry key with the registry header is saved. and another or
so necessary reigistry keys. Every file that is the registry could be
deleted and imported with regedit hince a new registry. Here's the thing.
On the old win9x there was dos mode. WIndows wasn't in memory when I used
to do this. I don't know if it would work now.

Bill
 
T

Twayne

Twayne said:
Turn the pagefile off. Where does the kernel swap out to? Is there
someplace in memory that it uses? The whole point of a swap is to
store processes because of not enough memory.

In reality it's impossible to turn off the pagefile; if XP needs it,
it'll create one, alert you,and tell you there is a possible problem.
The trick is that you shouldn't need it to boot, set the swap, and
reboot unless you're dismally short on memory.

Usually however if all you're doing is booting, turning off the swap
file and the rebooting and turning it back on there will be no need for
anything to have to live in the swap file. If you get the error message
you might get rid of it by booting into Safe Mode insteas. Unless you
are incredibly short of RAM only incidental "might use" kinds of things
would go into the swap file and if it's turned off it doesn't seem to
matter IME.
If turning it off bothers you, setting it for a very small size, say
a couple hundred meg, would suffice too. The swap file, by its nature
will always have some low amount of negligible fragmentation. Even if
you get it 100% continguous today, it may not be tommorw. It's just the
nature of the beast.
Probably the biggest problem people run into is forgetting to click
"SET" when they make a swapfile change. Unless you click SET, whatever
you specified will not take effect.

In my own experience, I had a badly fragmented pagefile (couple
thousand, forget exact number) and only a single drive at that time on
that machine, with 512 of RAM. I defragged the drive to make as much
continguous pattern as I could, turned off the pagefile, set it off,
resterted, set the pagefile back to Windows Managed size, and it was
contiguous file. For a day or so. IIRC it's in 3 fragments right now;
no big deal & nothing to be concerned about. I'm pretty sure I had SP2
at the time.
Now I have multiple drives so it's a lot less of a problem should I
want to do that again. Have a small pf on C and the typical larger
system managed sized one on E.
Then of course there are 3rd party apps that will defrag it during a
boot process. Haven't used one but they seem to work OK for most
people. I try to minimize my use of 3rd party apps, especially if it's
somethign XP can do anyway.

Regards,

Twayne
 
B

Bill Cunningham

In addition why I used to do all this with 9x espacially 98 was because
then the swapfile is first created it is suppossed to be at the beginning of
the drive. And it needs to stay there. If it does fragmentation shouldn't be
a problem. Hence I said rename the pagefile.sys to something else. Yes
Windows wil recreate the file but it will be somewhere else on the drive
where it shouldn't be. Then defrag all files including "page" for example.
Which is the real swap. Then rename page to pagefile.sys after deleteing
what windows recreated and you have a defragged swap. So if you erase
pagefile.sys and reboot windows. It would probably be a good idea to
re-install.

Bill
 
B

Bill Cunningham

Frankly, I can't imagine why you'd think that anything that applied to
Win98 would even be remotely related to WinXP. Other than a superficial
similarity in the user interface, the two operating systems are completely
and radically different. It's rather like comparing a Yugo to a Ferrari.

swapping technology hasn't changed that much. Of course 98 can'tmanage
the amount of memory XP can, but I guess that's the way it goes.

Bill
 
B

Bill Cunningham

JS said:
For Windows to load and run it needs the registry,
so you can not simply do this as there is no DOS
in Windows XP, just a command prompt window
which looks like the old DOS mode but it is not DOS!

JS
http://www.pagestart.com

Yes and that's really ashame. I liked DOS. With 9x you had two OSs. That
was the days. Of course 9x was not designed to manage todays memory systems
or processor clock speeds of 1.5-2 Gb.

Bill
 
J

JS

Actual not so long ago I installed my old copy of Windows 1.x on a then
relatively new PC and it worked!

Windows 9X was not really a full OS but ran on top of DOS as a GUI
interface.

1) Applications ----?
2) Windows 9x ---?
3) DOS -----------?
4) Hardware ------?

JS
http://www.pagestart.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top