Navigation


Content

Tip: keyboard shortcut Ctrl+F searches in the page contents.

Use Defraggler for defragmenting disks in Windows

How to use Defraggler for automatic disk defragmentation in Windows XP, Vista, 7, 8 and 8.1

By . Last modified: 2014-03-24.

File fragmentation is a big issue that usually does not get much attention. It occurs when a hard drive partition contains tens of thousands of files (like it always does) and a file gets updated but there is no room right after it to keep the file written sequentially. So the updated part gets written elsewhere on the hard disk, sometimes in one part, sometimes to several different places on the hard disk. This means that the next time Windows wants to read from or write to the file, the hard disk controller must access several places all over the disk to read or write information - meaning that a file access time gets higher and you must wait longer for an operation to complete. For one file this might mean only a few milliseconds, but if your hard drive is nearly full and fragmentation level is high, this turns easily into tens and tens of seconds of waiting.

If  Windows XP or Vista is installed on a Solid State Drive (SSD), you should disable any automated defragmentation! Defragmenting SSD-s is unnecessary and it might decrease the lifetime of the drives, or even cause complete drive failures.
Windows 7 and later are able to run special TRIM commands automatically on SSD-s - this is a replacement for defragmenting.
Hybrid drives, such as Seagate Momentus XT still need defragmentation because the SSD space is used for application cache only.

While Windows has a Disk Defragmenter built in, its efficiency is not that good. Windows XP users do not even have easy access to the scheduling capability. But the biggest problem is that Windows Disk Defragmenter does not defragment large files and this lowers performance of the whole computer.

Piriform Defraggler is able to defragment all files, run on a schedule and perform boot-time defragmentation (just like Sysinternals PageDefrag can in Windows XP). You can also defragment specific folders or files for quick optimization.
For SSD-s, Defraggler runs TRIM commands, if necessary. 

Please make sure that you have sufficient free disk space (at least 15% of total disk space) - no disk defragmenter can do its work well if there is not enough free room available. Read the Free up disk space in Windows and Remove temporary files with CCleaner articles for detailed instructions.

Turning off the built-in Disk Defragmenter in Windows Vista, 7, 8 and 8.1

Because Windows Vista and later have scheduled defragmentation enabled by default, it is a good idea to turn it off to avoid overlapping schedules and unnecessary performance loss during the scheduled tasks.
Those who have installed Windows 8 or 8.1 on SSD, must take this step: there is a known bug in Disk Defragmenter that causes it to start defragmentation process (not TRIM). Ultimately, this leads to decreased lifetime and failure of the SSD.

Automating defragmentation/TRIM process with Defraggler is described later in this article.

In Windows Vista and 7, open Start menu and type defragment into Search box. Click Disk Defragmenter.
In Windows 8 and 8.1, open Settings Search using keyboard shortcut Windows Key+W, type defrag into Search box and click Defragment and optimize your drives.
Windows 7, Start menu. To access the built-in defragmenting tool, type 'defragment' into Search box. Then click Disk Defragmenter. Windows 8, Start screen. To access the built-in defragmenting tool, type 'defragment' into Search box. Then click 'Defragment and optimize your drives'.

Windows Vista users will once again meet the most beloved User Account Control Prompt. Click Continue.
Windows Vista, User Account Control prompt for Disk Defragmenter. Click Continue.

In Windows Vista, clear the Run on a schedule (recommended) check box. Click OK to close Disk Defragmenter.
Windows Vista, Disk Defragmenter. To disable scheduled defragmentation, clear the Run on a schedule (recommended) check box.

In Windows 7, click the Configure schedule button in Schedule section.
In Windows 8 and 8.1, click Change settings in Scheduled optimization section. 
Windows 7, Disk Defragmenter. To change or disable scheduled defragmentation, click Configure schedule. Windows 8, Optimize Drives. To change or disable scheduled defragmentation, click Change settings.

In Windows 7, the Disk Defragmenter: Modify Schedule window opens.
In Windows 8 and 8.1, the window is entitled Optimize Drives.
Clear the Run on a schedule (recommended) check box. Click OK and Close to exit Disk Defragmenter / Optimize Drives window.
Windows 7, Disk Defragmenter: Modify Schedule. To disable scheduled defragmentation, clear the Run on a schedule (recommended) check box. Windows 8, Optimize Drives, Optimization Schedule. To disable scheduled defragmentation, clear the 'Run on a schedule (recommended)' check box.

