Skip to content
jarekratajski edited this page Jul 31, 2014 · 5 revisions

Benchmark code

I've used jpab project.

Hardware

Computer used is intel i7 PC (3770, 3.4 Ghz), Windows 8, 8 GB RAM

mysql version 5.6 (installed not tuned) hibernate: 4.3.5

Changes to tests

JPAB runs few tests - I've selected one - were database index is used (to perform LIKE Query). (IndexTest from JPAB). (Other tests would be to unfair for mysql/hibernate).

JPAB for Airomem was adopted as little as possible(Airomem is not JPA provider so I could not simply copy airomem libs in it).

#Results table There were three runs made with random operations (
5 threads- 5 operation batch, 5 threads- 5000 operation batch, 1 thread- 5 operation batch (for airomem batch size does not make difference (yet)).

Second and this column show operations per second. Comparison is AIROMEM/MYSQL

Operation MYSQL+HIBERNATE (op/s) AIROMEM (op/s) COMPARISON
PERSIST 285.3280554 27526.11948 96.47182936
RETRIEVE 34995.8475 15,979,925.25 456.6234679
QUERY 6927.456138 2003843.444 289.26108
UPDATE 286.5544938 72729.09542 253.8054611
REMOVE 542.7794454 55774.73971 102.757649
PERSIST 4586.467796 28756.68658 6.269898288
RETRIEVE 359489.0272 0 0
QUERY 38.24162338 57023.14338 1491.127686
UPDATE 3103.522611 57023.14338 18.37368389
REMOVE 16710.30314 59188.26622 3.542022293
PERSIST 115.8041248 22415.60834 193.5648525
RETRIEVE 9163.032914 4020465.99 438.7702225
QUERY 1613.542369 1881612.139 1166.137422
UPDATE 112.5349315 45536.27554 404.6412516
REMOVE 107.7230397 2666.627712 24.75447889

Summary

Measurements show mostly that traditional benchmarks do not make a sense for airomem. Speed is between 3.5 times (worst case were there was 5k batch at mysql part) to 1400 times faster. But:

Initially I was getting strange results while measuring Airomem - because the system runs in loop every operation (like randomized query) for 30 seconds and counts successfull actions. Counter is int - wih airomem speed it meant int overflows :-). So I had also to limit maximum actions for airomem.

In one test operation count on airomem is 0 ... because it was so fast that in so called warmup time (see jpab code - int range was already exceeeded....).