ext2fs compared to NTFS/fat32..defragmentation?

imhotepmp

Golden Member
Mar 23, 2000
1,418
0
76
I was wondering why the ext2fs does not need defragmentation like fat32 and NTFS? Also, is there a difference when you delete something on a ext2 than on a NTFS/fat32. I ask this because from my understanding of defragmentation, it is caused when a file is written to the disk sequentially and another file is in the way. So the file is written to the next available sector, thereby causing the file to be fragmented. Now why wouldnt this be the case for the Linux fs as well?

Just curious. Thx

Imhotep MP
 

andri

Senior member
Aug 12, 2000
339
0
0
Yes, ext2 occasionally does need defragmentation too, but it doesn't need it so often as Win* as the inode allocation differs from the cluster system used in FAT/NTFS.


 

DaHitman

Golden Member
Apr 6, 2001
1,158
0
0
After I was asked the same question by someone else, I poked around a bit and did some info.

The documentation pretty much indicated that with the ext2 file system it is rarely necessary to use the utility (he wrote it prior to the general use of ext2fs). He gave a bit of an explanation and I found some additional information the other day following links that (I believe) originated in the Linux Gazette.

Basically, Windows/FAT does not keep a map of the disk usage in memory, and each new write simply starts from the next available free cluster (block), writes till it gets to the end of the free space and then jumps to the next free space and continues. After it reaches the end of the disk or at the next reboot, the "next free cluster" becomes the "first free cluster", which is probably where something was deleted, and may or may be an appropriate amount of free space for the next write. There is no planning ahead for either using appropriate sized available spaces or for clustering related files together. The result is that the use of space on the disk gets fragmented and disorganized rather quickly, and the defrag utilities are a necessary remedy.

In fairness to FAT, it was originally written for a computer with precious little memory, and this method of allocating write locations didn't strain the resources much.

The mounting requirement under unices allows the kernel to keep a map of the disk usage and allocate disk space more intelligently. The Ext2 filesystem allocates writes in "groups" spread across the area of the disk, and allocates files in the same group as the directory to which they belong. This way the disk optimization is done as the files are written to disk, and a separate utility is not needed to accomplish it.

 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |