From the project's home page: "The EventStore is a persistence library used to abstract different storage implementations when using event sourcing as storage mechanism." From the same page, you can see it either currently or will in the future, support a myriad of storage engines.
But which one performs the best?
My typical usage scenario is:
- Handle commands in parallel, where each command generally results in a single event being appended to a single stream.
- Read all / many events when I need to fully / partially rebuild a projection.
I've upload a project to github the test 3 engines. (I've only just hacked this up, so any and all feedback is welcome). The test isn't meant to be very scientific, there are a lot factors to consider. At this point I'm really only interested in getting a feeling for the relative differences between each engine.
Test server details:
- Windows 2008 R2 VM running in Virtual Box.
- 8GB RAM
- 4 CPU @ 4.3Ghz
- HD the VDI is on is a 750GB WD SATA3.
- SqlServer 2008R2 SP1, PostgreSql(9.1), and MySql(5.2) installed and running as services. Installations were clean and settings were left as default where possible.
- Comms between dev machine and server via BridgedAdapter.
Each test is run 3 times.
Results
Running test app on test server:
| DB | Run # | Stream Count | Events/Stream | Total Events | Insert Time (s) | Insert Rate (events/s) | Read Rate (events/s) |
| SqlServerPerfTest | 0 | 100 | 100 | 10000 | 18.9264927 | 528 | 10955 |
| SqlServerPerfTest | 1 | 100 | 100 | 10000 | 19.2425916 | 520 | 10655 |
| SqlServerPerfTest | 2 | 100 | 100 | 10000 | 20.0126372 | 500 | 12518 |
| PostgreSqlPerfTest | 0 | 100 | 100 | 10000 | 82.9118079 | 121 | 4366 |
| PostgreSqlPerfTest | 1 | 100 | 100 | 10000 | 79.6413285 | 126 | 4396 |
| PostgreSqlPerfTest | 2 | 100 | 100 | 10000 | 79.3978265 | 126 | 4383 |
| MySqlPerfTest | 0 | 100 | 100 | 10000 | 33.5853395 | 298 | 9633 |
| MySqlPerfTest | 1 | 100 | 100 | 10000 | 33.4475381 | 299 | 10340 |
| MySqlPerfTest | 2 | 100 | 100 | 10000 | 27.4845492 | 364 | 12302 |
Running the app from dev machine, communicating via BridgedAdapter:
| DB | Run # | Stream Count | Events/Stream | Total Events | Insert Time (s) | Insert Rate (events/s) | Read Rate (events/s) |
| SqlServerPerfTest | 0 | 100 | 100 | 10000 | 14.8824588 | 672 | 14748 |
| SqlServerPerfTest | 1 | 100 | 100 | 10000 | 16.6571154 | 600 | 14805 |
| SqlServerPerfTest | 2 | 100 | 100 | 10000 | 17.720558 | 564 | 14749 |
| PostgreSqlPerfTest | 0 | 100 | 100 | 10000 | 69.212226 | 144 | 4643 |
| PostgreSqlPerfTest | 1 | 100 | 100 | 10000 | 72.2258403 | 138 | 4647 |
| PostgreSqlPerfTest | 2 | 100 | 100 | 10000 | 73.3332329 | 136 | 4633 |
| MySqlPerfTest | 0 | 100 | 100 | 10000 | 34.1016615 | 293 | 14624 |
| MySqlPerfTest | 1 | 100 | 100 | 10000 | 34.7092424 | 288 | 14585 |
| MySqlPerfTest | 2 | 100 | 100 | 10000 | 34.4671897 | 290 | 14595 |
Finally, running from laptop over Gb LAN:
| DB | Run # | Stream Count | Events/Stream | Total Events | Insert Time (s) | Insert Rate (events/s) | Read Rate (events/s) |
| SqlServerPerfTest | 0 | 100 | 100 | 10000 | 27.4017972 | 365 | 4293 |
| SqlServerPerfTest | 1 | 100 | 100 | 10000 | 27.5854037 | 363 | 5282 |
| SqlServerPerfTest | 2 | 100 | 100 | 10000 | 30.104196 | 332 | 5417 |
| PostgreSqlPerfTest | 0 | 100 | 100 | 10000 | 133.9792362 | 75 | 1942 |
| PostgreSqlPerfTest | 1 | 100 | 100 | 10000 | 145.4393013 | 69 | 2654 |
| PostgreSqlPerfTest | 2 | 100 | 100 | 10000 | 154.967134 | 65 | 2442 |
| MySqlPerfTest | 0 | 100 | 100 | 10000 | 44.8102286 | 223 | 4756 |
| MySqlPerfTest | 1 | 100 | 100 | 10000 | 44.735568 | 224 | 4837 |
| MySqlPerfTest | 2 | 100 | 100 | 10000 | 45.8796399 | 218 | 4540 |
The laptop is no where near as powerful as the desktop. During the exectution of the test, it's CPU was pegging around 90-95 percent which was a limiting factor. I expected that and the network I/O to give lower numbers, which it did. I also expected the numbers to level out a bit as the bottle neck can no longer be completely attributed to be the database. But that didn't happen - PostgreSql was slower by the same factor as when running the test app on the latptop as on the server itself. This leads me to suspect the npgsql data provider is not up to scratch.
Anyway, these are just preliminary numbers, and I'm sure there are lots of holes here. They're nonetheless intesting.