Benchmark - Bangdb Embedded Write Ahead Log

Bangdb implements write ahead logging to make the database robust. The db write each and every write operation to the log and updates the data in the buffer pool only. On one hand this enables db to avoid going to disk for all it's operations and deal with the data in RAM. But on the other hand it adds the overhead of writing to the log file and then for durability flush the log to the disk on continuous/continual basis. Hence this section is to analyse the effect of write ahead log on the proformance of bangdb

To summarize, the average values for the throughput(ops/sec) over the 100K – 1M operations for bangdb with log enabled and log disabled are shown below;

Index (Access Method) Log - OFF Log - OFF
Write (ops/sec) Read (ops/sec) Write (ops/sec) Read (ops/sec)
Btree 375,000 670,000 500,000 640,000
Hash 350,000 1,125,000 530,000 1,100,000

The following figure shows how the operations per second fares with the number of operations. A million IOPS would write around 1 GB data including log files in this case

This is for Btree type access, with log on and off for both write and read

This is for Ehash type access, with log on and off for both write and read

Note that for log switch off, since there is no write to log file in 'read' case, hence we see the performance equal irrespective of whether log is on or off