How does disk defragmentation work? Disk Defragmenter

After defragmentation, reading and writing files speeds up, and, consequently, the work of programs, due to the fact that sequential read and write operations are performed faster than random accesses (for example, the hard disk does not require head movement). Another definition of defragmentation is: redistributing files on a disk so that they are located in contiguous areas.

Long files occupy multiple clusters. If writing is done to an empty disk, then clusters belonging to the same file are written in a row. If the disk is full, it may not have a solid area large enough to accommodate the file. However, the file will still be written if there are many small areas on the disk, the total size of which is sufficient for recording. In this case, the file is written in several fragments. This splitting of a file into fragments when writing to disk is called fragmentation. If there are many fragmented files on the disk, the speed of reading them from the media decreases, since moving between clusters in which fragments are stored on hard drives takes time. When using flash memory, the search time (accessing different clusters) is much lower, so defragmentation is not required for them.

Some software requires that certain files be stored in sequential sectors.

Defragmentation is most often required for file systems such as File Allocation Table (FAT16, FAT32) for MS-DOS and Microsoft Windows, since programs for working with them usually do not provide any means to prevent fragmentation, and it appears even on almost empty disk and light load.

In addition to slowing down your computer for file operations (such as reading and writing), file fragmentation negatively affects the health of the hard drive because it forces the drive's positioning heads, which read and write data, to constantly move.

To eliminate the problem of fragmentation, there are defragmenter programs, the principle of which is to “assemble” each file from its fragments. A common disadvantage of such programs is their slow operation - the defragmentation process usually takes a very long time (up to several hours).

Encyclopedic YouTube

    1 / 3

    ✪ Disk defragmentation - is it necessary?

    ✪ Quick disk defragmentation in Windows 7/10

    Subtitles

Manual defragmentation and fragmentation prevention

Despite the fact that among programs of this kind there are quite intelligent ones, you can do a good defragmentation on your own. To do this, it is enough to create a new partition on the disk with a file system, and then simply copy the files that will be stored on it to this logical disk. During such copying to an empty disk, data is written sequentially, without fragmentation. In addition, the process of writing files itself takes several times less time than defragmentation using programs.

Knowledge of the file structure and principles of operation of the hard drive helps to greatly reduce file fragmentation due to the correct organization of the user's work. This organization consists of first recording onto a blank disk those files that are intended to be stored for a long time: favorite films, archives, music. Those files that are not planned to be stored for a long time are better written to the end of the disk: deleting them will not cause fragmentation of other files.

It helps to use a separate partition for frequently changed files. For example, in Unix-like operating systems, separate partitions often contain user data and settings (/home directory), temporary files (/tmp), protocols, caches, etc. (/var); see also FHS.

File systems

# xfs_fsr -v /dev/sdX1

  • Information about file fragmentation can be obtained using the filefrag utility from the package

Good day!

Despite the fact that Windows has a built-in disk defragmenter, there are hundreds (if not more) of similar programs (that do it ten times better!).

The fact is that, in my opinion, Microsoft added it to Windows to have it, and its work is far from ideal (the algorithms are imperfect, there is no detailed schedule and settings, you cannot manually specify specific folders and files, etc.) ...

Addition!

If you don't know what defragmentation is and how to do it, I recommend reading this help article:

The best utilities for HDD defragmentation


IObit Smart Defrag

A very powerful disk defragmenter, which, thanks to its unique algorithms, is capable of maximizing the performance of your disk subsystem!

The program not only defragments the files themselves, but also distributes them on the disk in a special way: according to how often they are used. All operations can be configured to be performed automatically (which means you won’t be distracted and waste time optimizing the system every time).

Smart Defrag is the main window of the program: there are options for disk cleaning, game optimization, etc.

Advantages:

  1. unique defragmentation algorithms (according to the developers, they are among the best in the World);
  2. you can defragment individual folders or files;
  3. game optimization;
  4. it is possible to work according to a schedule;
  5. high safety during operation (if suddenly the electricity goes out during defragmentation, everything will be fine with your data);
  6. there is an option to defragment the disk before booting the system;
  7. thoughtful and user-friendly interface;
  8. The utility is free, and entirely in Russian (even the most “distant” menus with high-quality translation).

Defraggler

Defraggler is a simple, free program to quickly evaluate and defragment hard drives. The utility has everything you need in its arsenal: assessing the state of the disk, analysis, defragmentation of individual files (it’s convenient to optimize folders with games), etc.

