Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the differences between xfs and ext4 in linux

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly talks about "what are the differences between xfs and ext4 in linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what are the differences between xfs and ext4 in linux?"

Differences: 1, the size of a single file, EXT4 can be 16GB to 16TB, while XFS can be 16TB to 16EBter2, the maximum file system size, EXT4 can be 1EB, and XFS is 8EBter3, EXT4 is limited to disk structure and compatibility problems, scalability and scalability are not as good as XFS.

The operating environment of this tutorial: CentOS 6 system, Dell G3 computer.

The default file system for centos7.0 is xfs,centos6, ext4,centos5 is ext3.

EXT4

Ext4, an acronym for the fourth generation of extended file systems, was launched in 2008. It is a truly reliable file system, and it has been the default option for almost most distributions over the past few years, and it is generated by older code. It is a journaling file system, meaning that it records the location of the file on the disk and any other changes to the disk. If the system crashes, the file system is rarely corrupted, thanks to journal technology.

XFS

XFS is a very excellent journaling file system, which is designed by SGI. XFS has a variety of improvements that make it stand out from the list of file system groups, such as logging for metadata operations, extensible / parallel I / O, suspend / restore I / O, online defragmentation, delayed performance allocation, etc.

Around 2002, XFS was incorporated into the Linux kernel, and the 2009 RHEL Linux version 5.4 used the XFS file system. Because of its high performance, architecture scalability and robustness, XFS has always been the first choice for many enterprise systems, especially those with a lot of data. RHEL / CentOS 7 and Oracle Linux now use XFS as their default file system.

Cons: the XFS file system cannot be shrunk, and performance degrades when a large number of files are deleted.

The difference between xfs and ext4:

Difference one: the size of a single file

EXT4 can be 16GB to 16TB, and XFS can be 16TB to 16EB.

Difference 2: maximum file system size

EXT4 can be 1EB, and XFS can be 8EB.

Difference 3:

EXT4 is limited by disk structure and compatibility issues, and scalability and scalability are not as good as XFS.

Description:

Due to the historical disk structure, Ext4's inode limit (32 digits) is limited to a maximum of more than 4 billion files. And the single file size of Ext4 can only support up to 16T (4K block size), which is the bottleneck at present. XFS uses 64-bit management space, and the file system can reach the EB level.

Performance testing

Tested the performance of 4k random read and write, direct=1,numjobs=20,iodepth=128

Disk information

Disk / dev/sdc1: 4000.8 GB, 4000785104896 bytes, 7814033408 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes

test data

File system 4k-randread4k-read4k-randwrite4k-writeXFSiops=426iops=42773iops=313iops=24732EXT4iops=430iops=41636iops=315iops=19095

On the order of 4k, IOPS is basically the same, while 4k random writing XFS is slightly better than EXT4.

At this point, I believe you have a deeper understanding of "what are the differences between xfs and ext4 in linux?" you might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report