As a Windows system user, you will begin to envy Linux, because Linux file system does not need defragmentation. Such awkward behavior, can not help but let the system users' partners are shocked, and after the shock, found that the Linux distribution does not have the function of defragmentation. Why is this?
To understand why the Linux file system does not fragment as much as the Windows file system, you first need to understand how the fragmentation is generated, as well as the file systems of the two operating systems. How does the way of working differ?
What is disk fragmentation?
We all believe that regularly defragmenting the file system will make our computer run faster, but we don't know why? Why is it? Very simple reason.
This is because a hard drive contains many sectors, and each sector can store a small amount of data. For files, especially for larger files, they must be stored in many different sectors. Suppose you have many different files in your file system, each of which is stored in a contiguous group of sectors. Then, you increase the size of one of the files. The file system first attempts to store the newly added portion of the file in a sector immediately adjacent to the original sector group. But if there are not enough consecutive sectors in it, the file must be broken down into smaller pieces, which are visible to you. When your hard disk reads these files, its head must jump between different physical locations to read successive sectors, which slows it down.
Defragmentation is a sophisticated process of reducing fragmentation by moving files bit by bit (bits are the smallest unit of storage on disk) to ensure that each file is continuously stored on the hard disk. .
Of course, this is a bit different for SSDs. SSDs don't need to move files or defragment. Because defragmenting an SSD (Solid State Drive) will reduce its life. Moreover, in the latest version of Windows, you no longer need to worry about defragmentation, because Windows will automatically do it for you.
How Windows File System Works
The FAT file system used by Microsoft —— was last seen as the default system in Windows 98 and ME, although this system is still in USB Using —— in a drive does not work well with files. When you save a file in the FAT file system, it will arrange the file as much as possible on the head of the disk. When you store the next file, it will store the file directly after the first file, and so on. So when the file gets bigger, there will always be fragments, because there is no space next to the file to store the added part.
Microsoft's newer NTFS file system used in Windows XP and 2000 is trying to be smarter. This file system will place more free space around the file called "buffer", but any Windows user will tell you that the NTFS file system will one day be fragmented.
Because of the performance of the file system, they need to defragment to maintain performance. Microsoft can only mitigate this problem by running the defragmenter automatically in the background on the latest version of Windows.
How Linux's file system works
Linux's ext2, ext3, ext4 file system ——ext4 is the file system —— used by Ubuntu and most current distributions A smarter way to place files. The Linux file system spreads the files across the disk, leaving a lot of free space between the files, rather than placing the files one by one like Windows. When a file is edited and becomes larger, there is usually enough free space to save the file. If the fragmentation really occurs, the file system will try to move the file in daily use to reduce fragmentation, so there is no need for a dedicated defragmenter.
Because of this way of working, you may see fragmentation after your file system is full. If 95% (or even 80%) of the file system is occupied, you will start to see some fragments. However, such a file system was originally designed to reduce fragmentation in normal use.
If you really have a bit of trouble with Linux, you might need a bigger hard drive. If you really need to defragment a file system, the simplest and most reliable way is to copy all the files, then empty the original partition and copy the files back. The file system will intelligently place the file as you copy it back.
In fact, you can also use the fsck command to detect the fragmentation of a Linux file system. You only need to view the non-contiguous inodes in the output. After understanding the workflow of Windows and Linux file systems, Linux is so devoid of defragmentation, we now know.
QQ Pinyin input method has been loved by everyone because of its simplicity, but some users suspect
As we all know, there is a BIOS system in the computer we use. Its Chinese meaning is “basic input a
I believe everyone should use U disk very often, it is more common to put things into the USB disk,
Recently, when a user double-clicks and opens after reflecting the insertion of the u disk, the user
How does the computer prohibit storing information?
C disk slimming /expansion method
u disk file can not be copied how to solve?
What are the repair tips for sharing USB flash drives?
Introducing several misunderstandings in the process of optimizing Vista
What is the reason for frequent computer crashes?
Windows system screenshot software recommended: Screenshoter
Modify the background color of the computer folder
Unity users use WinXP again over Win7 system
QQ mailbox can not receive the mail how to solve?
Let your flash memory only read and not write in Vista
Night God Android Simulator how to locate
What should I do if the win7 system popup resource manager has stopped working?
Surface RT lost this way to attack iPad
Linux system management and maintenance -bzip2/bunzip2 command
How to import JPG images into CAD
Strange Windows 7 installation error