Can anyone explain why is ext4, ext3 or ext2 disk formats that have been used in Ubuntu as default and not others.
Are there any advantages or disadvantages over other? If so, what?
Can anyone explain why is ext4, ext3 or ext2 disk formats that have been used in Ubuntu as default and not others.
Are there any advantages or disadvantages over other? If so, what?
It is now EXT4.
EXT4 is a sucsessor to EXT3 and 2.
With the first Linux versions, EXT was used:
The extended file system, or ext, was implemented in April 1992 as the first file system created specifically for the Linux kernel.
Inspired by the Unix File System (UFS) it was:
designed by Rémy Card to overcome certain limitations of the MINIX file system.
As both EXT and Linux developed and became more advanced, Linux was designed around EXT, and it became the best filesystem for it to run on, and so EXT developed around Linux.
Each new version of EXT4 became better for linux, with support for things that linux needed.
So why not NTFS?
NTFS doesn't support Linux file permissions so you can't install a Linux system on it.
However,
Linux kernel versions 2.2.0 and later include the ability to read NTFS partitions
Advantages of EXT:
Large file system: Can support volumes with sizes up to 1 EiB and files up to 16 TiB.
Extents: Extents improve large file performance and reduce fragmentation.
Backward compatible with ext3 and ext2
Persistent pre-allocation
Delayed allocation: It delays block allocation until it writes data to disk, improving performance and reducing fragmentation.
Increasing the 32,000 subdirectory limit to be unlimited.
Journal checksumming: Using checksums in the journal to improves reliability, since the journal is one of the most used files of the disk.
Faster file system checking
Improved timestamps: It provides timestamps measured in nanoseconds, needed for critical data on some servers. Also, 2 bits of the timestamp field are added to the significant bits of the seconds field to defer the year
2038
problem for 204 years.
So essentially, it is used because it is better!
Sources:
I think the most important reason that ext4 is used as default is that it provides the best mix of stability, speed, and reliability for a the greatest range of workloads. Benchmarks routinely show it near the top in performance in all workloads. Other filesystems may beat it on a single benchmark, but often perform much worse on others. Btrfs has it's strengths but has poor db performance including sqlite (which a lot of desktop applications use). Reiserfs has better small file performance but was unstable.
Really the only other major filesystem that comes close is xfs. Which also has a long development history like ext4. And that has (or had) issues with resizing (shrinking).
People don't want to have to think about their filesystem, and ext4 "just works" in all cases.