当前位置:网站首页>Ext4 vs XFS -- which file system should you use
Ext4 vs XFS -- which file system should you use
2022-07-03 05:42:00 【TAOXC( ̿ ▀ ̿ ̿Ĺ̯̿̿ ▀ ̿ ̿】
function Linux Users of the system rarely pay attention to the underlying file system . in fact , In the installation Linux In the process of , It is often preferred to use the default file system listed without exploring other available options . about Windows, Things are much easier , because NTFS Is the primary file system . stay Linux in , There are many file systems available to you . These include Ext4、XFS、ZFS and BTRFS.
The most widely used file system is Ext4 and XFS, The latter is based on RHEL The default file system in the distribution of , and Ext4 yes Debian and Ubuntu The standard file system in the distribution . When selecting a file system , Some factors to consider include scalability 、 Stability and data integrity .
In this guide , We will focus on Ext4 and XFS file system , And try to understand the difference between the two .
Ext4 file system
Ext4 file system ( Extended file system ) yes Ext The fourth generation of the file system family , Its origin can be traced back to 1987 First introduced in Minix operating system .Ext File system is the first support Linux File system of kernel . As early as 1992 year . It's in 2008 Year and Linux 2.6.28 Come together . Replace its predecessor ext3.
Ext4 Manage many small files perfectly and ensure that metadata is written correctly , Even if the write cache is powered off .
Be clear at a glance , Its main features include :
- Support large file size - Ext4 Support as much as 16 TiB (Tebibytes) The size of a single file , and XFS Support as much as 8 exbibytes Maximum file size .
- Range based deferred allocation to speed up file allocation .
- Backward compatibility —— Use Ext4 Another advantage of the file system is that it is backward compatible Ext3 and Ext2 System . This improves performance and flexibility , Because of some Ext4 Functions can also be Ext3 and Ext2 File system . Besides ,Ext3 and Ext2 File system can be used as Ext4 mount .
- Assign improvements - Memory blocks are written to disk by Ext4 File systems allocate more efficiently . This greatly improves the read and write performance .
- Log checksum - Ext4 The file system uses the checksum option to minimize the risk of file corruption . The checksum option performs frequent checks to detect errors in the block volume . Doing so can reduce logging time and reduce performance .
- Faster file system checks - In addition to log checksum ,Ext4 Produce faster file system checks , for example , With previous versions ( Such as Ext3 and Ext2) comparison ,fsck The command will run faster and give results in a shorter time .
- Improved timestamp ——Ext4 Realize the timestamp measured in nanosecond , This is an improvement on the granularity of the second based timestamp , The latter is considered insufficient . Besides , The timestamp has also been added 408 year , To solve the problem 2038 The upper limit of the year .
- Unlimited number of subdirectories ——Ext4 The file system does not limit the number of subdirectories that can be created in a single directory , In addition to the directory size itself . stay Ext3 in , A directory can only have 32,000 Subdirectory .Ext4 Introduced HTreeindices Function to add entries that can be stored in the directory .
- Transparent encryption - As early as 2015 year 6 month ,Linux kernel 4.1 Medium Ext4 The file system supports transparent encryption .
XFS file system
XFS The file system was originally created by Silicon Graphics On 1993 Annual development , It is stable and high-performance 64 Bit log file system .XFS The file system is designed to support up to 18 EB Large file systems and large files . This file system is designed for large disk arrays 、 large CPU And systems that need to store large files .
XFS To provide high I/O The scalability of threads and their excellent performance in processing large files are well known .
XFS The file system is RHEL、CentOS And others RHEL Distribution version ( Such as Oracle Linux、Rocky Linux and AlmaLinux) Default file system in .
The main features include :
- Support for larger file systems - XfS Support as much as 1PiB File system size , and Ext4 Support as much as 50TiB. The supported file system size may be due to Linux The distribution version varies .
- Delayed allocation - Use inert evaluation techniques for file allocation . Block allocation occurs only when the data is finally refreshed to disk , Helps reduce fragmentation and improve performance .
- Online defragmentation and file system growth
- Complex metadata pre reading algorithm
- Metadata log - Metadata logging is a function , It can ensure the consistency of file system in case of sudden power failure or system crash .
- Quota log —— This eliminates the need for lengthy quota consistency checks after a system crash .
- Support extended properties —— This enables the system to associate several additional names for each file / It's worth it .
- Online defragmentation and growth - You can defragment and expand the file system during mounting and activity .
- Storage scalability ——XFS File systems are supporting large file systems 、 Large directories and up to EB The capacity of massive files plays an amazing role .
- Efficient disk space management ——XFS And through B-Tree Indexes provide scalability for efficient disk space management .
Conclusion
Choosing the right file system for your application is an important decision . Consider the size of the server when making decisions 、 What you expect I/O The workload 、 Throughput and latency 、 File size 、 The downtime that applications may suffer, and so on .
That's right XFS and Ext Overview of file system . We have provided an in-depth overview of the benefits provided by each file system . Remember this information , You can make informed decisions about which file system to choose for your operating system .
边栏推荐
- Ansible firewall firewalld setting
- [Shangshui Shuo series together] day 10
- Intégration profonde et alignement des séquences de protéines Google
- kubernetes资源对象介绍及常用命令(五)-(ConfigMap)
- 獲取並監控遠程服務器日志
- 期末复习(day3)
- Final review (Day5)
- The request database reported an error: "could not extract resultset; SQL [n/a]; needed exception is org.hibernate.exception.sqlgram"
- Altaro VM backup getting started
- Redis使用Lua脚本简介
猜你喜欢
Method of finding prime number
Communication - how to be a good listener?
Understand one-way hash function
Altaro set grandfather parent child (GFS) archiving
Go practice - gorilla / handlers used by gorilla web Toolkit
Configure DTD of XML file
[advanced pointer (2)] | [function pointer, function pointer array, callback function] key analysis + code explanation
6.23 warehouse operation on Thursday
Disassembly and installation of Lenovo r7000 graphics card
[escape character] [full of dry goods] super detailed explanation + code illustration!
随机推荐
[function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation
PHP notes are super detailed!!!
[Shangshui Shuo series together] day 10
2022.7.2day594
Redis cannot connect remotely.
【无标题】
[set theory] relational closure (relational closure related theorem)
Together, Shangshui Shuo series] day 9
College campus IP network broadcasting - manufacturer's design guide for college campus IP broadcasting scheme based on campus LAN
"C and pointer" - Chapter 13 advanced pointer int * (* (* (*f) () [6]) ()
Go practice -- use JWT (JSON web token) in golang
Source insight License Activation
今天很多 CTO 都是被干掉的,因为他没有成就业务
C 语言文件操作函数大全 (超详细)
Today, many CTOs were killed because they didn't achieve business
Interview question -- output the same characters in two character arrays
NG Textarea-auto-resize
Can altaro back up Microsoft teams?
Best practices for setting up altaro VM backups
Altaro requirements for starting from backup on Hyper-V