By the way, the utility automatically determines the type of media (HDD, SSD), which is very convenient if you have several media connected - there will be no need to remember which one is “which” (note: since SSD drives are not recommended to be defragmented).

Peculiarities:

  1. defragmentation of individual files (many similar programs allow you to optimize only the entire disk);
  2. there is a portable version that does not require installation (the program can be copied to a flash drive/external HDD and used on any PC);
  3. the utility supports all the latest versions of Windows (including Windows 10);
  4. NTFS and FAT32 file systems are supported;
  5. automatic disk type detection;
  6. After analysis, the utility shows a list of fragmented files (convenient when you do not want to defragment the entire disk).

Auslogics Disk Defrag

This defragmenter differs from others in its compactness and high speed. The program is rightfully considered one of the best in the World - more than 11,000,000 users have recognized this product!

Peculiarities:

  1. it is possible to defragment both individual files/folders and free space;
  2. allows you to defragment Windows system files (which affects overall performance);
  3. it is possible to work in the background, as unnoticeably as possible for the user (so your system will always be in optimal condition);
  4. the program is free for home users;
  5. Supported by all popular OS Windows 7/8/10 (32, 64 bits).

Disk SpeedUp

This utility is from the famous Glary Soft PC optimization set. The utility optimizes disks for maximum system performance. Disk SpeedUp can work automatically and according to a schedule, without distracting the user (by the way, you can set at what CPU load the defragmenter will turn off background operation. This option is not found in most other utilities of this kind).

Peculiarities:

  1. automatic mode and work according to a predetermined schedule;
  2. there are options to turn off the PC after defragmentation is complete;
  3. setting the PC load level (CPU and hard drive) to disable background defragmentation;
  4. support for all the most popular file systems: FAT16, FAT32, NTFS, NTFS5, NTFS EFS;
  5. the program has pre-configured templates for work (suitable in most cases);
  6. regular updates and improvements to the program;
  7. support for all versions of Windows 7/8/10.

MyDefrag (old name: JkDefrag)

Despite the fact that this program was created not by any company, but by a single programmer, it is rightfully considered a leader in its segment.

Judge for yourself: it can work both in simple mode (for ordinary users) and provide complex and detailed settings for advanced ones. MyDefrag supports various scripts; you can create or edit them yourself), it can work according to a pre-configured schedule, analyze the HDD and defragment not only occupied space, but also free space.

There are silent settings - they are suitable for those users who do not want to deal with all this multi-functionality of the utility. By the way, it works in all versions of Windows (XP/7/8/10), fully supports the Russian language.

O&O Defrag

A very powerful and multifunctional utility for optimizing hard drives. Can work with many file systems (FAT, FAT32, NTFS, NTFS5), Volume/Stripe Sets arrays, supports background mode, scheduled work, etc.

Peculiarities:

  1. There are 5 defragmentation modes: STEALTH (note: invisible in the background), SPACE (note: free space), COMPLETE/Name, COMPLETE/Date and COMPLETE/Access;
  2. there is an option to start defragmentation when a certain percentage level of fragmentation is reached;
  3. the ability to defragment system files that affect the performance of your system (swap file, registry, MFT, etc.);
  4. availability of a schedule;
  5. pleasant and intuitive interface (even completely novice users can figure it out);
  6. support for all Windows file systems: FAT, FAT32, NTFS, NTFS5;
  7. support for Russian and all modern OS Windows 7/8/10.

Puran Defrag

Free defragmenter India. It is distinguished primarily by its high-speed operation (it uses its own unique PIOZR algorithm). As for defragmentation, Puran Defrag can defragment the entire disk, as well as individual folders and files (including setting a schedule, with the ability to limit work during CPU load with extraneous tasks, prioritizing system files).

Puran Defrag - main program window

It will save those users who have little time to maintain the system (or for those who constantly forget about it). So to speak, once you configured Puran Defrag, your system will always be responsive and fast. Comfortable!

Peculiarities:

  1. your own unique algorithm (high-speed and high-quality work);
  2. separate priority for defragmenting system files;
  3. command line support;
  4. the ability to turn off the PC after completing the HDD optimization process;
  5. it is possible to set a schedule for automatic and background defragmentation;
  6. compressing directories to increase system boot speed;
  7. you can defragment individual folders/files from the Explorer context menu;
  8. support for all popular versions of Windows XP/7/8/10 (32 and 64 bits).

