BangDB Throughput for 1B operations [ put and get ]
Goal of this benchmark is to find out the throughput of db where we put data and the get them using multiple connections with all features of the db remain ON. The benchmark is run for BangDB server, however, similarly we can run for embedded as well and the data would be comparable.
We notice that the average throughput of the server was around 250K ops/sec. It started with above 300K mark but soon it goes down to a stable 250K mark. This is because after filling buffer pool for some limit, db starts flushing the data to disk based on the set configuration. Note that the behavior can be changed by tweaking the configurations based on need. The DB at the same time was also flushing WAL logs and checkpointing as well. Unlike many other NoSQLs, BangDB keeps checking and flushing the data in continuous manner as much as possible.
With get, we note that the variability for the ops/sec is much less than when compared to put and it makes sense as with put, we have lots of flushing/write activities also going on. With read too, db does some writing (checkpointing, unflushed logs, or simply log reclaim etc.). The avg throughput is close to 315K ops/sec for get
Put and Get comparison [ race to 100 percent ]
While get is almost a straight line, indicating consistent throughput for entire 1B records, put bends slowly due to increasing writes to the disk
How to run
This is simple benchmark and can be run easily on a commodity or other servers. Minimum requirement to run BangDB is 4GB RAM with 2CPU, however it will good to get better machine to run 1B benchmark.
Also, user may run the benchmark with different number completely, for example, we can run it for 10M records with 32 connections/threads.
The entire code for the benchmark is available at https://github.com/sachin-sinha/BangDB/tree/master/v2.0/bench
Below is the details for running benchmark for Server using java test app