Downloading and installing Piriform Defraggler

Open Defraggler download page, locate Defraggler Free section and click Piriform.com.
Please note that latest versions of Defraggler have removed the capability of boot-time pagefile defragmentation. If you need this feature and Windows is not installed on SSD, download version 2.08.373 from oldversion.com.
Defraggler download page. In the Defraggler Free section, click 'Piriform.com'.

After downloading and launching, Defraggler Setup Wizard opens Welcome dialog. Click Next to move on and accept English as the installed language.
Defraggler Installer, Welcome. Click Next to accept English.

In the Install Options screen, clear the Add Desktop Shortcut check box - you do not need to open Defraggler that often. Then click Next or Install.
Defraggler Setup Wizard, Install Options. Disable the Add Desktop Shortcut option. Then click Next.

Then some promotional offer might appear if you do not have Google products installed. Do not install any software offered here as you probably do not need additional toolbars or web browsers. Too many toolbars will make any browser slow, so please remember not to install everything blindly.
In the example below, clear the Install the free Google Toolbar along with Defraggler box and click Install.
Defraggler Setup Wizard, Free! Google Toolbar for Internet Explorer. Clear the Install the free Google Toolbar box. Then click Install.

After the setup is complete, clear the View Release notes box and click Finish. Defraggler will open after this automatically.
Defraggler Setup Wizard, Completing. Clear the View Release notes box. Then click Finish.

Sometimes, restart is required to finish updating Defraggler. Save and close all open documents and programs/apps and click Finish, leaving Reboot now selected.
Defraggler Setup Wizard, Completing, restart required. Click Finish.

Defragmenting whole drives with Defraggler

After Defraggler opens, right-click any listed drive/volume/partition and select Analyze Drive from the menu. Alternatively, you can click a drive and use the Analyze button on the bottom of the window.
Please close all running programs to allow Defraggler to do its work well - locked (in use) files cannot be defragmented.
Piriform Defraggler, main window. Right-click a drive and select 'Analyze Drive' to see how fragmented the disk is.

The analysis might take a few minutes to complete. See the Fragmentation column on top right or in the Status section for results.
If the percentage exceeds 10, you should optimize the drive by clicking the Defrag button to run a full defragmentation. The process might take several hours to complete on large hard drives.
You can also run a non-comprehensive optimization by clicking the arrowhead pointing down on the right side of the Defrag button and selecting the Quick Defrag option. This one is much faster, but not as thorough as the full defragmentation.
If S.M.A.R.T. (Self-Monitoring Analysis and Reporting Technology) is available on your PC, there is also the Disk Health line available. Make sure it reads "Good", otherwise your hard drive might be failing soon.
If needed, use the Shutdown after Defrag or Close program after Defrag options in Settings menu to automatically turn off the PC or close Defraggler after defragmentation is complete.
Piriform Defraggler, main window, analysis complete. If Fragmentation is higher than 20%, you should click Defrag. Piriform Defraggler, main window. Clicking the arrowhead pointing down opens defragmentation options. Click 'Quick Defrag' if you want to perform a faster and less thorough defragmentation.

The Drive map tab explains the colored map right under the drive list. Health tab lists detailed information on the selected hard drive.
Piriform Defraggler, main window, Drive map tab. This tab explains the colors on drive map below the drives list. Piriform Defraggler, main window, Health tab. This tab reveals detailed information about the selected hard drive.

If Recycle Bin contains many files or is corrupted, Defraggler offers to empty it before starting the defragmentation - this might make the whole process much faster.
In case you are absolutely sure the Recycle Bin contains nothing important, click Yes in the dialog. If the special folder is corrupted, you should certainly click Yes to fix it.
Piriform Defraggler, Remove unnecessary files. Click Yes to empty Recycle Bin before starting defragmentation. Piriform Defraggler, Recycle Bin on drive is corrupted. Click Yes to empty and fix Recycle Bin before starting defragmentation.