That's all.

For additions on the topic - a special merci!

Disk defragmentation is a procedure for merging fragmented files, which is mainly used to optimize Windows. In almost any article on speeding up your computer you can find advice about defragmentation.

But not all users understand what defragmentation is, and do not know in which cases it is necessary to do it and in which it is not; what software should you use for this - is the built-in utility sufficient, or is it better to install a third-party program?

When doing disk defragmentation, many users don’t even think about or try to find out what it is all about. The answer can be found in the name itself: “defragmentation” is a process that combines files that were broken into fragments when written to the hard drive. The image below clearly shows that on the left, fragments of one file are recorded in a continuous stream, without empty spaces or divisions, and on the right, the same file is scattered across the hard drive in the form of pieces.

Naturally, it is much more convenient and faster for the disk to read a continuous file than one separated by empty space and other files.

Why does HDD fragmentation occur?

Hard drives are made up of sectors, each of which can store a certain amount of information. If a large file is saved to the hard drive, which cannot fit into one sector, then it is split and saved into several sectors.

By default, the system always tries to write file fragments as close to each other as possible - in adjacent sectors. However, due to the deletion/saving of other files, resizing of already saved files and other processes, there are not always enough free sectors located next to each other. Therefore, Windows transfers the file recording to other parts of the HDD.

How fragmentation affects drive speed

When you need to open a recorded fragmented file, the hard drive head will sequentially move to the sectors where it was saved. Thus, the more times he has to move around the hard drive in an attempt to find all the pieces of the file, the slower the reading will be.

The image on the left shows how many movements the hard drive head needs to make to read files that have been split into parts. On the right, both files, indicated in blue and yellow, are written continuously, which significantly reduces the number of movements across the disk surface.

Defragmentation is the process of rearranging pieces of one file so that the overall percentage of fragmentation decreases, and all files (if possible) are located on adjacent sectors. Thanks to this, reading will occur continuously, which will have a positive effect on the speed of the HDD. This is especially noticeable when reading large files.

Does it make sense to use third-party defragmentation programs?

Developers have created a large number of programs that deal with defragmentation. You can find both small defragmenter programs and find them as part of complex system optimizers. There are free and paid options. But are they necessary?

There is certainly a certain effectiveness of third-party utilities. Programs from different developers may offer:

  • Custom auto-defragmentation settings. The user can more flexibly manage the procedure schedule;
  • Other algorithms for carrying out the process. Third-party software has its own features that are more beneficial in the long run. For example, they require less percentage of free space on the HDD to run the defragmenter. At the same time, files are optimized, increasing their download speed. The volume's free space is also consolidated so that the level of fragmentation increases more slowly in the future;
  • Additional features, for example, registry defragmentation.

Of course, program functions vary depending on the developer, so the user needs to select a utility based on his needs and PC capabilities.

Is it necessary to constantly defragment the disk?

All modern versions of Windows offer automatic execution of this process on a schedule once a week. Overall, it's more useless than necessary. The fact is that fragmentation itself is an old procedure, and in the past it was really constantly needed. In the past, even mild fragmentation has had a negative impact on system performance.

Modern HDDs have a higher operating speed, and new versions of operating systems have become much smarter, so even with a certain fragmentation process, the user may not notice a decrease in operating speed. And if you use a hard drive with a large capacity (1 TB or higher), then the system can distribute heavy files in an optimal way for it so that this does not affect performance.

In addition, constantly running the defragmenter shortens the life of the disk - this is an important disadvantage that should be taken into account.

Since defragmentation is enabled by default in Windows, you must disable it manually:


Is it necessary to defragment an SSD drive?

A very common mistake made by users using solid state drives is using any defragmenter.

Remember, if you have an SSD drive installed on your computer or laptop, do not defragment it under any circumstances - this greatly accelerates the wear of the drive. In addition, this procedure will not increase the speed of the SSD.

If you have not disabled defragmentation in Windows before, be sure to do so either for all drives or just for the SSD.


Third-party utilities also have a similar feature, but the configuration method will be different.

Features of defragmentation

