piątek, 19 marca 2010

Few benchmarks MongoDB at replica pairs mode

Last two weeks I was working at new environment for MongoDB. For benchmarks create two configurations: with ssd and with sas drives. Since I really like only HA solutions decide to run MongoDB in replica pairs mode. Use development version 1.3.3 at start and today switch to 1.3.4, because it's really faster then stable version in that mode.

First configuration was 2 x Dell R610, 4x50GB SSD in RAID10, 12GB ram, X5550@2.67GHz
Second configuration was 2 x HP DL360 G5, 6x146GB SAS in RAID10, 8GB ram, X5450@3.00GHz

Both use CentOS 5.3.

Decide to create test with 100k operations per connection:
- insert (6,50%) - 6500
- delete (3,00%) - 3000
- update (3,00%) - 3000
- select (87,50%) - 87500

All inserts,deletes,updates were confirm before another operations starts, so I was sure none data will be lose if master die for any reason and MongoDB switch to other one.

Programmer at my team create php test with all that operations run random, but keeps all percents above, then simple perl script to run N scripts same time.

N - 1, 100, 200 ... 1000

Time to finish N connections (time in seconds):



Time per connection at N connections (time in seconds):


As we see MongoDB scale quite nice.

2 komentarze:

Robert Janeczek pisze...

100k ops/sec?

LCF pisze...

yes, at 1 connection it takes ~2sec for 100k ops, but when you got more connections time is around 1sec for each 100k ops (remember it's not one type of operations, 100k updates or inserts will take more time).