Change when Automatic Defragmentation runs

By : ilikephone / On : 01/04/2023

Starting with Windows 7, any storage attached to your PC will be automatically defragmented. In the case of Windows 8.1, the HDD is basically defragmented (fragmentation), and the SSD is a mechanism to execute the Trim command on a fixed schedule. However, the automatic defragmentation of HDDs, which are increasing in capacity, can sometimes interfere with daily work. So, let's introduce how to review the settings related to "Drive Optimization".

Mechanism of Automatic Defragmentation

Hard drive head movement time increases when files are structurally fragmented (data is not arranged continuously and is scattered in various places). This inevitably leads to a decrease in access speed. As a result, it affects the performance of the entire PC and the responsiveness of Windows 8.1, resulting in a so-called "slow PC". That's why Windows 7 schedules defragmentation every midnight.

Windows 7 Automatic Defragmentation (Disk Defragmenter Schedule) settings. Run every week at midnight

Windows 8.1 has a similar setting dialog, but frequency selection is only daily/weekly/monthly. The item to select execution time has been removed. This is because it performs the task of checking the fragmentation state, whether automatic defragmentation is necessary.

Windows 8.1 automatic defragmentation (optimization of drives) settings have been omitted for selecting execution time

Task scheduler task execution timing and automatic defragmentation It is possible to confirm that the timing is the same

I wasn't able to confirm under what conditions the task was executed, but the interesting thing is the options at runtime. When I checked the help from the command line, it said "Perform optimization suitable for each media for all volumes with priority "Normal"", but I couldn't find an explanation for "$" (see below). I tried to check the operation with the option "$" removed, but I could not confirm the difference in optimization processing such as consolidation of free space.

Change automatic defragmentation timing

What the Automatic Defragmentation task does. The option "$" that you don't usually see is given

Run from command line with/without option '$' I tried it, but I couldn't tell the difference

Change the timing of automatic defragmentation

Automatic defragmentation cannot be controlled at the user level, but what is important is the frequency of execution. As shown above, Automatic Defragmentation runs weekly by default, but if you don't use your PC often, you don't have to run it that often.

Even if you use your PC every day, except for the case of manipulating a large number of files, "every month" is fine. You can change this setting by selecting "Monthly" from the drop-down list in the "Optimize Drives" dialog.

Start "Run" by pressing "Win" + "R" keys and enter "dfrgui.exe" in the text box and click/tap the "OK" button.

When Optimize Drives starts, click Settings Click/tap the "Modify" button

Click/tap to open the drop-down list and select Select "Monthly" and click/tap the "OK" button

With this, you should be less bothered by automatic defragmentation when you open your 2in1 PC and start working. In addition, when removable media such as SD cards and USB memory are installed, they are included in automatic defragmentation. In the dialog that appears when you press the "Select" button, uncheck "Automatically optimize new drives" or manually uncheck removable drives from the list.

Check "Automatically optimize new drives" or click/tap removable drives in the list and click/tap the "OK" button

Yoshikazu Akutsu (Cactus)