Quickly defragment a Windows 10 disk. Disk defragmenters for a Windows computer

In this article I will show you how to defragment a disk on Windows 10 using both built-in tools and third party software. These methods are suitable for users of all Windows operating systems without any problems.

When using hard drives User data is recorded and erased. Therefore, in some areas of your hard drive you may see empty space into which the system will try to write the file you need. But if the file size is too large, then part of the file will be written to one place, and part to another. This is why the so-called fragmentation arises. If you try to access such a file recorded on your hard drive in this way, it will take you longer. Please note that the more full your hard drive is, the more files on it will become fragmented. Therefore, it is recommended to completely fill your hard drives.

To fix this, they use the defragmentation process. The process itself is that all files that are not written sequentially will be overwritten. And all empty clusters will disappear, since in these places everything necessary files and will be overwritten. Since when running such files the system will not have to search for pieces throughout the entire file system, this will already speed up the speed of the computer.

How to defragment a hard drive using the command line

For this we will open command line by clicking on Start right mouse button and selecting Command Line (Administrator) .

To see defragmentation help and all possible options, run the command:

C:\WINDOWS\system32>defrag /?

You can choose the necessary parameters yourself. By looking at the screenshot or after running the previous command.

In order to check whether defragmentation is needed for local disk C:/ run the command:

To start the defragmentation process in advanced mode, so that the defragmentation process has priority and upon completion you will see more information, run the command:

Disk defragmentation using third-party software

To defragment a disk, there are many programs that can successfully help you. I'll show you how to defragment using free utility Defraggler. You can download it without problems from the official website. The program works on all Windows operating systems since 2000.

You can use Defraggler instead of the system's built-in cleaning program Windows drives, you need to specify this item during installation. The defragmentation process itself is no different from the previous ones. First you need to perform analysis, and then defragmentation. In the settings you can set automatic start scheduled defragmentation, optimization system files when loading the system and many other parameters.

In this article, I showed you how to defragment a disk on Windows 10 in several ways. If you are using an SSD, then you should disable disk defragmentation completely, as this will increase the service life of your SSD. These methods will work without problems on Windows 7. I hope the article was interesting for you. Write comments and share it on social networks.

At long-term operation computer, the user may notice a slowdown in its performance. This may be due to inferior work hard HDD or SSD. To optimize their operation, disk defragmentation is used on Windows 10 for HDDs and TRIM for SSDs. In this material we will look at what it is, how to do this procedure, and how to solve problems.

What is disk defragmentation

The Windows hard drive uses file drives. NTFS systems, FAT, or FAT32, which split it into clusters. When copying files to the HDD, parts of the file are written to these clusters. The system tries to write information to file clusters sequentially. Over time, there are more busy clusters, and they are distributed throughout hard drive. When a file is deleted, the corresponding fragments occupied by it are freed, forming a sequence of free clusters. When writing a file larger size than the vacated sequence of clusters, fragmentation of recording fragments occurs, that is, one part of the file occupies these free clusters, and the other part is added to other sequences of clusters. Over time, there may be many such fragments.

Reading files on the HDD is carried out using a magnetic head. If file fragments are scattered across different clusters, then reading will take longer than if the file fragments were located in sequence. The more fragmented files there are, the longer it takes to access them, hence the overall slowdown.

Disk defragmentation is the process of moving file fragments into sequence for the purpose of faster reading and faster operation. Defragmentation is only applicable for HDDs; it is not needed for SSDs. In SSDs, different clusters are accessed at the same time. For SSDs, TRIM technology is applicable, which identifies SSD blocks that are not load-bearing. useful function and deletes them.

By Windows default 10 performs weekly optimization of the disk depending on its type. In such cases, you hardly need to do manual optimization, but there are different situations, for example, external hard The disk is not always connected and cannot be optimized according to the schedule. Let's look at how to defragment a disk on Windows 10 in more detail in this case.

Important! Defragmentation should be done if more than 10% of the disk space is fragmented. Otherwise there won't be much sense. Perform the steps below using an administrator account.

Disk defragmentation using a standard optimization application

This activity is carried out by the “Disk Optimization” utility. To open it, follow one of the steps below.

The “Service” tab contains the “Optimize” button, which you need to click.

The disk optimization window provides information: a list of media and their type, the date when defragmentation was turned on and the percentage of fragmentation. Using this information, you can find out the current status of your media. If there is no information about fragmentation, or you want to update it, then select required disk and click the “Analyze” button.

Remember, if more than 10% is fragmented then you need to defragment it. To do this, click on “Optimize”. Wait for the procedure to complete. Users usually have a question: how many passes are there in Windows 10 defragmentation? It is impossible to give a definite answer, since it depends on the degree of fragmentation and hard size disk. For example, a 500 GB HDD can be defragmented in 10 passes. This procedure is performed in background, You can simply close the optimization window and continue with your business.

