Performance of Ext2, ReiserFS, and XFS?
3141592654 asks: "I've been doing a little experiement to compare Ext2, ReiserFS,
and SGI XFS. The experiment (LFS Sprite benchmark for small
files) involves tight loops of creating 10,000 1K files spread
equally among 100 directories, reading them back in order, and
deleting them. On a 1GHz processor with plenty of RAM running Linux 2.4.2, with
matching versions of file systems in default configurations
(no debugging and no internal checks). In our tests, EXT2 turned out to be faster than both ReiserFS and XFS. We had been led to believe by other published results that XFS would be much faster than Ext2, and ReiserFS would run just about
as fast. Have any slashdot readers had experienced similar results
with these filesystems? Or have we simply overlooked a major factor
in our tests?"
"Here are the results (create, read, delete) in seconds:
- Ext2 (0.45, 0.093, 0.13)
- ReiserFS (2.5, 0.45, 0.94)
- XFS (6.4, 0.15, 7.1)
Note that ReiserFS (v3.6.25) and XFS (v1.0) are vastly slower than
Ext2 (v0.5b) in an identical configuration.
Since we can obtain these numbers consistently, we are wondering
why they deviate from various published results. We have ruled
out cache warm-up and disk-zone effects. All three file systems
were set up from scratch from a 6 GB disk partition."
Try running the same test, but with the following changes:
10000 1K files spread evenly over (10|1) director(ies|y).
For small files in particular (and 1K is pretty small...) the also try telling us what the value of the -notails is on your Reiserfs mount.
Both XFS and Reiserfs are more complex, but they have a tendency to "scale" better. This scaling is primarily in the directory sizes, but also counts in filesystem sizes as well.
They have different design goals. Try adding this to your test:
Add files, delete them, type sync and hard poweroff the machine. How long does it take to reboot? Now try this with 20Gb and 100Gb filesystems.
To some extent for a test of the type that you are performing, you would expect them all to perform roughly the same. You have not seen that, however...
Remember the cardinal rule in testing: One test does not a benchmark make!
Personally I don't trust filesystem benchmarks where the test data is less than the amount of RAM in the box. 10,000 * 1K = 10MB which I'm assuming is less than the amount of RAM in the tests. At that point you're not taking into account interaction with the disks, all the reads and writes are occuring in filesystem cache.
The other week I ran some bonnie tests using a dual 1GHz, 1GB, 18GB 15K Seagate disk, 2.4.10. Default filesystem create options for both Ext2 and Reiser and 2000MB test file. I saw almost equal results with both filesystems averageing around 50MB/s for both reads and writes.