EXT4 features and file system simplicity

Source: Internet
Author: User

Linux Kernel has officially supported the new filesystem EXT4 since 2.6.28 began.

EXT4 is an improved version of EXT3, which changes some of the important data structures in Ext3, not just like EXT3 for EXT2, but adds a log function. The EXT4 offers better performance and reliability, as well as a richer range of features:

/. Compatible with EXT3. by running several commands, you can migrate from Ext3 online to EXT4. Instead of having to format the disk again or install the system again.

The original EXT3 data structure is still retained. EXT4 action on new data, of course. As a result, the entire file system has gained the larger capacity supported by the EXT4.

/. Larger file system and larger file.



/. An unlimited number of subfolders.

EXT3 now supports only 32,000 subfolders, while EXT4 supports an unlimited number of subfolders.



/. Extents.

EXT3 uses indirect block mapping. When working with large files, the efficiency is extremely low. For example, a 100MB size file. In Ext3, a mapping table of 25,600 data blocks (4KB each) is created. EXT4 introduced the popular extents concept in modern file systems, each extent a contiguous set of data blocks. The above-mentioned file represents "This file data is stored in the next 25,600 blocks", which improves a lot of efficiency.



/. Multi-block allocation.

  when When the data is written to the Ext3 file system. The EXT3 data block allocator can only allocate a 4KB block at a time. Writing a 100MB file calls for 25,600 data block allocators, while Ext4 's multi-block allocator "Multiblock allocator" (MBALLOC) supports one call to allocate multiple blocks of data.

/. Deferred allocation.

  The EXT3 data block allocation policy is allocated as soon as possible. The strategy of EXT4 and other modern file operating systems is to delay allocation as much as possible until the file is written in the cache and then the data block is allocated and written to disk, which optimizes the data block allocation of the entire file and can significantly improve performance in combination with the first two features.

/. High Speed fsck.

The first step in running fsck is very slow because it checks the entire inode. Now EXT4 adds a list of unused inode to each of the group's inode tables. In the future, the fsck EXT4 file system will be able to skip them and just check for the inode that is in use.

/. Log check. logs are the most frequently used part and are extremely prone to disk hardware failure. Recovering data from corrupted logs can result in a lot of other data corruption.

The EXT4 log check feature makes it very easy to infer whether the log data is corrupted, and it merges the EXT3 two-stage logging mechanism into one phase. Improved performance at the same time that security was added.

/. No log (no journaling) mode. The log has some overhead. Ext4 agrees to close the log so that some users with special needs can take advantage of this to improve performance.

/. Online defragmentation. Although delay allocation, multi-block allocation, and extents can effectively reduce file system fragmentation, fragmentation is unavoidable. EXT4 supports online defragmentation and will provide e4defrag tools to defragment individual files or the entire file system.

/. Inode-related features.

The EXT4 supports larger inode sizes, compared to the default inode size of Ext3 by 128 bytes. EXT4 to accommodate many other extended attributes (such as nanosecond timestamp or inode version number) in the inode. The default inode size is 256 bytes.

The

Ext4 also supports high-speed extended properties (fast extended attributes) and Inode retention (inodes reservation).

/. Persistent pre-allocation (persistent preallocation).

To ensure that the download file has enough space to store, often pre-created a file with the same size as the downloaded files, so that the next few hours or days of insufficient disk space causes the download to fail. The EXT4 implements a persistent pre-allocation at the filesystem level and provides the corresponding API (Posix_fallocate () in libc). More efficient than the application software itself.

/. Barrier is enabled by default.

The disk is equipped with an internal cache to adjust the write order of the bulk data again, optimizing write performance, so the file system must write the log data to write the disk's ability after the commit record, if the commit record is written. The log may be corrupted and it will affect the integrity of the data. EXT4 is enabled by default, barrier is now disabled by the Mount-o barrier=0 command only after barrier all data is written to the disk, after the pen barrier the data.


EXT4 features and file system simple features

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.