AxonFramework/AxonFramework — Issue #17: Mongo MongoEventStoreBenchMark could be faster
Author: abuijze
Created: 2011-12-03 14:49:18+00:00
State: open
Labels: Low priority

I tried running the MongoEventStoreBenchMark today and I got this result on a box with Core i7, 8GB RAM, Intel SSD and OSX with Java HotSpot(TM) 64-Bit Server VM:

Result (MongoEventStoreBenchMark): 100 threads concurrently wrote 500 * 2 events each in 13271 milliseconds. That is an average of 7535 events per second.

Wouldn't the benchmark be more accurate if the datafile was preallocated to 512MB before the benchmark starts?
In the Mongo log those 13 seconds look like this, see the last six lines:

Fri Aug 26 17:37:45 [initandlisten] connection accepted from 192.168.166.92:55383 #15
Fri Aug 26 17:37:45 [conn15] dropDatabase axonframework
Fri Aug 26 17:37:45 [initandlisten] connection accepted from 192.168.166.92:55384 #16
Fri Aug 26 17:37:45 [FileAllocator] allocating new datafile /usr/local/var/mongodb/axonframework.ns, filling with zeroes...
Fri Aug 26 17:37:45 [FileAllocator] done allocating datafile /usr/local/var/mongodb/axonframework.ns, size: 16MB, took 0.008 secs
Fri Aug 26 17:37:45 [initandlisten] connection accepted from 192.168.166.92:55385 #17
Fri Aug 26 17:37:45 [initandlisten] connection accepted from 192.168.166.92:55386 #18
Fri Aug 26 17:37:45 [initandlisten] connection accepted from 192.168.166.92:55387 #19
Fri Aug 26 17:37:45 [initandlisten] connection accepted from 192.168.166.92:55388 #20
Fri Aug 26 17:37:45 [initandlisten] connection accepted from 192.168.166.92:55389 #21
Fri Aug 26 17:37:45 [initandlisten] connection accepted from 192.168.166.92:55390 #22
Fri Aug 26 17:37:45 [initandlisten] connection accepted from 192.168.166.92:55391 #23
Fri Aug 26 17:37:45 [initandlisten] connection accepted from 192.168.166.92:55392 #24
Fri Aug 26 17:37:45 [FileAllocator] allocating new datafile /usr/local/var/mongodb/axonframework.0, filling with zeroes...
Fri Aug 26 17:37:45 [FileAllocator] done allocating datafile /usr/local/var/mongodb/axonframework.0, size: 64MB, took 0.042 secs
Fri Aug 26 17:37:46 [FileAllocator] allocating new datafile /usr/local/var/mongodb/axonframework.1, filling with zeroes...
Fri Aug 26 17:37:46 [conn16] building new index on { _id: 1 } for axonframework.domainevents
Fri Aug 26 17:37:46 [conn16] done for 0 records 0.008secs
Fri Aug 26 17:37:46 [conn16] info: creating collection axonframework.domainevents on add index
Fri Aug 26 17:37:46 [conn16] building new index on { aggregateIdentifier: 1, serializedEvent: 1 } for axonframework.domainevents
Fri Aug 26 17:37:46 [conn16] done for 0 records 0secs
Fri Aug 26 17:37:46 [conn16] insert axonframework.system.indexes 706ms
Fri Aug 26 17:37:46 [conn19] building new index on { sequenceNumber: 1 } for axonframework.domainevents
Fri Aug 26 17:37:46 [conn19] done for 228 records 0.002secs
Fri Aug 26 17:37:46 [FileAllocator] done allocating datafile /usr/local/var/mongodb/axonframework.1, size: 128MB, took 0.626 secs
Fri Aug 26 17:37:50 [FileAllocator] allocating new datafile /usr/local/var/mongodb/axonframework.2, filling with zeroes...
Fri Aug 26 17:37:51 [FileAllocator] done allocating datafile /usr/local/var/mongodb/axonframework.2, size: 256MB, took 0.16 secs
Fri Aug 26 17:37:55 [FileAllocator] allocating new datafile /usr/local/var/mongodb/axonframework.3, filling with zeroes...
Fri Aug 26 17:37:56 [FileAllocator] done allocating datafile /usr/local/var/mongodb/axonframework.3, size: 512MB, took 0.949 secs
Fri Aug 26 17:37:58 [conn16] end connection 192.168.166.92:55384