Small-file Random Create and Write/Read Comparison 

Test bed:

Kernel: 2.6.26-rc2 and ext4-patch-queue-c23f8dd92fe816954b102d8a892276f17440159a (update of May 20, 2008)
Partition size: 5 TB (IBM DS4100 Storage System with 400GB SATA 7200rpm disks)
IO scheduler: CFQ

Tests are done on a bi-Xeon machine with 2G of RAM and with hyper-threading enabled (-> 4 CPUs).

processor      : 4
vendor_id      : GenuineIntel
cpu family     : 15
model          : 4
model name     : Intel(R) Xeon(TM) CPU 2.80GHz
cpu MHz        : 2793.078
cache size     : 1024 KB
bogomips       : 5586.59

#hdparm -t /dev/md0

/dev/md0:
 Timing buffered disk reads:  332 MB in  3.00 seconds = 110.51 MB/sec

e2fsprogs used: 1.41-WIP from the "next" branch of e2fsprogs git tree (update of May 20, 2008)

Synopsis:

FFSB filesystem benchmarking software 5.1 available at
http://sourceforge.net/projects/ffsb/

ffsb profile used:
num_filesystems=1
num_threadgroups=1
directio=0
time=1800

[filesystem0]
        location=/mnt/test/
        num_files=5000
        num_dirs=1000
        max_filesize=524288
        min_filesize=4096
[end0]

[threadgroup0]
        num_threads=128
        write_size=4096
        write_blocksize=4096
        read_blocksize=4096
        create_weight=1
        write_weight=1
        readall_weight=2
[end0]

This profile runs 128 threads which do a combination of small file creates, reads and writes.
We collect the throughput scores and the CPU utilization values given by ffsb output.

The partition used is formated with mkfs and mounted with appropriate options before each run of ffsb. A FS check is done after each run.

The script used is available here.

Results

.

mkfs options
mount options   Transactions
 per second
  CPU usage
       %   
 e2fsck
elapsed time
in seconds
ext3 -I 256
data=writeback 7090
8.6
4004
xfs "defaults" (1)


ext4
-I 256 data=writeback 7898
7.2
2593
-I 256 data=writeback,
nodelalloc
9491  13.1  2827 
-I 256
-O uninit_groups
data=writeback 7194
7.5
257
-I 256
-O uninit_groups
data=writeback,
nomballoc
 7268
7.5
279
-I 256
-O uninit_groups
data=writeback,
nomballoc,nodelalloc
6409
8.7
256
-I 256
-O uninit_groups
data=writeback,
journal_async_commit
 7147 7.4 -
-I 256
-Ouninit_groups,flex_bg
-G 64
data=writeback 9906
9.1
245
-I 256
-Ouninit_groups,flex_bg
-G 64
data=writeback,
nomballoc
10383  9.7  252 
-I 256
-Ouninit_groups,flex_bg
-G 64
data=writeback,
nomballoc,nodelalloc
10596
15.2
307
-I 256
-Ouninit_groups,flex_bg
-G 64
data=writeback,
journal_checksum
9860
9.0
245
-I 256
-Ouninit_groups,flex_bg
-G 64
data=writeback,
journal_async_commit
10373
10.0
-

(1) no result for xfs filesystem, the system hung.