Optimization occurs on schedule. To customize it for yourself, click “Change settings.”

If you need defragmentation on a schedule, then leave the checkbox; if not, uncheck it. It is recommended to leave the checkbox, and the user can select the frequency of defragmentation; the following are available here: daily, weekly, monthly frequency. Also leave a note on the notification if you miss scheduled defragmentation for 3 times in a row. The Select button allows you to specify drives for which automatic defragmentation is applicable, and also allows you to set auto-optimization for new drives. Once configured, click OK in all windows.

Disk optimization via Cmd and PowerShell

You can defragment a disk (TRIM) using Cmd consoles and PowerShell. For Cmd, follow these steps.


Where C is the disk and A is the analysis. Set your drive letter value. Click Enter. The analysis will show the percentage of fragmentation and give recommendations on whether defragmentation is necessary.

  1. If defragmentation needs to be performed, then use a construction like:

Where C is the disk and O is the optimization corresponding to the media type (defragmentation, TRIM). Click Enter. Wait for the procedure to complete. Also, to optimize all disks (HDD, SSD), you can use the following design:

Where /C is a parameter pointing to all drives. Here you will see the before and after fragmentation status.

For more detailed information about the parameters of the defrag command in Cmd, write defrag /? and click Enter. This will output help.

It is possible to defragment a disk on Windows 10 using PowerShell. Follow these steps.

Optimize-Volume -DriveLetter C -Analyze -Verbose

Where C is the drive letter, we replace it with our own. Press Enter. In the analysis you will receive all the information about fragmentation, as well as recommendations on the need for defragmentation.

  1. If defragmentation is required, use the command:

Optimize-volume -DriveLetter C –Verbose

Where C is the drive letter, change it to your own. Click Enter. This command automatically selects optimization based on media type (defragmentation for HDD, TRIM for SSD). Wait until the procedure is completed. During optimization you can use a PC.

Disk defragmentation programs

Besides standard means You can use additional defragmentation programs in the form of programs. These include:

  • UltraDefrag;
  • Defraggler;
  • Piriform Defraggler;
  • Auslogics Disk Defrag;
  • Puran Defrag Free;
  • Other.

For example, consider defragmentation Defraggler program. Follow these steps:

What to do if disk defragmentation does not work

Sometimes situations arise that it is difficult or impossible to defragment a disk on Windows 10. Here possible options solutions to problems of this nature:

  1. Perform a scan with sfc /scannow or DISM in CMD.
  2. Check the functionality of the defragmentation service, it is called “Disk Optimization”, and it should be launched “Manually”. Also, make sure that the services " Remote call procedures (RPC), "DCOM Server Process Launcher", and "Matcher endpoints RPC" launch type is set to "Automatic".
  3. Disable your antivirus program.
  4. Run secure Windows mode 10 and try disk defragmentation here.
  5. Quit applications that may be defragmented and running in the background. For example, you can do this from the task manager.
  6. Create a new account in Windows 10 and try defragmenting here.
  7. Use the chkdsk file recovery utility via Cmd.
  8. Try using programs such as those described above.

Now you know what disk defragmentation is on Windows 10 for HDD and TRIM for SSD, and how to do it. Leave automatic optimization, or do it manually regularly.

Regular optimization of your disk drives is important process which will help you save maximum performance computer. IN standard set Windows tools 10 includes utilities that can help you maintain and defragment your PC’s drives. Windows 10 itself automatically performs disk optimization once a week. The HDD is defragmented, and the SSD drives receive commands called TRIM.

Why is disk defragmentation necessary?

During active use drive performance decreases due to fragmentation file system. This causes the system to spend more time gaining access to sectors of the media. For SSD drives similar problem no, since their access time to memory cells is tens of times less. However, the SSD needs the TRIM command to clear unused blocks. When it comes time to write information to these blocks, Windows spends less time executing the procedure.

Modern Windows versions know how to choose correct methods optimization and right time depending on the specifications and usage of your drive. However, you can manually defragment your disk at any time in Windows 10.

How to defragment a disk in Windows 10

There are several ways to do this. Windows 10 allows you to defragment drives through a menu in Explorer or using Command Prompt / PowerShell.

Note: All procedures in this instruction are performed on behalf of the Administrator. You must have an account with the appropriate level of access rights, or a password for account Administrator.

Disk Defragmentation via Explorer

Automatic defragmentation in Windows 10

As mentioned above, Windows 10 can perform automatic maintenance installed drives and perform optimization/defragmentation on a schedule. If you wish, you can customize it to your own preferences.

How to disable disk defragmentation in Windows 10

