Slashdot Mirror


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:

  1. Ext2 (0.45, 0.093, 0.13)
  2. ReiserFS (2.5, 0.45, 0.94)
  3. 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."

1 of 38 comments (clear)

  1. Re:Something fishy by kijiki · · Score: 3, Informative

    You've nailed it. Its odd your post is still hanging around at Score: 1 even though its the only one that correctly explains the glaring flaw in the benchmark.

    ext2 does no journalling, so all 10 megs of your writes were buffered into ram. The benchmark then returned done, even thought little or no data had reached the disk yet.

    The journalling filesystems do the same thing, with one major exception. The metadata changes MUST be written to the journal before the benchmark returns done. The data can stay in memory, since XFS and reiserfs only do metadata journalling.

    You're comparing the time to write 10megs to RAM, read it back from ram and then remove it from ram against having to write 20000 files worth of metadata (10000 for the creates, another 10000 for the deletes) to disk, plus all the RAM writes/reads..