当前位置:网站首页>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 .
边栏推荐
- [explain in depth the creation and destruction of function stack frames] | detailed analysis + graphic analysis
- Xaml gradient issue in uwp for some devices
- 期末复习(DAY6)
- mysql启动报错:The server quit without updating PID file几种解决办法
- 2022.6.30DAY591
- Go practice -- use JWT (JSON web token) in golang
- Win10 install pytullet and test
- Final review (Day6)
- 2022.DAY592
- [advanced pointer (2)] | [function pointer, function pointer array, callback function] key analysis + code explanation
猜你喜欢

Notepad++ wrap by specified character

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

Capacity expansion mechanism of map

Progressive multi grasp detection using grasp path for rgbd images

Intégration profonde et alignement des séquences de protéines Google

Linux登录MySQL出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)

Latest version of source insight
![[Shangshui Shuo series together] day 10](/img/a3/e8b9df588bef67ead925813a75c8c0.png)
[Shangshui Shuo series together] day 10

@Import annotation: four ways to import configuration classes & source code analysis

Why is go language particularly popular in China
随机推荐
Transferring images using flask
C 语言文件操作函数大全 (超详细)
ROS Compilation Principle
[branch and cycle] | | super long detailed explanation + code analysis + a trick game
Linux登录MySQL出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
redis 无法远程连接问题。
mapbox尝鲜值之云图动画
@Import annotation: four ways to import configuration classes & source code analysis
Win10 install pytullet and test
Why should we rewrite hashcode when we rewrite the equals method?
[function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation
Apache+php+mysql environment construction is super detailed!!!
[untitled]
@Solutions to null pointer error caused by Autowired
EMD distance - example of use
Basic introduction of redis and explanation of eight types and transactions
Kubernetes resource object introduction and common commands (V) - (configmap)
今天很多 CTO 都是被干掉的,因为他没有成就业务
SimpleITK学习笔记
Personal outlook | looking forward to the future from Xiaobai's self analysis and future planning