Jump to content

Defragging the Windows Page File ?


alphaa10

Recommended Posts

Unlike most Windows users, I have placed my system Page File on a separate partition (on a different HD), on the idea this will reduce or eliminate fragmentation.

 

As a test of whether that configuration actually reduces or prevents fragmentation, I attempted to run Defraggler on a heavily-used Page File partition. I was surprised to find Defraggler reported some fragmentaton.

 

1. Can you explain why fragmentation occurs on a separate Page File partition?

 

2. If my purpose is simply to keep the Page File reasonably integrated, is it better to skip time-consuming defragmentation, and simply format the Page File partition periodically, before starting a Windows session?

Link to comment
Share on other sites

  • Moderators

what OS are you on?

 

I too keep a small pagefile on a separate drive to my boot drive and occasionally it gets frag'd, but that wasn't the reason to do so, it was to get it off the C:\ drive which is a SSD.  But previous to the SSD, it was to reduce I/O on the boot drive and hopefully increase pagefile access times.

The drive the pagefile is on is also used for data, so it's going to get frag'd eventually.

 

I would think the only way to help reduce fragging the pagefile would be if it was the only file on that separate drive, but even then, there would be no guarantee.

 

Maybe consider setting the system to clear the pagefile at shut down if you want a bit of control over it.

Backup now & backup often.
It's your digital life - protect it with a backup.
Three things are certain; Birth, Death and loss of data. You control the last.

Link to comment
Share on other sites

- I would advice against placing the pagefile on a different HD (except when the main HD is a SSD), because it will decrease overall system performance. It then takes the system more time for the drive to read & write data from/to that drive.

- Windows itself will place the pagefile on a different drive when the amount of free space on a drive is insufficient. I have seen it happen on a XP & Win 7 system.

- Fragmentation of the pagefile occurs because Windows needs to enlarge the pagefile and can't expand the pagefile without fragmentation. That enlargement of the pagefile on its own slows down your system.

- Install PcWinTech's Cleanmem. It reduces memory usage every 15 minutes. Reducing memory usage, means reducing or even eliminating Windows' need to write data to the pagefile and disk I/O is - comparatively - slow. Then the chance of having a fragmented pagefile will be reduced significantly.

System setup: http://speccy.piriform.com/results/gcNzIPEjEb0B2khOOBVCHPc

 

A discussion always stimulates the braincells !!!

Link to comment
Share on other sites

MTA--

My OS is XP Pro, SP3 and all the patches since.

 

Effectively, my Page File has the partition all to itself, because the other partition is seldom used, and I may wipe it from the HD altogether. No traffic / i/o goes to the other partition.

 

I like the idea of wiping the Page File at session shutdown, but am unsure how to manage that easily.

 

 

WILLY2--

 

My Page File partition is large enough to place a 4gb single file, with extra "handling room" for the OS. The Page File size is the maximum permitted by the OS, so there is no expansion. And since I set the Page File minimum size to the same value as maximum size, there is no contraction.

 

Thanks for the Cleanmem reference-- but I'll need to read more, since I like to keep many apps going at the same time.

Link to comment
Share on other sites

- According to my info, every time when both the pagefile & the memory are full then the pagefile WILL be enlarged and potentially fragmented, no matter what. Even when you have set the pagefile to a maximum size. that's why reducing memory usage (with Cleanmem) will reduce the need to write to the pagefile.

- Cleanmem has a socalled "Mini Monitor" that displays an icon in the system tray. If that value (as displayed by the icon) remains very high (say ~ 70 or ~ 80%) then I would recommend installing more memory. That's the best way to improve system performance & keep the page file defragmented.

System setup: http://speccy.piriform.com/results/gcNzIPEjEb0B2khOOBVCHPc

 

A discussion always stimulates the braincells !!!

Link to comment
Share on other sites

  • Moderators

Since the OP has XP 32bit I don't see it as possible that the page file will increase past the upper limit of 32bit addressing.

Have you seen this occur Wilyl ?

Backup now & backup often.
It's your digital life - protect it with a backup.
Three things are certain; Birth, Death and loss of data. You control the last.

Link to comment
Share on other sites

- The OP didn't disclose whether it was a 32 or 64 bit XP version. XP has been available in a 64 bit version.

- The simple fact that the pagefile gets fragmented leads me to believe that Windows enlarges the pagefile.

- There could be happening something else. Some files (metadata files ???) could be placed in the middle of the drive and prevent the pagefile from getting/being defragmented.

- I assume the OP increased the size of the pagefile later ?

 

Solution:

   - Switch off the pagefile feature, move all valuable data to another drive, reformat that particular drive, use the build-in Windows defragmentation program to optimize the drive and then enable the pagefile, Make the pagefile slightly smaller than the size of the drive. Perhaps then the pagefile remains defragmented.

- Perhaps you need to delete the partition and then re-create the partition ?

System setup: http://speccy.piriform.com/results/gcNzIPEjEb0B2khOOBVCHPc

 

A discussion always stimulates the braincells !!!

Link to comment
Share on other sites

  • 3 weeks later...

WILLY2-- Thanks, I'll try it. Presumably this utility is a minor load on the system.

 

kroozer-- Thanks, I'll look into what MS means by "clearing" the file. Does it mean content / data is removed, but the file structure is left intact?

Or does it mean the file itself is removed? I'll determine that when I check with MS on the issue tomorrow on this KB article.

 

* As it turned out, in doing the manual hack to clear the PageFile on shutdown, I found my key value was already set properly..This means my Defraggler message about PageFile fragmentation was issued with the proper key value to "clear" the PageFile already in place.

Link to comment
Share on other sites

- Clearing the pagefile means overwriting the content, the file is not (temporarily) removed/deleted.

- Cleanmem is "kicked into action" by Task Scheduler and when it has done its job then the program closes itself. So, it only takes system resources when it's running (every 15 minutes).

System setup: http://speccy.piriform.com/results/gcNzIPEjEb0B2khOOBVCHPc

 

A discussion always stimulates the braincells !!!

Link to comment
Share on other sites

  • 2 weeks later...

Willy2--

Cleanmem was run manually during its test, and did reduce (from its own indicator) the RAM in use by a few percentage points. However, I rarely have exceeded 40 percent of installed and available RAM-- installed, in part, to reduce time-consuming resourse to the PageFile-- so this utility may be a marginal benefit to the original concern about PageFile fragmentation. 

 

In addition, I found running task scheduler a waste of system resources and disabled it, so having an immediate (manual) response from CleanMem rather than scheduled assistance is my only option, and the more desirable mode, anyway.

 

BTW, I have installed a total of 6gb DDR2 in this XP Pro 32bit system in a plan to move to a 64bit version soon. Obviously, I cannot use more than 3gb of the 6gb installed under a 32bit system.

Link to comment
Share on other sites

- With 3 or 6 GB installed the benefits of using Cleanmem are indeed limited. But some programs have a horrible memory management (e.g. Firefox). I have 8 GB on my Win 7 system but still Cleanmem keeps memory usage low.

- Reducing memory usage has another advantage. A bigger part of the memory can be used by Windows for caching data.

- "Task scheduler a waste of system resources" ?? More than one program relies on Task Scheduler and therefore a process called "Taskeng.exe" is Always running. That's the engine of Task Scheduler. I don't know if I want to call that "a waste".

System setup: http://speccy.piriform.com/results/gcNzIPEjEb0B2khOOBVCHPc

 

A discussion always stimulates the braincells !!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.