Explain in detail the issues related to disk fragmentation Do you need to defragment frequently?


As a means of maintaining the system, many users often do to clean up the disk fragments when they are idle, but everyone is doing this and they don’t know why they need to clean up the disk fragments. I don't know if it is really good for the system to clean up often.

First, introduce the concept of disk fragmentation.

A lot of people will confuse file fragmentation with the concept of clusters. In fact, for the windows system, each partition on the hard disk is composed of the smallest storage unit —— cluster. Just like, a wall is made up of pieces of turning head. The size of the cluster can be defined by the user when the partition is formatted, usually a few KB size, such as 8KB. Suppose I have a file with a size of 80MB and 1KB (incorrect, 1MB = 1024KB, but the hard disk capacity is calculated by integer, so 1M = 1000KB), then the green league converts 80,001KB, of which 80,000KB just occupies 10000. Clusters, the remaining 1KB, must not occupy 1 cluster, but this last cluster has 7KB of space is useless. And this incompletely used cluster, other files are not allowed to continue to use. This caused a little waste of space.

A lot of people understand this wasted 7KB space as a file fragment, which is actually wrong. After reading the following introduction to the debris, I believe you will understand.

Of course, you may think, if you set the cluster to 1KB, even 1B is not very good? But you need to know that the hard disk is read and written according to the cluster, the smaller the cluster for the same file. The more the number of clusters the file occupies. In this way, the number of clusters to be accessed by reading this file is increased, and data reading and writing will be slower. Therefore, the space utilization of the hard disk and the time efficiency of file reading and writing are a contradiction.

While disk fragmentation actually refers to a file that occupies those clusters that are not contiguous, it is equivalent to the file being split and stored on separate clusters. The file is divided into several parts and is a few pieces. So fragmentation actually refers to file fragmentation, which can be understood as the meaning of broken files into pieces. And sometimes the order between the file fragments is still confusing. For example, sometimes the clusters in the "shards in the file" will be placed on the hard disk instead of the front of the file in the file & rdquo; in front of the cluster segment. In this way, a file will be stored on the hard disk in a more confusing order.

Obviously, computers must read sequential, orderly data faster than discrete, out-of-order data. So defragmentation can greatly improve system performance.

For example, at first, a partition of the hard disk is blank, and three files A, B, and C are written. Obviously at this time, the three files are sequentially occupying three cluster segments. Therefore, the three files will not be fragmented.

Now suppose you delete the B file. At this time, there is a free cluster segment between A and C. At this point, there is still no file fragmentation, because the cluster segments occupied by each file are continuous, and no files are split. And if you need to write a file D now, and D is larger than the file B just deleted. Then the free cluster segment between A and C is not enough to put D, and then assume that the free cluster segment behind C is not enough to put down D. At this time, D is necessary to divide into two pieces, one piece is placed between A and C. The other piece is placed after C. In this way, file fragmentation is produced. The D file has two file fragments.

The green defragmentation of the Green Alliance is to move the C file forward and move it to the cluster segment immediately following the A file. Thus there is no free cluster between A and C, and the rest of C will be a complete free cluster segment, enough to put down file D. Thus D also occupies a continuous cluster segment. The debris is also eliminated.

So change your mind, you can also achieve the disk fragmentation without professional disk defragmentation software.

Copyright © Windows knowledge All Rights Reserved