Benchmarking SSD with MongoDB and CouchDB, Part 2

In Part 1 I started to investigate the performance impact of SSD on MongoDB and CouchDB. However, I got sidetracked because of the strange behavior of Mac OS X. The Mac is lying about msync. You have to force a synchronization by explicitly calling fnctl with F_FULLSYNC for the underlying file descriptor. So, I decided to do some more experiments with block sizes, file systems, operation systems, connection types and SSD.

The two combatants for today are

Test Setup

Recall that the test programs creates a sparse file, fills this file block by block, and does an msync at every block. For the first tests I’m using a AMD Phenom II X6 1055T, OpenSuSE 11.4. Simply using dd gives for the ADATA

> dd if=/dev/zero of=/ssd/test1 bs=512 count=10000000
10000000+0 Datensätze ein
10000000+0 Datensätze aus
5120000000 Bytes (5,1 GB) kopiert, 39,5451 s, 129 MB/s

and for the OCZ

> dd if=/dev/zero of=/ssd/test1 bs=512 count=10000000
10000000+0 Datensätze ein
10000000+0 Datensätze aus
5120000000 Bytes (5,1 GB) kopiert, 21,7511 s, 235 MB/s

Blocksize

The first test uses different block sizes. Keep in mind that the page size is 4096.

(click on diagram to enlarge)

The ADATA is much faster than the OCZ when using a small block size. With larger block sizes it wins because of its higher bandwidth.

File Systems

I’ve used the OCZ directly connected to the SATA on the mortherboard to test various file systems: EXT4, EXT3, EXT2, Reiser, XFS, VFAT, BTRFS. The results are as follows

(click on diagram to enlarge)

The tests used the msync-bench test with block sizes of 1024, 4096, and 65536.

Next Steps

The same tests have to redone using a hard disk. First tests indicate, that a SSD is 10 to 100 times faster in this setup. I hope the FireWire connector for the Mac arrives soon, so that I can tests the different operating systems and connection types (SATA, eSATA, FW, USB). I still have to figure out, what are good tests for MongoDB and CouchDB.

To be continued … here