When will the system produce disk fragmentation?

Source: Internet
Author: User

Even today, defragmenting the disk is still a lot of people adhere to the weekly operation, although there are many references in the NTFS disk format, there is no need for disk collation. But this is not a complete answer, in fact, in some cases, even if the hard disk partition is an NTFS disk format, still can cause disk fragmentation, then in the end is what kind of situation will produce disk fragmentation? I decided to conduct a test to prove my conjecture.

Experimental environment:

Windows 7 SP1 X64

New NTFS format partition, size 1G

Copy 300 1MB files, a total of 300MB

Randomly delete the middle 100 files, free up 100MB space, these spaces are discontinuous. Split into 100 small spaces.

Then plug in a large 343MB file. The possible conditions are as follows:

1, the file is fragmented into more than 100 fragments, into the disk began in more than 100 space.

2, this file will give priority to the choice of continuous space storage, it is not enough contiguous space will be opened into a variety of small space.

  Experimental process

First introduced the test software, this software is called "PerfectDisk", is "Disk Keeper" competition, the display icon is very detailed, used to do disk analysis is very useful. If a file breaks, it appears in darker colors (such as dark green), and if it is contiguous, it appears as a light color (such as light green).

The first step: Create a new 1GB partition. You can see from the diagram of the software that you have written something after the format, which is the MFT Index table and some metadata. This is the feature of NTFS.


▲1GB Disk analysis results for new partitions

Step two: Write 300 1MB files, a total of 300MB. You can see that there are basically no fragments, there are individual fragments, estimated to be due to only one hard drive, the head in the read and write move back to C disk.


▲ Disk Analysis results after writing 300 1MB files

Step three: You can find that one file is broken into 2 pieces, and the other files are continuous.


▲ found a file that was broken into 2 pieces.

Step Fourth: Randomly delete 100 files. After the completion of the scan, you can see a lot of "holes."


▲ Disk analysis results after removing 100 files

Fifth Step: Finally duplicate a 343MB large file to go in. You can see that because the remaining disk space is large enough, the 343MB files are placed in order in the remaining space, and will not occupy the front of the "hole" space.


▲ Disk analysis Results of 343MB large files when the remaining space is large enough

Sixth step: Then copy a 343M large file to go in. Because there is not enough space at this time, the system can only have the file with the end of priority disk. But the space is not enough, can only use the original deletion of the file blank, the file broke into pieces.


▲ Disk analysis results for 343MB large files when disk space is not large enough

Sure enough, as I imagined, the disk has a large segment of continuous space, the system will not be a file break into a trivial file storage, but will try to find continuous space, when the continuous space is insufficient, just have to put a file broke into a variety of cracks inside.

  Conclusion

So when your C disk is big enough and there's plenty of space left, it won't produce a lot of system fragmentation. And those "C-disk 15G is enough, 20G is enough" people, because the C disk free space is always very small, in a large number of system files read and write process will produce a lot of debris, because a lot of debris seriously affected the speed of the system, so "the system will be used more slowly. Their systems are always used for a long time, and they will be reloading every once in a while. So to the system to run fast, as far as possible to the system partition more space.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.