ext3 and ext4 file system What is the difference

  1. Compatible with Ext3. Perform several commands, you can migrate online from Ext3 to Ext4, without having to reformat the disk or reinstall the system. Ext3 still retain the original data structure, Ext4 act on new data, of course, the entire file system will thus gaining a greater capacity Ext4 support.
  2. Larger file systems and larger files. Ext3 than the current maximum supported file systems and 16TB maximum 2TB file, Ext4 respectively support 1EB (1,048,576TB, 1EB = 1024PB, 1PB = 1024TB) file system, as well as 16TB of files.
  3. Unlimited number of subdirectories. Ext3 currently only supports 32,000 subdirectories, and Ext4 support an unlimited number of subdirectories.
  4. Extents. Ext3 indirect block mapping, when a large file operation, extremely inefficient. For example, a 100MB size of the file, in Ext3 25,600 to establish the data blocks (data block size for each 4KB) mapping table. Ext4 introduces the popular concept extents modern file systems, each extent is a contiguous set of data blocks, said document is represented as a "data file stored in the next data block 25,600" to improve the efficiency of many .
  5. Multi-block allocation. When writing data to the Ext3 filesystem, Ext3 data block allocator can only allocate a block of 4KB, write a 100MB file will call 25,600 times the data block allocator, and Ext4 multi-block allocator "multiblock allocator "(mballoc) supports a plurality of data blocks allocated one call.
  6. Delayed allocation. Ext3 data block allocation policy is assigned as soon as possible, and Ext4 file Caozuojitong and other modern distribution strategy is to delay as much as possible, until it began to file written data block is allocated and written to the disk cache, so that we can optimize the entire document data block allocation, together with the first two characteristics can significantly improve performance.
  7. Fast fsck. Previously executed fsck first step will be very slow, because it checks all of the inode, inode table for now Ext4 each group has been added to a list of unused inode in the future fsck Ext4 file system can skip them but only to check in with those of the inode.
  8. Log check. Log is the most common part, also easily lead to disk hardware failure, and recover data from damaged log data will lead to more damage. Ext4 log check function can easily determine whether the log data corruption, and it will Ext3 two-stage mechanism combined into a log phase, increase safety and improve performance.
  9. "No Log" (No Journaling) mode. Log there is always some overhead, Ext4 allowed to close the log, so that certain users have special needs can take to improve performance.
  10. Online defragmentation. Although the delayed allocation, multi-block allocation and extents can effectively reduce file system fragmentation, but fragmentation inevitably occur. Ext4 supports online defragmentation, and will provide e4defrag tool to defragment individual files or entire file system.
  11. inode related features. Ext4 support larger inode, the inode size default Ext3 than 128 bytes, Ext4 accommodated in the inode for more extended attributes (e.g., inode or version stamp nanoseconds), the default inode size is 256 bytes. Ext4 also supports extended attributes fast (fast extended attributes) and inode reserved (inodes reservation).
  12. Persistent pre-allocation (Persistent preallocation). P2P software to download a file in order to ensure there is enough space to store, often pre-created with the same size of the downloaded file empty file, so within the next few hours or a few days out of disk space download fails. Ext4 file system level to achieve a lasting pre-allocation and provide the appropriate API (posix_fallocate libc in ()), application software more efficient than their own.
  13. Enabled by default barrier. Equipped with an internal cache on disk, in order to re-adjust the order of bulk data write operation, the write performance optimization, the file system must be written in the log data in order to write commit record after the disk, if the commit record is written earlier, but it is possible to log damage, it will affect data integrity. Ext4 enabled by default barrier, only when the data is written before the barrier entire disk to write data after the barrier. (By "mount -o barrier = 0" command to disable this feature.)
Published 39 original articles · won praise 2 · Views 2439

Guess you like

Origin blog.csdn.net/qq_38145502/article/details/104036265