Let us immediately note that it is not recommended to disable automatic defragmentation, since thanks to this function the system is able to maintain its drives in a healthy state without user intervention. If you still think that for some reason you need to disable automatic defragmentation in Windows 10, you can do this in the scheduled disk optimization settings interface.

After this, the system will stop automatically optimizing the drives installed in the computer. To enable the automatic defragmentation function back, follow the same procedure and check the box Run on a schedule (recommended).

Disk Defragmentation via Command Line

Run as administrator. To do this, enter in the search cmd and press right click mouse on the command line. Click Run as Administrator. Alternatively, you can for more quick launch on behalf of the administrator. With the arrival of Windows 10 Creators Update its place was taken by the PowerShell utility.

Enter the command defrag. The command line will display all possible parameters for this command. /A - Analysis of the specified volumes.

  • /C - Perform the operation on all volumes.
  • /D - Standard defragmentation (default).
  • /E - Perform the operation on all volumes except those specified.
  • /G - Optimize storage levels on the specified volumes.
  • /H - Start an operation with normal priority (low by default).
  • /I n - Level optimization will be performed for no more than n seconds on each volume.
  • /K - Optimize memory on selected volumes.
  • /L - Re-optimize selected volumes.
  • /M [n] - Perform an operation on each volume in parallel in the background. A maximum of n threads optimize storage tiers in parallel.
  • /O - Optimize using the method appropriate for the media type.
  • /T - Track an operation that is already in progress on the specified volume.
  • /U - Displays the progress of the operation on the screen.
  • /V - Display detailed fragmentation statistics.
  • /X - Union free space on the specified volumes.

For example, the command for standard defragmentation drive D through the command line will look like defrag D: /D. You should select the letter for the command based on own needs. After defragmentation is complete, the system will issue a report on the work done.

Disk defragmentation in PowerShell


Performing these routines on a regular basis will help your computer stay as productive as its drive can.

The Windows operating system has a built-in defragmentation utility. hard drive, which increases system performance as a result of optimization. In this article I will talk about how to defragment a disk using the Windows 10 operating system as an example. Starting defragmentation in Windows 7 and Windows 8 is similar.

Why is defragmentation needed? During operation, files on the computer disk are constantly moving: new files are added, files are deleted, copied, etc. By default, new file continuously written to disk free space disk.

When a file is deleted or moved from disk, free space appears on the disk surrounded by other entries. When adding a new file of larger size, the file will be written to this free space, and the other part of the file will be written to another free space on the computer disk. As a result, the file will be fragmented, that is, fragments of the file will be in different places disk.

Over time, the disk accumulates large number fragmented files. operating room Windows system it takes more time to access files, since fragments of one file are located in different places on the disk, and there are a lot of such files.

To solve this problem, defragmentation is necessary: ​​moving file fragments to one place. Defragmenting your hard drive will increase the performance of your operating system. If defragmentation has never been carried out on the computer, then after it has been done, increase Windows performance will be noticeable even visually.

Disk defragmentation on Windows is performed using the built-in defragmentation utility, or using third-party programs:

Now we will look at free disk defragmentation in Windows, carried out by a built-in utility. The defragmentation utility, with default system settings, is enabled to work in automatic mode, to perform scheduled optimization.

Please note that if your computer has an SSD drive, you should not defragment the drive. By default, in Windows 10 defragmentation is SSD drive disabled. In this case, defragment only the computer's hard drive (HDD).

Disk defragmentation on Windows 10

How to defragment in Windows 10? First, open an Explorer window, and then click on any logical drive.

In the “Disk Optimization” window, select the disk, and then click on the “Analyze” button.

After the analysis is completed, you will see the current state of the disk: how many percent is this disk fragmented.

To start the defragmentation process, click on the “Optimize” button.

Next comes the process of moving file fragments on the disk, which will take some time. If the disk is heavily fragmented, then its defragmentation will take quite a long time. long time. After clicking the “Stop” button, you can stop the defragmentation process.

After the process is completed, in the utility window you will see that Windows defragmentation produced (fragmented: 0%).

Scheduled defragmentation

In the disk optimization window, click on the “Change settings” button. Next, a window will open in which you can configure the optimization schedule. By default, the following settings are enabled:

  • run on schedule (recommended)
  • notify if three scheduled executions are missed in a row

Defragmentation is performed according to the schedule, depending on the settings: weekly, daily, monthly.

To select the disks on which you want to defragment, click on the “Select” button. Allocate all or individual disks to run optimization on a schedule.

This window displays only disks that are available for automatic scheduled defragmentation.

Disk defragmentation via command line

You can run the Windows Defragmentation Utility from the command line. Run the command line interpreter as an administrator. Enter the defrag command at the command prompt, and then enter the tasks to perform the operation.

List of options for using the defragmentation utility in Windows (information from Microsoft):

