当前位置:网站首页>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 .
边栏推荐
- MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)
- DEX net 2.0 for crawl detection
- Why is go language particularly popular in China
- 【一起上水硕系列】Day 7 内容+Day8
- redis 遇到 NOAUTH Authentication required
- Introduction to webrtc protocol -- an article to understand dtls, SRTP, srtcp
- 获取并监控远程服务器日志
- Transferring images using flask
- 中职网络子网划分例题解析
- Go practice -- use JWT (JSON web token) in golang
猜你喜欢
穀歌 | 蛋白序列的深度嵌入和比對
How do I migrate my altaro VM backup configuration to another machine?
Altaro set grandfather parent child (GFS) archiving
Webrtc M96 release notes (SDP abolishes Plan B and supports opus red redundant coding)
Apache+php+mysql environment construction is super detailed!!!
Ensemble, série shuishu] jour 9
Understand one-way hash function
[trivia of two-dimensional array application] | [simple version] [detailed steps + code]
Training method of grasping angle in grasping detection
Why is go language particularly popular in China
随机推荐
Kubernetes resource object introduction and common commands (V) - (configmap)
[set theory] relational closure (relational closure related theorem)
Redis cannot connect remotely.
[advanced pointer (2)] | [function pointer, function pointer array, callback function] key analysis + code explanation
kubernetes资源对象介绍及常用命令(五)-(ConfigMap)
How do I migrate my altaro VM backup configuration to another machine?
Niuke JS separator
Es 2022 officially released! What are the new features?
Altaro requirements for starting from backup on Hyper-V
Interview question -- output the same characters in two character arrays
C 语言文件操作函数大全 (超详细)
期末复习(Day5)
Source insight License Activation
Basic introduction of redis and explanation of eight types and transactions
[written examination question analysis] | | get [sizeof and strlen] [pointer and array] graphic explanation + code analysis
@Import annotation: four ways to import configuration classes & source code analysis
[untitled]
Go practice -- closures in golang (anonymous functions, closures)
今天很多 CTO 都是被幹掉的,因為他沒有成就業務
求质数的方法