当前位置:网站首页>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 .
边栏推荐
- 期末复习(Day2)
- [escape character] [full of dry goods] super detailed explanation + code illustration!
- [advanced pointer (1)] | detailed explanation of character pointer, pointer array, array pointer
- 获取并监控远程服务器日志
- Linux登录MySQL出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
- Personal outlook | looking forward to the future from Xiaobai's self analysis and future planning
- [set theory] relational closure (reflexive closure | symmetric closure | transitive closure)
- [written examination question analysis] | | get [sizeof and strlen] [pointer and array] graphic explanation + code analysis
- Webrtc native M96 version opening trip -- a reading code download and compilation (Ninja GN depot_tools)
- Final review (Day2)
猜你喜欢

Training method of grasping angle in grasping detection

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

Why is go language particularly popular in China

Win10 install pytullet and test

Personal outlook | looking forward to the future from Xiaobai's self analysis and future planning
![Ensemble, série shuishu] jour 9](/img/39/c1ba1bac82b0ed110f36423263ffd0.png)
Ensemble, série shuishu] jour 9

SimpleITK学习笔记

Beaucoup de CTO ont été tués aujourd'hui parce qu'il n'a pas fait d'affaires
![[together Shangshui Shuo series] day 7 content +day8](/img/fc/74b12addde3a4d3480e98f8578a969.png)
[together Shangshui Shuo series] day 7 content +day8

"C and pointer" - Chapter 13 function of function pointer 1 - callback function 1
随机推荐
Robot capture experiment demonstration video
Simpleitk learning notes
Interview question -- output the same characters in two character arrays
How to set up altaro offsite server for replication
【无标题】
[function explanation (Part 2)] | [function declaration and definition + function recursion] key analysis + code diagram
Go practice -- factory mode of design patterns in golang (simple factory, factory method, abstract factory)
Pytorch through load_ state_ Dict load weight
Strategy pattern: encapsulate changes and respond flexibly to changes in requirements
聊聊如何利用p6spy进行sql监控
Redis cannot connect remotely.
Jetson AgX Orin platform porting ar0233 gw5200 max9295 camera driver
[advanced pointer (2)] | [function pointer, function pointer array, callback function] key analysis + code explanation
Obtenir et surveiller les journaux du serveur distant
Go practice -- design patterns in golang's singleton
EMD distance - example of use
chromedriver对应版本下载
Altaro set grandfather parent child (GFS) archiving
期末复习(day3)
Explanation of several points needing attention in final (tested by the author)