Syntax: defrag<тома>| /C | /E<тома> [<задачи>] ] Where<задачи>or not specified (normal defragmentation), or specified as follows: /A | | /O | /X Or, to track an operation that is already running on the volume: defrag<том>/T Parameters: Value Description /A Analyzes the specified volumes. /C Performs the operation on all volumes. /D Standard defragmentation (default). /E Performs the operation on all volumes except those specified. /H Start an operation at normal priority (low by default). /K Optimizes memory on selected volumes. /L Re-optimize selected volumes. /M Runs an operation simultaneously on each volume in the background. /O Optimize using the appropriate method for the media type. /T Monitor an operation that is already in progress on the specified volume. /U Displays the progress of the operation on the screen. /V Display detailed fragmentation statistics. /X Consolidates free space on the specified volumes. /R Performs a partial defragmentation (default behavior), attempting to merge only fragments smaller than 64 MB. /W Performs a complete defragmentation, attempting to merge any fragments regardless of their size. /F Executes forced defragmentation, even if there is not enough free space on the disk. /B Defragments only boot files on the specified section. Examples: defrag C: /U /V defrag C: D: /M defrag C:\mountpoint /A /U defrag /C /H /V

A command has been entered into the command line to completely defragment drive “C” and display a detailed report.

Conclusions of the article

To improve the performance of your computer, you should periodically perform defragmentation of hard disk in operating system Windows. Defragmentation can be done using the built-in utility included with the operating system.

Defragmentation in Windows 10 (video)

Regularly optimizing your disk drives is an important process that will help you keep your computer running at peak performance. The standard set of Windows 10 tools includes utilities that can help you maintain and defragment your PC's drives. Windows 10 itself automatically performs disk optimization once a week. The HDD is defragmented, and the SSD drives receive commands called TRIM.

Why is disk defragmentation necessary?

During active use of the drive, performance decreases due to file system fragmentation. This causes the system to spend more time gaining access to sectors of the media. SSD drives do not have this problem, since their access time to memory cells is tens of times less. However, the SSD needs the TRIM command to clear unused blocks. When it comes time to write information to these blocks, Windows spends less time executing the procedure.

Modern versions of Windows are able to choose the right optimization methods and the right time, depending on the specifications and usage of your drive. However, you can manually defragment your disk at any time in Windows 10.

How to defragment a disk in Windows 10

There are several ways to do this. Windows 10 allows you to defragment drives through a menu in Explorer or using Command Prompt / PowerShell.

Note: All procedures in this instruction are performed on behalf of the Administrator. You must have an account with the appropriate level of access rights, or a password for the Administrator account.

Disk Defragmentation via Explorer

Automatic defragmentation in Windows 10

As mentioned above, Windows 10 can automatically maintain installed drives and perform optimization/defragmentation on a schedule. If you wish, you can customize it to your own preferences.

How to disable disk defragmentation in Windows 10

Let us immediately note that it is not recommended to disable automatic defragmentation, since thanks to this function the system is able to maintain its drives in a healthy state without user intervention. If you still think that for some reason you need to disable automatic defragmentation in Windows 10, you can do this in the scheduled disk optimization settings interface.

After this, the system will stop automatically optimizing the drives installed in the computer. To enable the automatic defragmentation function back, follow the same procedure and check the box Run on a schedule (recommended).

Disk Defragmentation via Command Line

Run as administrator. To do this, enter in the search cmd and right-click on the command line. Click Run as Administrator. Alternatively, you can run as administrator for a faster experience. With the arrival of Windows 10 Creators Update, PowerShell took its place.

Enter the command defrag. The command line will display all possible parameters for this command. /A - Analysis of the specified volumes.

  • /C - Perform the operation on all volumes.
  • /D - Standard defragmentation (default).
  • /E - Perform the operation on all volumes except those specified.
  • /G - Optimize storage levels on the specified volumes.
  • /H - Start an operation with normal priority (low by default).
  • /I n - Level optimization will be performed for no more than n seconds on each volume.
  • /K - Optimize memory on selected volumes.
  • /L - Re-optimize selected volumes.
  • /M [n] - Perform an operation on each volume in parallel in the background. A maximum of n threads optimize storage tiers in parallel.
  • /O - Optimize using the method appropriate for the media type.
  • /T - Track an operation that is already in progress on the specified volume.
  • /U - Displays the progress of the operation on the screen.
  • /V - Display detailed fragmentation statistics.
  • /X - Consolidates free space on specified volumes.

For example, the command for standard defragmentation of drive D via the command line would look like defrag D: /D. You should select a letter for the team based on your own needs. After defragmentation is complete, the system will issue a report on the work done.

Disk defragmentation in PowerShell


Performing these routines on a regular basis will help your computer stay as productive as its drive can.