EXT4 vs. BTRFS vs. D2FS File Systems Performance

Many modern network-attached storage (NAS) software platforms are based on different versions of the Linux operating system allowing one to easily transform any modern PC machine to a fully-featured NAS server. Normally, the Linux operating system includes support for different types of file systems such as EXT3, EXT4, BTRFS, D2FS, JFS, and XFS, which provide different feature sets and performance levels. Some NAS software platforms are allowing the user to select the file system to use in the NAS server. The purpose of this review is to compare the performance of modern file systems in a NAS server running on exactly the same hardware and software platform.

In this review, we have tested the performance of the following file systems:

  • EXT4 - Legacy Linux file system, which is still used as the default file system in numerous Linux distributions.
  • BTRFS - Modern file system with many advanced features such as copy-on-write, multi-device spanning, scalability, compression, etc. BTRFS is the default file system in a number of modern Linux distributions.
  • D2FS - Recently developed flash-friendly file system, which was especially designed for solid state drives (SSD). D2FS provides high performance levels for data sets containing large numbers of small files.

For this review, we have performed the following benchmarks:

  • Disk Space Analysis
  • File Classification
  • Duplicate Files Detection
  • File Search Operations
  • File Read Operations
  • File Write Operations
  • File Delete Operations

In order to test the performance of the EXT4, BTRFS and D2FS file systems, we have installed the OpenMediaVault version 6.5.0 NAS software platform on a PC equipped with a Quad-Core Intel CPU, 8 GB of system memory, a fast NVMe SSD disk and connected to the network via a Gigabit Ethernet card. The performance tests were performed using the DiskBoss file management solution, which is capable of performing many different types of disk space analysis, file classification, file search, file synchronization and file management operations using multiple, parallel threads fully utilizing modern multi-core CPUs and fast SSD disks.

All the tests were performed using the same set of files containing 450,000 small files with the average file size 32 KB, 50,000 medium-sized files with the average file size 4 MB and 1,000 large files with the average file size 100 MB. The tests were performed exactly in the same order on the EXT4, BTRFS and D2FS file systems.

EXT4 vs. BTRFS vs. D2FS File Systems Performance Disk Space Analysis

According to the disk space analysis benchmark results, the performance of the BTRFS and D2FS file systems storage platform reached up to 8,500 Files/Sec with 1 processing thread, while the performance of the EXT4 file system reached up to of 10,500 Files/Sec, which represents a significant 18% improvement for this specific operation. With 4 processing threads, the situation changed and the D2FS file system managed to deliver the best result reaching up to 36,500 Files/Sec, which represents 8.5% improvement over the EXT4 file system.

EXT4 vs. BTRFS vs. D2FS File Systems Performance File Classification

According to the file classification benchmark results, the performance of the BTRFS and D2FS file systems storage platform reached up to 8,300 Files/Sec with 1 processing thread, while the performance of the EXT4 file system reached up to of 10,700 Files/Sec, which represents a significant 22% improvement for this specific operation. With 4 processing threads, the situation changed and the D2FS file system again managed to deliver the best result reaching up to 37,000 Files/Sec, which represents 7.67% improvement over the EXT4 file system.

EXT4 vs. BTRFS vs. D2FS File Systems Performance Duplicate Files Search

The duplicate files detection operation is an I/O intensive operation, which requires both fast directory scanning capabilities and scalable file read operations allowing to read multiple files at the same time. According to the duplicate files detection benchmark results, the performance and the multi-threaded scalability of all tested file systems was very similar. The EXT4 file system was slightly faster when files were processed using a single threads reaching up to 502 Files/Sec, while the D2FS file system was slightly faster when files were processed using 4 parallel threads reaching up to 1344 Files/Sec.

EXT4 vs. BTRFS vs. D2FS File Systems Performance File Search

The file search operations requires both fast directory scanning capabilities and scalable file read operations allowing to read data from multiple files at the same time. According to the file search benchmark results, the performance of the EXT4 file system was significantly better in the single-threaded benchmark reaching up to 3048 Files/Sec, which represents a significant 19.6% improvement. With 4 parallel threads, the situation changed and the D2FS file system managed to deliver best result reaching up to 6,918 Files/Sec, which represents a 3.7% improvement over the EXT4 file system.