There are several nuances for the quality of this procedure:

  • Despite the fact that defragmenters can work in the background, to achieve the best results, it is best to run them when there is no or minimal user activity (for example, during a break or while listening to music);
  • When carrying out periodic defragmentation, it is more correct to use quick methods that speed up access to the main files and documents, but a certain part of the files will not be processed. In this case, the full procedure can be done less frequently;
  • Before complete defragmentation, it is recommended to remove junk files and, if possible, exclude files from processing pagefile.sys And hiberfil.sys. These two files are used as temporary files and are recreated with each system startup;
  • If the program has the ability to defragment the file table (MFT) and system files, then do not neglect it. As a rule, this function is not available when the operating system is running, and can be performed after a reboot before starting Windows.

How to defragment

There are two main ways to carry out defragmentation: installing a utility from another developer or using a program built into the operating system. In this case, you can optimize not only built-in drives, but also external drives connected via USB.

Our website already has instructions for defragmenting using Windows 7 as an example. In it you will find guidance on working with popular programs and a standard Windows utility.

  1. Do not defragment the solid state drive (SSD).
  2. Disable scheduled defragmentation in Windows.
  3. Do not abuse this process.
  4. First, do an analysis and find out whether there is a need to perform defragmentation.
  5. If possible, use high-quality programs whose efficiency is higher than the built-in Windows utility.

Good afternoon! Whether you want it or not, to make your computer work faster, you need to carry out preventive measures from time to time (clean it of temporary and junk files, defragment it).

In general, I can say that most users very rarely carry out defragmentation, and in general, do not pay due attention to it (either out of ignorance, or simply because of laziness)…

Meanwhile, by doing it regularly, you can not only speed up your computer a little, but also increase the service life of the disk! Since there are always a lot of questions regarding defragmentation, in this article I will try to collect all the main things that I myself encounter quite often. So …

FAQ. Questions about defragmentation: why do it, how often, etc.

1) What is defragmentation, what is the process? Why do it?

All files on your disk, while being written to it, are written sequentially in pieces onto its surface, often called clusters (many have probably already heard this word). So, while the hard drive is empty, file clusters can be nearby, but when there is more and more information, the scattering of these pieces of one file also increases.

Because of this, when accessing such a file, your disk has to spend more time reading the information. By the way, this scattering of pieces is called fragmentation.

Defragmentation is aimed precisely at collecting these pieces compactly in one place. As a result, the speed of your disk and, accordingly, the computer as a whole increases. If you have not defragmented for a long time, this may affect the performance of your PC, for example, when opening some files or folders, it will begin to “think” for a while...

2) How often should you defragment the disk?

Quite a common question, but it’s difficult to give a definite answer. It all depends on how often you use your computer, how it is used, what drives it uses, what file system it has. In Windows 7 (and higher), by the way, there is a good analyzer that will tell you what to do defragmentation , or not (there are also separate special utilities that can analyze and notify you in time that it’s time... But about such utilities - below in the article).

To do this you need to go to control Panel, enter “defragmentation” in the search bar, and Windows will find the desired link (see screenshot below).

3) Do I need to defragment SSD drives?

No need! And even Windows itself (at least the new Windows 10; this can be done in Windows 7) disables the analysis and defragmentation button for such disks.

The fact is that an SSD disk has a limited number of write cycles. This means that with each defragmentation, you reduce the life of your disk. In addition, SSD drives do not have mechanics, and after defragmenting, you will not notice any increase in operating speed.

4) Do I need to defragment the disk if it has an NTFS file system?

In fact, there is an opinion that the NTFS file system practically does not need defragmentation. This is not entirely true, although it is partly true. It’s just that this file system is designed in such a way that defragmenting a hard drive under its control is required much less frequently.

In addition, the speed of operation does not drop as much due to strong fragmentation as if it were on FAT (FAT 32).

5) Is it necessary to clean the disk of junk files before defragmentation?

If you clean up the disk before defragmenting, then:

  • speed up the process itself (after all, you will have to work with fewer files, which means the process will complete earlier);
  • make Windows run faster.

6) How to defragment a disk?

It is advisable (but not necessary!) to install a separate special. a utility that will deal with this process (about such utilities below in the article). Firstly, it will do it faster than the utility built into Windows, and secondly, some utilities can defragment automatically, without distracting you from your work (for example, you started watching a movie, the utility, without disturbing you, defragmented the disk at this time).

But, in principle, even the standard program built into Windows does defragmentation quite well (although it does not have some of the “goodies” that third-party developers have).