After Defraggler finishes defragging the drive, its Status section states "Defrag Finished" or "Quick Defrag Finished". You should analyze and defragment all drives in your computer to retain optimum performance.
Piriform Defraggler, main window. After defragging is complete, drive Status reads 'Defrag Finished' or 'Quick Defrag Finished'.

If fragmentation level stays high even after full defragmentation, you should run Defraggler in Windows Safe Mode. This ensures best results with files that are normally in use by background programs and Windows services.

Defragmenting only fragmented files with Defraggler

If you do not want to optimize disk contents, you can defrag only the items that are fragmented. This is much quicker than full defragmentation, but might be a tad slower than quick defrag. The method always ensures that all files (except those in use) are aligned sequentially on the disk.

First, analyze a drive. Then open Files list tab and put a check mark in the Filename check box on the left. This select all items that are fragmented.
Click Defrag Checked to start the process.
Piriform Defraggler, main window. To defragment only fragmented items and skip optimization, click to open File list tab. Activate the Filename check box. Then click Defrag Checked.

Please close all running programs for best results. The defragmentation process might take up to an hour if the number of fragmented items is high.
If really-really necessary, click Pause or Stop.
Piriform Defraggler, Defrag progress. Stand by.

After Defraggler finishes, click OK.
In most cases, some files cannot be defragmented - this is completely normal. To overcome troubles with locked files, run Defraggler in Windows Safe Mode.
Piriform Defraggler, Defrag Complete. Some files were not defragmented. Click OK.

Scheduling automatic defragmentation with Defraggler

Defraggler allows creating a fully automated defragmentation (or TRIM for SSD-s) schedule in Windows. This removes the need to run the lengthy process manually.
Because you disabled automatic defragmentation in the beginning of this tutorial, make sure you set up monthly schedule for all drives/partitions.

First, open Settings menu, expand Priority sub-menu and click Background. This ensures that the scheduled defragging will not consume too much processing power and that you can continue working normally during the automated defragmentation. As a side effect, the defrag will take longer to complete.
Piriform Defraggler, main window. Open Settings menu, expand Priority and click Background.

Next, open Settings menu again and click Schedule.
Piriform Defraggler, main window. To automate Defraggler, open Settings menu and click Schedule.

In the Schedule window, select a Drive. Then enable the Schedule defragmentation for chosen volume option. "Volume" and "drive" are used interchangeably in this article.
Select Monthly in the Period section and use the options on the right to set a starting date and time for the scheduled defrag. You should set a time when the PC is most probably turned on.
Set the task to run on specific Day(s) or Day(s) of week.
Choose Full or Quick from Defrag type combo box in Advanced section. In most cases, use full defragmentation; the quick option is useful only if you rarely create or modify files on this PC.
Click OK to create the schedule.
Piriform Defraggler, Schedule window. Select a drive and turn on the Schedule defragmentation for chosen volume option. Set the Period to Monthly. Then select days or days of week for running the scheduled defragmentation. Piriform Defraggler, Schedule window, Day(s) of week option.

If you have more than one drive or partition, you should set automatic defragmentation on these, too. But please do not overlap the schedules to avoid system slowdowns!

To check that Defraggler actually runs at specified time(s), see Windows Task Scheduler logs.
In Windows XP, open Start menu, expand Accessories, System Tools and click Task Scheduler.
In Windows Vista and later, open Start menu or Start screen, type task and click Task Scheduler or Schedule tasks.

Windows XP users should then open Advanced menu and click View log. This opens Notepad with logfile for all scheduled tasks. Use Find command (keyboard shortcut Ctrl+F) to search for Defraggler tasks.
Windows XP, Scheduled Tasks. To see logs for tasks, open 'Advanced' menu and click 'View Log'.

In Windows Vista and newer, click Task Scheduler Library on the left. Then locate and click the task with the name starting with "Defraggler". Open its History tab and check results.
"Return code 0" in Event ID 201 (Action completed) means that defragmentation finished successfully.
Windows 7, Task Scheduler Library. To see logs for a task, click it and then open 'History' tab.

If the tab is empty, the task has not run yet. Or you need to click Enable All Tasks History (available since Windows 7) in the Actions pane on the very right.
Windows 7, Task Scheduler, Actions pane. To turn on logging for all tasks, click 'Enable All Tasks History'.