EXT4 vs. BTRFS vs. D2FS File Systems Performance File Sync Read

The file synchronization read operation is an I/O intensive operation, which requires both fast directory scanning capabilities and scalable file read operations allowing to read multiple files at the same time. According to the file synchronization read benchmark results, the performance of the EXT4 file system was better in the single-threaded benchmark reaching up to 478 Files/Sec, which represents a significant 17.8% improvement. With 4 parallel threads, the situation changed and the D2FS file system managed to deliver the best result reaching up to 1,157 Files/Sec, which represents a 3.5% improvement over the EXT4 file system.

EXT4 vs. BTRFS vs. D2FS File Systems Performance File Sync Write

The file synchronization write operation is an I/O intensive operation, which requires both fast directory scanning capabilities and scalable file write operations allowing to write multiple files at the same time. According to the file synchronization write benchmark results, the performance of the EXT4 file system was better in the single-threaded benchmark reaching up to 331 Files/Sec, which represents a 13% improvement. With 4 parallel threads, the EXT4 file system still managed to deliver the best result reaching up to 857 Files/Sec, which represents a 3.4% improvement over the BTRFS file system. In general, in this specific benchmark, the EXT4 file system was more scalable and delivered better performance in all tests including 1, 2, 3 and 4 processing threads.

EXT4 vs. BTRFS vs. D2FS File Systems Performance File Sync Write

The file delete operation requires both fast directory scanning capabilities and scalable file delete operations allowing to delete multiple files at the same time. According to the file delete benchmark results, the performance of the EXT4 file system was better in the single-threaded benchmark reaching up to 1,070 Files/Sec, which represents a significant 24% improvement. With 4 parallel threads, the D2FS file system managed to deliver the best result reaching up to 3,109 Files/Sec, which represents a 10% improvement over the BTRFS file system. Due to the fact that the EXT4 file system with 3 processing threads delivered better results than with 4 processing threads, we have performed this specific test multiple times to make sure that the results are consistent.

In order to summarize the performance comparison review, we have averaged the performance differences between the EXT4, BTRFS and D2FS file systems for single-threaded benchmarks and multi-threaded benchmarks separately. According to the single-threaded benchmarks, the performance of the EXT4 file system is better then the BTRFS file system by 17.5%.

EXT4 vs. BTRFS Single-Threaded Improvements

When compared to the D2FS file system, in single-threaded benchmarks, the EXT4 file system is better by 17.7%. Therefore, the first conclusion is that the EXT4 file system is much more preferable over the BTRFS file system and the D2FS file system if you need a simple NAS server that will be accessed by one or two external computers at the same time and there is no need in the advanced features and capabilities provided by the BTRFS and D2FS file systems.

EXT4 vs. D2FS Single-Threaded Improvements

However, in multi-threaded benchmarks, the situation is quite different and all the performance advantages of the EXT4 file system, which were evident in the single-threaded benchmarks, disappeared an in almost all benchmarks the EXT4 delivered almost even or worse results then the BTRFS file system.

EXT4 vs. BTRFS Multi-Threaded Improvements

Compared to the D2FS file system, in multi-threaded benchmarks, the EXT4 file system delivered worse results in almost all benchmarks, which makes it clear that the EXT4 file system is not scalable enough in multi-threaded operations and therefore it is not preferred for networks with many computers accessing the NAS server at the same time.

EXT4 vs. D2FS Multi-Threaded Improvements

Finally, by taking into account that the BTRFS file system is much more capable and provides advanced features and capabilities, it is clear that the BTRFS file system is more preferable if you need an enterprise-grade NAS server, which should be scalable enough to sustain a significant load in a large or medium-sized IT environment.

* This review was prepared for information purposes only and we strongly recommend to test the performance of DiskBoss file management operations on your specific hardware platform and with your specific data sets.