Performance measurement of a new file system of the most important parameter is the fundamental performance of it.
This is often the most difficult to achieve targets, because when the file system to become huge and requirements for high reliability will harm performance. However, ext4 not only solved the scalability and reliability, it also offers a variety of methods to improve performance. File-level pre-allocated for certain applications, such as a database or a content stream, requires that the file is stored in the adjacent blocks (the use of the adjacent block reading optimize and maximize the read command-block rate). Although section to adjacent blocks divided into fragments, but another more powerful approach is in accordance with the required size of the pre-allocated larger adjacent blocks (XFS previously is used this way). Ext4 adoption of a new system call for this purpose, the call will follow the specific size pre-allocated and initialization files. Then, you can write the necessary data and to read the data provide good performance. Delay blocks allocated another optimization based on file size is delayed allocation. This kind of delaying the disk performance optimization of the distribution of physical blocks until the block is flush to disk before assignment. This optimization is to delay the distribution of physical blocks until you need to write these on disk is a physical block to be assigned and write to the adjacent blocks. This is similar to persistent pre-allocation, the only difference is the file system will automate this task. But if you know in advance the size of the file, persistent pre-allocation is the better choice. Multiple block distribution this is the last and the adjacent block related optimization for ext4 block allocator. In ext3, block allocator works by assigning one block at a time. When you want to assign more than one block, the non-adjacent blocks may exist adjacent data. Ext4 use block allocator fix this problem, it can be on disk once assigned multiple blocks. Other optimization previously, this optimization in the on-disk data collection related to achieve optimal adjacent to read. Multiple block allocated another aspect is the allocation block when the amount of processing required. Remember, once only ext3 assigned a block. In the simplest case, the allocation of each block is a call. If you assign more than one at a time, to block allocator for the call will be significantly reduced, thus speeding up distribution and reduce throughput. Reliability ext4 file system may be extended bigger, this will cause reliability problems. But ext4 adoption many autonomous protection and independent repair mechanism to solve the problem. Perform file system log checksum and ext3, ext4 is a log file system. Logging is through the diary (disk adjacent regions specialized circulation records) records changes to the file system. Therefore, under log on physical storage to perform the actual change is more reliable, and able to ensure consistency, even if in the operation of a system crash or power outage. Doing so can reduce file system corruption. But even with the logging, if log error will cause file system damage. To solve this problem, ext4 performs a checksum of the log, make sure that effective changes to the underlying file system is completed correctly. In the reference section you can find more about logging (important part of ext4) information. Ext4 support according to user needs in a variety of modes of log records. For example, ext4 support Writeback mode, it only records metadata; or Ordered mode it records metadata, but write the data for the metadata is written from the journal; or Journal mode (the most reliable model), it also records metadata and data. Note that although the Journal mode is to ensure that the file system consistent best choice, but it is the slowest, because all data has to go through the logs. Online defragmentation while adding some features to ext4 reduce file system fragmentation (such as the adjacent block allocation is bands), but as the system uses the time increases, it is difficult to completely avoid fragmentation. Therefore appeared online defragmentation tool, they can file systems and individual file defragmentation, thus improving performance. Online defragmentation is a simple tool that will copy the file to reference the adjacent sections of the new ext4inode. Online defragmentation can also reduce the check file system time (fsck). Ext4 will not use the block Group tag to inode table, and let the fsck process ignored them to speed up the check. When the operating system because of internal damage (along with the file system, this is inevitable) and check the file system, ext4 was designed to improve overall reliability. Closing for Linux extended file system has a long and rich history — from the first introduced in 1992 to 2008 introduces ext1 ext4. Ext4 is the first dedicated to the design of the Linux file system, and the fact that it is efficient, stable, powerful file system. Ext4 as file system in-depth and ongoing development, and learning from other new file system advanced ideas (such as XFS, JFS, Reiser and IRON fault-tolerant file system technology). Despite the current forecast ext5 will look a little premature, but one thing is very clear, it will be a leading enterprise-class Liunx system.
No comments:
Post a Comment