Jump to content

Best practices for defrag options


Recommended Posts

So, I have a file with 24% fragmentation and quite a few freespace clusters on a 4TB drive. Is it best to run a freespace defrag first, after or even both? I've noticed that it still tends to leave some holes, I assume because there aren't any later files small enough to fill them. Normally I just manually defrag large files that have a lot of fragments then run a quick defrag but that seems to make the freespace gaps worse.

Link to comment
Share on other sites

  • Moderators

Welcome to the forums GOE,


any answers to your concerns are going to be subjective at best, all based on personal preferences.

unless we get access to the code, and can see why things are done, we're just guessing.

so why DF does what it does, I for one cannot say.


personally, I let DF analyse then go into the File List, sort by Size, select the a few screenfulls, defrag those, then sort by Fragments, select a few screenfulls, and defrag those.

takes mere minutes, fixes the worst offenders.  maximum results for minimal effort.


trying to get to 0% fragmentation or 'fill in all the gaps', even when lucky enough to achieve that, is only short lived.

Windows straight away starts screwing things up for you. :)

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

  • 2 weeks later...

Here's what I do to consolidate all of my files as much as possible and minimize the gaps.


1.) Right-click and open the Command Prompt as Administrator and run "sfc /scannow". If it reports there are no missing/corrupted system files***, close the Command Prompt, go into your settings for system recovery (Control Panel>All>Recovery>Configure System Restore>Configure) and delete all of your system restore points.


***If you find there are missing/corrupted system files, DO NOT delete your system restore points, you just might need them to fix the problem! Fix this problem first before proceeding any further.


2.) Open the Command Prompt as Administrator again and enter "powerconfig /hibernate off". This will delete the system file (hiberfil.sys) that's used for hibernation.


3.) Go into your settings for Virtual Memory (Control Panel>All>System>Advanced System Settings>Advanced tab>Performance>Settings>Advanced tab>Virtual Memory) and select "No paging file". After doing this, you will be prompted to reboot. This will delete the system file (pagefie.sys) that's used for swapping memory to disk.


4.) After reboot, do a complete defrag using Defraggler. This should place all of your files in one contiguous block. If not, you'll have to use the defrag freespace feature to do so.


5.) Once you get your files arranged the way you want them, open the Command Prompt as Administrator and enter "powerconfig /hibernate on". Then go back into your settings for virtual memory and select "Automatically manage paging file size for all drives". This will re-create both hiberfil.sys and pagefie.sys on the disk. Then go back into your settings for recovery and create a new system restore point.

Start every day with a smile and get it over with. - W.C. Fields

Link to comment
Share on other sites

- When you're running DF then Windows keeps reading & writing files and that is one reason why the amount of fragmented files can increase.


- I have followed a different approach. I have moved all the non-system files towards the end of the drive. The following folders on my Win 7 system are allowed to be at the beginning of the drive.


   - "C:\Program files" and "c:\Program files (x86)"

   - "C:\Windows"

   - "C:\ProgramData"

   - "C:\Users".


-  And I use DF once a week to keep it that way. (the user can exclude folders that are not to be moved).

Edited by Willy2

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.