Jump to content
CCleaner Community Forums
alphaa10

Defragging the Windows Page File ?

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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 ?

Share this post


Link to post
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 ?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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).

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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".

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...