I am comparing read and write performance between Berkeley DB and H2 DB. What would be a correct way to make this comparison? Currently my test code checks time taken to make 10000 puts and 10000 gets and for H2 db 10000 inserts and 10000 select. The data size being inserted is approximately same but the time difference is too large.
Asked
Active
Viewed 674 times
0
-
1Make the test orders of magnitude larger to force disk operations. With mere 10000 operations, one of the DBs could be caching everything in memory, and it's disk access that makes almost all the difference. – Joonas Pulakka Feb 04 '12 at 07:52
-
1Such benchmarks depend on many factors. Memory (cache), the exact way data is persisted (whether the transaction log is flushed, whether fsync is called), whether the JIT kicked in, and so on. It's relatively hard to make a 'fair' benchmark. – Thomas Mueller Feb 04 '12 at 13:27