当前位置:网站首页>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 .
边栏推荐
- [escape character] [full of dry goods] super detailed explanation + code illustration!
- Kubernetes resource object introduction and common commands (V) - (configmap)
- Source insight License Activation
- Jetson AGX Orin 平台移植ar0233-gw5200-max9295相机驱动
- @Solutions to null pointer error caused by Autowired
- Transferring images using flask
- The IntelliJ platform completely disables the log4j component
- Congratulations to musk and NADELLA on their election as academicians of the American Academy of engineering, and Zhang Hongjiang and Fang daining on their election as foreign academicians
- [function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation
- Es 2022 officially released! What are the new features?
猜你喜欢

Qt读写Excel--QXlsx插入图表5

Deep embedding and alignment of Google | protein sequences

穀歌 | 蛋白序列的深度嵌入和比對

Today, many CTOs were killed because they didn't achieve business
![[function explanation (Part 2)] | [function declaration and definition + function recursion] key analysis + code diagram](/img/29/1644588927226a49d4b8815d8bc196.jpg)
[function explanation (Part 2)] | [function declaration and definition + function recursion] key analysis + code diagram

MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)

@Autowired 导致空指针报错 解决方式

@Solutions to null pointer error caused by Autowired

"C and pointer" - Chapter 13 advanced pointer int * (* (* (*f) () [6]) ()

2022.DAY592
随机推荐
请求数据库报错:“could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGram
獲取並監控遠程服務器日志
"C and pointer" - Chapter 13 function pointer 1: callback function 2 (combined with template to simplify code)
Notepad++ wrap by specified character
[explain in depth the creation and destruction of function stack frames] | detailed analysis + graphic analysis
32GB Jetson Orin SOM 不能刷机问题排查
AtCoder Beginner Contest 258(A-D)
Today, many CTOs were killed because they didn't achieve business
About debugging the assignment of pagenum and PageSize of the formal parameter pageweb < T > (i.e. page encapsulation generic) in the controller
Learn libcef together -- set cookies for your browser
期末复习DAY8
6.23 warehouse operation on Thursday
DEX net 2.0 for crawl detection
求质数的方法
Deep embedding and alignment of Google | protein sequences
Communication - how to be a good listener?
Linux登录MySQL出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
How do I migrate my altaro VM backup configuration to another machine?
Transferring images using flask
ninja: build stopped: subcommand failed.