BangDB vs BerkleyDB and LevelDB

Performance Comparison

The aim of the paper is to analyze the Bandb DB performance vis a vis Oracle BerkleyDB and Google Leveldb. Since all these dbs are key value store and comes in similar embedded flavor, hence comparing these three dbs performance in various conditions would throw some light to the user for them to see how Bangdb fares against the other dbs in the market

The comparison has been done on the similar grounds for all the dbs to measure the data as crisply as possible. Since leveldb supports one access method (tree based) hence we have used same across all tests. Also the best write performance by LevelDB is achieved using single thread and best read performance by using 4 threads(on 4 CPU machine), hence we have used the best possible numbers for all these dbs. For BangDB and BDB we have used 4 threads for both read and write. We have again used the same configuration of the machine and the db for all the dbs for the comparison analysis

Following machine (commodity hardware) used for the test;

  • Model : 4 CPU cores, Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz, 64bit
  • CPU cache : 6MB
  • OS : Linux, 3.0.0-17-generic, Ununtu, x86_64
  • RAM : 8GB
  • Disk : 500GB, 7200 RPM, 16MB cache
  • File System: ext4

The Bangdb configuration;

  • Key size : 24 bytes - random
  • Val size : 100 - 400 bytes - randomly picked
  • Page size : 8KB
  • Write ahead log : ON
  • Log split check : ON, check every 30 ms
  • Buffer pool size : 1 GB
  • Background log flush : every 50 ms
  • Checkpointing : every ~4 sec
  • Buffer pool background work : ON, every 60 ms
  • Number of concurrent threads : 4
  • Volume of data written : 30 MB – 600 MB (without compression)
  • Volume of log written : 50 MB – 1000 MB (if Log = ON) (without compression)

Other parameters;

  • Write and Read : Random, continuous
  • Num of ops : 100K to 2M
  • LevelDB write Buffer : 512MB
  • LevelDB Cache : 1GB
  • Berkley DB Buffer : 1GB

Now check out the results

The write and read comparison with bdb and leveldb. Here the buffer pool size is just as much to fit all the data that we write. Hence very few overflow will occur. The log is enabled for dbs. We allocated 1GB as buffer pool and write well within the limit. Following stat is for the btree as access method; The results for ehash is also similar but since Leveldb as only tree as access method hence we restrict to that for the comparison

Now we will see the same results for HASH based access method. Since LevelDB doesn't support Hash based indexing hence we will just compare with the BerkleyDB

To see the detailed comparison report, please download the comparison white paper

To check out the BangDB vs LevelDB detailed performance comparison please visit following;

BangDB vs LevelDB and BerkeleyDB - HighScalability

BangDB Server vs Redis - Gridquorum