Comparison of Linux file systems: Btrfs and Ext4
A file system that actively uses metadata in its work, which speeds up the process, but if metadata is lost, the data itself is lost.
Btrfs
A file system that actively uses metadata in its work, which speeds up the process, but if metadata is lost, the data itself is lost.
When copying, the data is not recorded in its entirety, only the modified part is subject to recording.
Due to the principle of operation, it is well suited for taking pictures.
Volume management and data compression are already contained in the FS, so no additional software installation is required.
The FS itself was developed in 07 with an eye to modern devices, contains optimizations for working with SSD, error detection and correction processes, supports real—time defragmentation and deduplication (Deduplication is the process of compression by removing unused duplicate files).
The data storage format has already been frozen, and this is the basis of the FS, but the code base is being developed. Periodically, improvements appear in the core itself, various large companies are working on improvements. The Btrfs file system is very interesting and promising.
Ext4
Perhaps the most well-known and frequently encountered FS, which is used by default in most distributions. The most stable, since the development began in the last century, is the systematic development from Ext > Ext2 > Ext3.
It uses logging in its work, which gives greater reliability for files, but reduces speed. If an error occurs, the FS reverts to the previous version from the log. Thanks to the log, even if the recording fails, the FS remains safe.
Real-time defragmentation has been added to Ext4.
Despite its venerable age, it is still being developed. The developers plan to make the FS work with checksums in automatic mode and improve quotas, shift them to the core, this will improve performance.
I got at my disposal various modern mechanisms to improve performance, including working with SSD, but the structure is outdated.
The journal that is used in the work and is often found in the description is the principle of operation, in which transactions are recorded first in the journal, and changes/writes occur after.