What is disk defragmentation?

People of the older and middle generations who have now caught rare drives (for floppy disks — floppy disks) and the first hard drives know very well what disk defragmentation is and why this operation is necessary. If you did not control the performance, then you could very quickly get a faulty system. Take at least hard drives that had to be reformatted periodically, otherwise due to thermal expansion and the displacement of the read heads relative to sectors, you could get a read error message. In addition, defragmenting the hard drive was just as necessary as controlling free space.

A lot of time has passed since then, and most of the “childhood diseases” have been eliminated. In addition, progress, taking a course towards the automation of components under the motto “Minimum User Intervention”, hid from computer owners ways to increase speed without having to buy new products. For example, many have already guessed that the hard drive is currently the narrow neck of the entire computer. No wonder the interest in solid state memory drives is so high. However, few people know that there is a way to increase the performance of the used hard drive. For this, disk defragmentation also serves. Actually, for this purpose such an opportunity was developed. To understand the mechanism, you need to remember the device of the hard drive itself.

Inside the casing, on a common spindle rotated by an electric motor with a constant angular velocity, there are several disks with a magnetizable surface. During operation, the block of read (writing) heads flies on the thinnest air cushion above (under) the disks. When the controller commands, the heads are positioned to the required radius, then, in accordance with the file table, a bit of information is written / read to the desired section of the disk / side. How does disk defragmentation relate to all of the above? Directly! From the physical device of the hard drive it follows that with a constant spindle speed, the read speed on the outer radii of the disks is much higher than on smaller internal ones.

Now consider the software part. During the initial formatting of the hard drive, some users pay attention to the “cluster size” item. Its presence suggests that the data on the hard drive is recorded not in a continuous stream, but in blocks. A special manager program, in accordance with the file allocation table, writes new information to free areas. It would seem that disk defragmentation is not needed! This is partly true, but only on condition that data already recorded on the hard drive will never be deleted. Then the new blocks will simply be added sequentially to the existing ones - the perfect order! But since you have to erase something from the disk and add something to it, a situation often arises when writing blocks of a single file (for example, a movie) is performed not sequentially, but in the freed areas. As a result, the file data is spread out over the entire disk (fragmented). The user may not even know about it, but the speed of working with such a file is significantly reduced. Sometimes the disk map is all in the “holes”, and the dispatcher has to record on the principle of “a little bit there - a little bit here”. To solve this problem, you can use the standard utility: My computer - Disk (Properties) - Service - Defragmentation. As an option, work with third-party programs, as their capabilities are richer.

By the way, what is disk defragmentation , Windows 7 "knows" very well, therefore, by default it runs on schedule. Such programs not only optimally place files, removing "holes", but also move the most requested data to the external radii of the disks.

Source: https://habr.com/ru/post/C46379/


All Articles