with the EXT3 File System Compatibility: The original EXT3 data structure is still retained,EXT4 action on the new data, the entire system thus obtained EXT4 supported by the larger capacity
Larger file systems and larger files: EXT3 currently supports the largest 16TB file system and maximum 2TB files,Ext4 support 1EB file system,16TB files ( 1eb=1024pb,1pb=1024tb).
an unlimited number of subdirectories. Ext3 supports 32000 subdirectories,Ext4 does not restrict
Extents:Ext3 uses indirect block mapping, which is extremely inefficient when working with large files. For example, a 100M file. In Ext3, a mapping table for 25600 data blocks (each block size of 4KB) is established . EXT4 introduces the popular extents concept in modern file systems , each extent as a contiguous set of data blocks, which is represented as "the file data is stored in the next 25600 data Block ", which has improved a lot of efficiency
Multi-block allocation:whenWrite data toExt3file System,Ext3Data Block allocator can only allocate one at a time4KBThe block, write a100MBThe file will be called25,600secondary data block allocator, andEXT4the multi-block dispenser"Multiblock Allocator"(Mballoc)supports one call to allocate multiple blocks of data.
Deferred allocation: Ext3 the data block allocation policy is allocated as soon as possible, and EXT4 and other modern file operating systems, the strategy is to delay allocation as much as possible until the file Cache the data block is then allocated and written to disk, which optimizes the data block allocation for the entire file and can significantly improve performance when paired with the first two features.
Fastfsck: previously executedfsckThe first step will be slow because it checks all theInode, and nowEXT4to each group.Inodetable adds a copy of the unusedInodethe list of futurefsck EXT4The file system can skip them and just check the ones that are in use.Inodeup.
log Check: Log is the most common part, it is also very easy to cause disk hardware failure, and recovering data from the corrupted log can lead to more data corruption. Ext4 's log check function makes it easy to tell if the log data is corrupted, and it merges the EXT3 two-stage logging mechanism into one phase, increasing security while improving performance.
EXT4 file system can shut down logs and save overhead
EXT4 supports online defragmentation and provides E4defrag tools to defragment individual files or the entire file system
The Inode node size of the EXT4 is defaulted to bytes, while Ext3 is only bytes
-
persistent pre-allocation: peer software in order to ensure that the download file has enough space to store, It is often possible to pre-create an empty file that is the same size as the downloaded file, lest the download fail due to insufficient disk space in the next few hours or days. Ext4 Api ( libc posix_fallocate ()
Barrier is enabled by default . The disk is equipped with an internal cache to readjust the write order of the bulk data, optimizing write performance, so the file system must write the commit record after the log data is written to disk , if commit Records are written earlier, and logs are potentially corrupted, which can affect data integrity. EXT4 By default , barrier is enabled, and data after barrier can be written only if the data before barrier is written to disk . (This attribute can be disabled by the "mount-o barrier=0" command.) )
This article is from "Tiger Brother's Blog" blog, please be sure to keep this source http://7613577.blog.51cto.com/7603577/1584875