7) Should I defragment a disk other than the system disk (i.e., the one on which Windows is not installed)?

Good question! It all depends again on how you use this disk. If you only store movies and music on it, then there is not much point in defragmenting it.

It's another matter if you install, say, games on this disk - and during the game, some files are loaded. In this case, the game may even begin to slow down if the disk does not respond to it in time. As it should be, with this option, it is advisable to defragment such a disk!

How to defragment a disk - step by step steps

By the way, there are universal programs (I would call them “harvesters”) that can carry out complex actions to clean your PC of junk, remove erroneous registry entries, configure your Windows OS and perform defragmentation (for maximum speed!). You can talk about one of them .

1) Cleaning the disk from garbage

Windows cleaning programs -

For example, I can recommend CCleaner. Firstly, it is free, and secondly, it is very easy to use and there is nothing superfluous in it. All that is required from the user is to click the analyze button, and then clean the disk from the found garbage (screen below).

2) Removing unnecessary files and programs

By the way, it is advisable to remove programs through special utilities: (by the way, you can use the same CCleaner utility - it also has a tab for removing programs).

At worst, you can use the standard utility built into Windows (to open it, use the control panel, see the screenshot below).

3) Start defragmentation

Let's consider running the disk defragmenter built into Windows (since by default it eats me of everyone who has Windows :)).

First you need to open control Panel, then section system and safety. Next, next to the tab “ Administration" there will be a link " Defragmentation and optimization of your disks"- go over it (see screenshot below).

An alternative way to run defragmentation in Windows

1. Open “My computer” (or “This computer”).

3. Then in the disk properties, open the “Service” section.

4. In the service section, click the button “ Optimize disk"(everything is illustrated in the screenshot below).

Important! The defragmentation process can take quite a long time (depending on the size of your disk and the degree of fragmentation). At this time, it is better not to touch the computer, not to run resource-intensive tasks: games, video encoding, etc.

The best programs and utilities for disk defragmentation

Note! This subsection of the article will not reveal to you all the capabilities of the programs presented here. Here I will focus on the most interesting and convenient utilities (in my opinion) and describe their main differences, why I chose them and why I recommend trying them...

1) Defraggler

A simple, free, fast and convenient disk defragmenter. The program supports all new versions of Windows (32/64 bit), can work both with entire disk partitions and with individual files, supports all popular file systems (including NTFS and FAT 32).

By the way, regarding defragmentation of individual files - this is, in general, a unique thing! Not many programs can allow you to defragment something specific...

2) Ashampoo Magical Defrag

To be honest, I like products from Ashampoo- and this utility is no exception. Its main difference from similar ones of its kind is that it can defragment a disk in the background (when the computer is not busy with resource-intensive tasks, which means that the program is running and will not hamper or interfere with the user in any way).

What is called - once installed and forgotten this problem! In general, I recommend paying attention to it to everyone who is tired of remembering defragmentation and doing it manually...

3) Auslogics Disk Defrag

This program can move system files (which need to be the fastest) to the fastest part of the disk, thereby speeding up your Windows operating system somewhat. In addition, this program is free (for normal home use) and can be configured to start automatically when the PC is idle (i.e., similar to the previous utility).

I also want to note that the program allows you to defragment not only a specific disk, but also individual files and folders on it.

The program is supported by all new Windows OS: 7, 8, 10 (32/64 bits).

4) MyDefrag

Developer's website: http://www.mydefrag.com/

MyDefrag is a small but convenient utility for defragmenting disks, floppy disks, USB external hard drives, memory cards, and other media. Perhaps that’s the only reason I added this program to the list.

The program also has a scheduler for detailed launch settings. There are also versions that do not require installation (it is convenient to carry with you on a flash drive).

5) Smart Defrag

This is one of the fastest disk defragmenters! Moreover, this does not affect the quality of defragmentation. Apparently, the program developers managed to find some unique algorithms. In addition, the utility is completely free for home use.

It is also worth noting that the program treats data very carefully, even if during defragmentation some system error occurs, a power outage or something else... - then nothing should happen to your files, they will still be read and opened. The only thing is that you will have to start the defragmentation process again.

The utility also provides two operating modes: automatic (very convenient - set it up once and forget it) and manual.

It is also worth noting that the program is optimized to work on Windows 7, 8, 10. I recommend it for use!