I run three OSs on two physical drives: XP on one drive and Vista and Win7 in two partitions on a big second drive.
This question is prompted by occasional defrags of those partitions. I use PerfectDisk and as near as I can find, it doesn't allow for the exclusion ("leave it alone") of the Windows swap files. I usually run my defrag of all three partitions from within XP.
It usually takes the longest amount of defrag time on the pagefile.sys and maybe the hiberfil.sys in Win7, I'm not sure of that one. Suppose one were to delete the swap files on Vista and Win7 manually before starting a defrag - is/would that be a dangerous thing to do? I'm assuming one couldn't do that in XP since it's the running system from which the defrag will be done.
Comment or suggestions welcome. And thanks...
Windows' Swap Files
-
- PlatinumLounger
- Posts: 3757
- Joined: 24 Jan 2010, 11:00
- Location: Lexington, KY, USA
-
- Administrator
- Posts: 7215
- Joined: 15 Jan 2010, 22:52
- Location: Middle of England
Re: Windows' Swap Files
I usually set my Pagefile with a fixed min/max size so don't ever have this issue.
If necessary, I'll set it on a second partition temporarily, defrag the first, the (re)set it back on the first partition so that it always starts off as a single block.
Whether it is worth it, or actually matters, is of course another matter...
If necessary, I'll set it on a second partition temporarily, defrag the first, the (re)set it back on the first partition so that it always starts off as a single block.
Whether it is worth it, or actually matters, is of course another matter...
Leif
-
- PlatinumLounger
- Posts: 5414
- Joined: 24 Jan 2010, 08:33
- Location: A cathedral city in England
Re: Windows' Swap Files
I find that surprising! (Well, a couple of things...)
The pagefile.sys and hyberfil.sys files are single files. Even if Perfect Disk needs to (and can) defragment them the once, then next time round they will each be in a single extent, and so won't need defragmenting. The only time they would fragment again would be if Windows needed to increase its virtual memory space, which happens perhaps once in a blue moon! .
Nah, send Perfect Disk back and use the free Defraggler. (Or ignore the whole defragmentation matter entirely!)
The pagefile.sys and hyberfil.sys files are single files. Even if Perfect Disk needs to (and can) defragment them the once, then next time round they will each be in a single extent, and so won't need defragmenting. The only time they would fragment again would be if Windows needed to increase its virtual memory space, which happens perhaps once in a blue moon! .
Nah, send Perfect Disk back and use the free Defraggler. (Or ignore the whole defragmentation matter entirely!)
John Gray
"(or one of the team)" - how your hospital appointment letter indicates that you won't be seeing the Consultant...
"(or one of the team)" - how your hospital appointment letter indicates that you won't be seeing the Consultant...
-
- Administrator
- Posts: 7215
- Joined: 15 Jan 2010, 22:52
- Location: Middle of England
Re: Windows' Swap Files
If the Pagefile is set to auto-expand mode - i.e. with different minimum and maximum sizes - then it is feasible it could be defragged to a single file when small, with other files placed after it. As soon as it expands, it will by definition need to split into multiple fragments... No?John Gray wrote:The pagefile.sys and hyberfil.sys files are single files. Even if Perfect Disk needs to (and can) defragment them the once, then next time round they will each be in a single extent, and so won't need defragmenting.
Leif
-
- PlatinumLounger
- Posts: 5685
- Joined: 24 Jan 2010, 19:16
- Location: Cape Cod, Massachusetts,USA
Re: Windows' Swap Files
Yes...but that's what John also says, "The only time they would fragment again would be if Windows needed to increase its virtual memory space."Leif wrote:... No?
No?
BOB
______________________________________
If I agreed with you we'd both be wrong.
______________________________________
If I agreed with you we'd both be wrong.
-
- PlatinumLounger
- Posts: 3757
- Joined: 24 Jan 2010, 11:00
- Location: Lexington, KY, USA
Re: Windows' Swap Files
Well, I only defrag occasionally, so I won't take your advice not to bother. But, it is interesting and coincidental that while doing my Vista and Win7 partitions this morning, I "decided" to give Defraggler a try and will do so next week.John Gray wrote:... send Perfect Disk back and use the free Defraggler...
As to the other responses, I don't know how or why the swap files get fragmented but they are - I can see that in the PD graphic display and because of their size, it takes a LONG TIME "messing" with them.
My question has not yet been answered however: can one DELETE the swap files without terror or disaster striking?
-
- GoldLounger
- Posts: 2599
- Joined: 24 Jan 2010, 15:26
- Location: Olympia, WA
Re: Windows' Swap Files
Yes you can delete them, but as soon as the machine is restarted they will be there again, if NOT sooner, unless you turned OFF the useage of them.
I am so far behind, I think I am First
Genealogy....confusing the dead and annoying the living
Genealogy....confusing the dead and annoying the living
-
- PlatinumLounger
- Posts: 3757
- Joined: 24 Jan 2010, 11:00
- Location: Lexington, KY, USA
Re: Windows' Swap Files
Thanks Dave. It's OK if they show up again AFTER I defrag 'cause they would then be "whole" and the defragger wouldn't have to deal with trying to mess with them. Next week I'll give it a try on one of my OS partitions to see how it goes. After all, I've got a nightly backup I can always restore if things go awry.DaveA wrote:Yes you can delete them, but as soon as the machine is restarted they will be there again, if NOT sooner, unless you turned OFF the useage of them.
-
- PlatinumLounger
- Posts: 5685
- Joined: 24 Jan 2010, 19:16
- Location: Cape Cod, Massachusetts,USA
Re: Windows' Swap Files
I think it brings back the old discussion of "Is a pagefile, even necessary, when you have enough memory?" Or set your pagefile to just a very small size, and let it go at that.Bigaldoc wrote:
My question has not yet been answered however: can one DELETE the swap files without terror or disaster striking?
Try reducing the pagefile size. You can always increase it.
BOB
______________________________________
If I agreed with you we'd both be wrong.
______________________________________
If I agreed with you we'd both be wrong.
-
- SilverLounger
- Posts: 2072
- Joined: 25 Jan 2010, 02:12
Re: Windows' Swap Files
For a fairly technical in-depth discussion of Virtual Memory see Mark's Blog : Pushing the Limits of Windows: Virtual Memory. Also, see RAM, Virtual Memory, Pagefile and all that stuff, How to determine the appropriate page file size for 64-bit versions of Windows, Ask the Performance Team : What is the Page File for anyway?, & if (ms) blog++; : The Ubiquitous Pagefile.
Joe
Joe
Joe