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?
What is disk defragmentation
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.
Using SSD drives
One of the most effective means of speeding up your computer is to replace the classic HDD with a high-speed SSD drive. At the moment, the cost of solid-state drives has dropped significantly and a 256 GB SSD is available to absolutely everyone. If your budget is very limited, we recommend considering 128 GB drives. This size is quite sufficient for normal operation of the operating system. Note that even the simplest SSD will significantly speed up the OS boot time, as well as the overall performance of the computer.
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.
What is it and why is it needed
The most basic question concerns why disk defragmentation is needed on a computer. And this is a really relevant topic, since most users frankly do not understand what this defragmentation means for the disk and for what purpose it is recommended to periodically carry it out.
First, you should find out what disk defragmentation is and what space it takes up on your computer. If this is a new hard drive, then all files will initially be written to it in order. But at some point this or that information is deleted. Programs, games, photos and videos are erased. This creates clean cells scattered throughout the disk space. New data is already being written to them.
The peculiarity of Windows OS is that it is configured to write new data to free cells that are located closer to the beginning.
If the file being recorded is large, the system automatically divides it into several parts, and due to this, the previously freed cells are gradually filled. This process is commonly called fragmentation. But there is no talk of any damage to the file. For the user it is holistic.
And then a logical question arises about what the disk defragmentation provides and why it is needed at all. It is already largely clear that disk defragmentation is the reverse process of fragmentation.
To play a fragmented file, the operating system has to search for its individual components throughout the entire hard drive. As a result, this naturally slows down all work processes and negatively affects productivity indicators.
This largely makes it clear even to a novice user what disk defragmentation is and why it is performed on a computer. This procedure is needed to restore the speed of the OS and PC performance.
Schematic location of files before and after defragmentation
Defragmentation is the process of putting broken files back together again. This allows you to allocate your own separate area for each file. That is, they become closer to each other, and the system does not have to search for individual fragments throughout the disk space.
ATTENTION. In the case of Windows 10, the concept of defragmentation is not used. It was replaced with optimization.
But this did not change the ongoing process. The essence remains the same.
Separately, we will consider the question of whether the same defragmentation (optimization) is needed for SSD drives, that is, solid-state drives.
In many ways, it is fair to say that it is mainly hard drives, that is, HDDs, that are optimized. And SSDs have their own distinctive features.
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.
LiveInternetLiveInternet
Disk defragmentation is a necessary process of restoring the data structure on a hard drive for faster access to it, as well as to extend the life of the disk itself. Defragmentation significantly speeds up reading data from the device. Thanks to the regular implementation of this procedure, the information on the disk acquires a more linear logical structure, the magnetic heads make fewer movements when reading, which has a positive effect on the life of the disk itself. It is recommended to perform defragmentation regularly, once every 2-3 months. This can be done using standard operating system tools or third-party programs.
Why is defragmentation needed?
Let's start with the fact that a hard drive (simplified) is an ordered system of clusters (cells). Almost like a hotel with rooms.
Each hosted file is a family or team (large or small), which can occupy one cluster (number), or maybe several, depending on the size. And these newly occupied clusters can be placed on the disk not in order, but in the same way as free clusters are located. When a file is deleted, the clusters are freed and immediately given to the newly written file. And, as a result, after some time the file written to the disk will be so distributed among free clusters on the disk that parts (fragments) of the file are physically written far from each other.
This is how you get fragmented files.
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.
The process of breaking a file into small pieces when writing to disk is called fragmentation. If there are many fragmented files on the disk, the read speed of the media decreases, since searching for clusters in which files are stored on hard drives takes time. On flash memory, for example, search time does not depend on the location of sectors, and is practically zero, so defragmentation is not required for them.
What happens during defragmentation?
During the defragmentation process, the fragments of files scattered across the hard drive are organized: clusters are organized in such a way that individual pieces of files are located sequentially, one after another, if possible. In addition, all data is moved to the beginning of the hard drive, and free space is located at the end.
Defragmentation is the process of updating and optimizing the logical structure of a disk partition in order to ensure that files are stored in a continuous sequence of clusters. After defragmentation, reading and writing files speeds up, and therefore the work of programs. Another definition of defragmentation is: redistributing files on a disk so that they are located in contiguous areas.
Defragmentation is most often used for file systems such as File Allocation Table for MS-DOS and Microsoft Windows, since programs that work with them usually do not provide any means to prevent fragmentation, and it appears even on a nearly empty disk and a 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: in the process of reading a fragmented file, the read head The disk jerks from one fragment to another every time. and, as a result, the load on the hard drive increases.
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)
Disk defragmentation in Windows XP
The Windows XP operating system includes a special Disk Defragmenter utility. It is called through the Start menu / All Programs (1) / Accessories / System Tools (2) / Disk Defragmenter (3) .
The built-in Windows defragmentation utility can also be launched in this way: “Start” -> “Run” -> “dfrg.msc” -> “OK” (in Windows Vista - dfrgui).
But a more convenient way is through the My Computer . Press Win+E (the My Computer window will open) and select the volume (disk) that you would like to defragment. Right-click on it. From the context menu, select Properties . In the Local Disk Properties dialog, open the Tools tab and click the Defrag Now button.
window will appear in front of you .
A list of disks is displayed at the top of the window; in the center is the state of the selected disk before and after defragmentation (there are two bars showing the degree of defragmentation of the selected disk). Before defragmentation, the program analyzes the disk, and its results are displayed in the top bar. The bottom bar shows the disk after defragmentation. Different information is displayed in different colors. An explanation of the legend, also often called a legend, appears at the bottom of the work window.
This utility works in two stages. The analysis is performed first, and then the defragmentation is performed.
To find out whether defragmentation is needed or not, select the partition ( Volume ) that we want to defragment and press the Analyze (1) . But, most likely, after analysis you will see a message stating that defragmentation is needed. Therefore, you can safely click on the Defragmentation button (2) to start it, without preliminary analysis (although the analysis will still be at the beginning of the defragmentation process: 0).
After some time, the result of checking the status of the disk file system will be displayed. The disk status will be displayed in color. As you can see, my computer does not need defragmentation, because I defragment the hard drive from time to time.
All I have to do is check the report (1) and, if necessary, still defragment the disk (2). But, as a rule, in this case I close the program (3)
If defragmentation is not needed, move on to the next disk.
If you have been working on your computer for a short time without doing anything to “maintain” it, then, as already mentioned, you will need defragmentation, which is what the corresponding message will appear:
To start defragmentation, just click the Defragmentation in the displayed message, or in the window itself.
Please note that the defragmentation process itself can take quite a long time (depending on the size of the disk and the degree of its fragmentation) - sometimes several hours. The progress of the defragmentation process can be seen at the bottom of the window.
In order to pause defragmentation for a while, click on the Pause , and in order to cancel it, click on the Stop .
Note:
- It is advisable to disable the antivirus while the utility is running.
- Do not work at the computer while the disk is being serviced.
- For successful and comfortable defragmentation, it is necessary that the disk has at least 20% free.
- Analyze disks for fragmentation after adding a large number of files, as volumes can become highly fragmented after adding them or folders.
- Defragment disks after installing software, after performing an update, or after performing a clean installation of Windows, as volumes often become fragmented after software installation.
When defragmentation of the disk you selected is completed, you can see for yourself what state the hard drive was in before defragmentation, and what kind of location your files and folders now have (in the line Disk Usage Estimate after defragmentation):
At the end of the program, all files on the hard drive will be defragmented, and free space will be concentrated at the end of the disk. You will see a message box informing you that the defragmentation process has completed.
You can close the program by clicking the Close
or view a detailed report by clicking the Print report
You will receive a report on the “work done” and the amount of free disk space, how many files and folders are on the computer, what is the size of the cluster, etc.
If you wish, you can try to defragment the desired file again by selecting it and clicking on the Defragmentation button directly from the dialog with the analysis results. You can also print this report or save it to your computer. clicking accordingly. Print or Save As
Carry out the same procedure with the remaining partitions: select the volume (disk) and again click first Analysis, and then (if required) Defragmentation, and so on with each volume.
Watch a short video tutorial on how to defragment a disk using standard Windows tools
Disk defragmentation in Windows Vista
To do this, in Windows Vista, open the Start and type the word “defragmentation” in the search bar. The operating system will give you the necessary utility.
Click on the name of the utility, and the Disk Defragmenter program will appear in front of you. When launched, the program will analyze the disks for fragmented files. This will take a few minutes. At the end of the analysis, the defragmenter will give its verdict: the hard drive needs defragmentation or not. To start the disk defragmentation process, click the “Run defragmentation” button.
Defragmentation takes from several minutes to several hours. This time depends on the size of the hard drive and the degree of file fragmentation. So, if you have a 500 GB disk and you did the previous defragmentation a year ago, then defragmentation will take 3 hours or more. Windows Vista can also be configured to run disk defragmentation on a schedule in the background. For example, let's tell the operating system to defragment once a month. “Run on schedule” checkbox ...
and click the “Change schedule” . In the window that opens, select the required parameters and click OK .
Here you can select the disks that will be defragmented. Just click the “Select volumes” and check the boxes for the required disks. This list will list not only the physical drives, but also the logical drives of your computer.
These are the simple steps.
Disk defragmentation in Windows 7
In Windows 7, the defragmentation window looks slightly different, but the essence is the same.
A distinctive feature of the defragmenter built into Windows 7 is:
- the ability to defragment the disk according to a schedule, which can be configured by clicking the Set up schedule
- the ability to analyze and defragment several disks at the same time, which is not available in Windows XP. Select the desired disk and click Analyze disk or Defragment
It seems that we have figured out how to defragment a hard drive using standard Windows methods for XP, Vista and 7. Now you have order on your hard drive both visually and physically, besides, this will give a good percentage of performance to your computer and extend the life of the hard drive. Although you don’t have to use this program at all (it’s only needed if the speed of your PC is important to you), I wouldn’t recommend neglecting it. It's more useful than it might seem :0).
Naturally, this is far from the best tool for cleaning and defragmentation, but, as they say, it’s better than nothing. For a user who is not experienced in various special programs (for example, like me), this option is suitable for the first time. Again, you will be more aware of your computer's capabilities.
Of course, there are a lot of more effective programs for defragmenting disks, which, however, will have to be specially installed.
For those who want to use a separate program for these purposes, I offer a proven, free, reliable and fast utility - Auslogics Disk Defrag. Auslogics Disk Defrag uses a number of algorithms that allow you to defragment your disk much faster and safer than a standard utility, and thanks to a convenient report you will know exactly what was done.
In conclusion, I would like to warn dummies like me against some common misconceptions on the Internet:
- defragmentation does not destroy viruses;
- Defragmentation does not need to be done every week, this will not make the computer faster;
- Defragmentation and formatting of a hard drive are completely different things, the latter is completely erasing all information from the disk;
- defragmentation and defloration are also completely different things; there is no such thing as “defloration of a hard drive” (we advise those who are especially curious to look in a medical dictionary);
- Flash drives, CDs and DVDs do not need to be defragmented;
- a normal “healthy” hard drive will not fail due to defragmentation, nor will the operating system installed on it;
- defragmentation is not checking for errors on the hard drive and fixing them;
- no need to defragment after installing each new program.
Based on materials from www.yachaynik.ru, computia.ru
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.
Compress system data in Windows 10
Windows 10 has implemented many utilities that can optimize disk performance, save the maximum amount of free space on it, and also speed up work.
One of these features is system file compression, a fast and efficient way to save up to 4 GB of excess space. To perform secure compression, open a command prompt as an administrator and enter the command:
COMPACT.EXE /CompactOS:always
If the system no longer needs compression, the function can always be disabled with the command:
COMPACT.EXE /CompactOS:never
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 a 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:
- Go to This PC, right-click on the drive and select Properties.
- Switch to the “Service” tab and click on the “Optimize” button.
- In the window, click on the “Change settings” button.
- Uncheck “Run on a schedule (recommended)” and click “OK.”
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 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.
How to defragment a hard drive?
Windows itself has a built-in defragmenter, which, in general, can also be used. However, I do not recommend doing this for the simple reason that it copes with defragmentation rather poorly, which is why the final performance suffers. Therefore, I recommend using third-party programs, and there are quite a few of them.
Below you will find links to my articles on defragmentation programs, and at the same time you will understand the difference between them.
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 pagefile.sys and hiberfil.sys from processing. 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.
If you have Windows 7, 8 or 8.1
In the latest versions of Microsoft operating systems - Windows 7, Windows 8 and Windows 8.1, hard drive defragmentation starts automatically. In Windows 8 and 8.1 it occurs at random times, while the computer is idle. In Windows 7, if you go into the defragmentation options, you will most likely see that it will run every Wednesday at 1 am.
Thus, in Windows 8 and 8.1, it is unlikely that you will need to manually defragment. This can happen in Windows 7, especially if after working on the computer you immediately turn it off and on every time you need to do something again. In general, turning your PC on and off frequently is a bad practice and is more likely to cause problems than leaving your computer on 24/7. But this is a topic for a separate article.
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.
Read more: Ways to defragment a disk on Windows
To summarize the above, we advise:
- Do not defragment the solid state drive (SSD).
- Disable scheduled defragmentation in Windows.
- Do not abuse this process.
- First, do an analysis and find out whether there is a need to perform defragmentation.
- If possible, use high-quality programs whose efficiency is higher than the built-in Windows utility.
We are glad that we were able to help you solve the problem. In addition to this article, there are 12,719 more instructions on the site. Add the Lumpics.ru website to your bookmarks (CTRL+D) and we will definitely be useful to you. Thank the author and share the article on social networks.
Describe what didn't work for you. Our specialists will try to answer as quickly as possible.
How often should you defragment hard drives?
It all depends on how intensively you use the hard drive: copying, installing, deleting, transferring, etc., etc., information, but personally I recommend defragmenting it at least once a month.
Sometimes this process should be set to use on a schedule, that is, a script (or program) does defragmentation on the fly, say, once a day. This may be necessary on systems where files are frequently processed, for example, file servers of large companies.