Task logs in Windows Vista, 7, 8 and 8.1 are also available in Event Viewer. Expand Applications and Services Logs, Microsoft, Windows, TaskScheduler and click Operational.

Enabling Boot Time Defrag in Defraggler

Because several system files are locked while Windows is running, it is necessary to defragment these before Windows starts. Common examples are Event Logs, Registry, User Accounts database and Paging File. The latter can cause serious slowdowns if it is badly fragmented and Random Access Memory (RAM) is full.

Please note that latest versions of Defraggler have removed the capability of boot-time Paging File defragmentation. If you need this feature and Windows is not installed on SSD, download version 2.08.373 from oldversion.com.

Do not enable Boot Time Defrag on SSD-s! Use scheduled TRIM instead.

While Windows XP users can also use the small Sysinternals PageDefrag utility for boot-time defragmentation, the program will not run properly in Windows Vista, 7, 8 and 8.1. That's where Defraggler can help.

To avoid unnecessary waiting while paging file is defragmented at every boot, set virtual memory to fixed size.

Below is an example of badly fragmented Paging File on a Windows XP system. Because the file parts are all over the disk, it takes considerably more time to write to or read from the file - and this causes poor performance.
Piriform Defraggler, badly fragmented Paging File example.

To enable defragmenting the system files, open Settings menu, expand Boot Time Defrag and click Run Every Time. This means that Event Logs and Paging File will be defragged each time Windows starts, excluding returning from Sleep or Hibernation modes.
Please note that defragmenting Paging File might take up to 30 minutes the first time. If you often experience long delays during boot time defrag, you should set the file to a fixed size.
Piriform Defraggler, main window. To enable defragmenting system files at boot, open Settings, Boot Time Defrag and click 'Run Every Time'.

Defraggler offers rebooting right away. Click No to keep working, or Yes to restart your computer and defrag the files.
Piriform Defraggler, Boot Time Defrag, Would you like to reboot now? Click No to continue working.

After you restart your computer the next time, a special blue (in Windows XP only) or black screen will appear after displaying Windows logo. The system files will then be defragmented for optimum performance.
Please wait until the process is complete - defragging Paging File (pagefile.sys) for the first time might take up to 30 minutes in case it is badly fragmented. Never turn off or reboot the PC during this process!
Piriform Defraggler, Boot Time Defrag in Windows XP. Please stand by. Piriform Defraggler, Boot Time Defrag in Windows 7. Please stand by.

Windows will start as usual after the boot-time defragmentation is complete.

Checking and defragmenting specific folders with Defraggler

In case you do not want to defragment a whole drive, you can check the fragmentation level and run defrag on specific folders or files.

First, ensure that Defraggler is not running. In Windows Explorer, right-click the folder or file you want to analyze. Open Defraggler menu and click Check Fragmentation.
Windows Explorer, right-click menu. To check for file or folder fragmentation level, open Defraggler menu and click Check Fragmentation.

In Windows Vista and later, User Account Control will pop up. Click Continue or Yes.
Windows Vista, User Account Control for Defraggler. Click Continue.

After the check is complete, Defraggler will display the results. If no fragmentation was detected, click Close.
Piriform Defraggler, Processing finished. There are 0 fragmented files. Click Close.

Even if fragmented files were detected, click Close again. Next, right-click the item in Windows Explorer and select Defragment from the Defraggler menu.
Piriform Defraggler, Processing finished. There are 1 fragmented files (3 fragments). Click Close. Windows Explorer, right-click menu. To defrag a specific file or folder, open Defraggler menu and click Defragment.


Please support winhelp.us:
No PayPal account required!

Comments











 Comments? Suggestions? Ideas? Let me know! 
Your name (public):
Your e-mail (will not be displayed):
Title:
Notify me of new comments to this item: (send e-mail to info[at]winhelp.us to stop receiving)
Your comments/suggestions/ideas (no HTML code!)
winhelp.us owners reserve the right to remove or not publish comments that they find unacceptable because of strong language, inappropriate contents, advertising or spamming.
winhelp.us Privacy Policy.
This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)
Share: Facebook Google+ Twitter LinkedIn StumbleUpon Pinterest E-mail

Browser and plugin check Google Custom Search Donate to keep this site running