In this post I want to highlight the impact of underlying disk configuration on the performance of Berkeley DB (BDB).
The performed test run are as below:
1. The BDB is B_TREE. It has only Key and not data. Key length is 24 bytes.
2. A random key is generated it is looked up for existence in the db, if it does not exist in db, it is added in the db.
3. Same set of keys in same sequence were generated for below tests.
4. First the performance was calculated on db stored on a single hard disk.
5. Then same performance test were done on db stored on single SSD.
6. Last the performance test were done on db stored on striped volume consisting 3 disks.
Check the plotting of performance graph:
The x-axis in the graph has Size in TB, translate the 1 unit on x axis to ~ 8 million unique keys in BDB.
These tests were done to decide a storage appliance configuration. To keep the cost of appliance low we decided to use striped volume instead of SSD. We can get even better performance if the DB is stored on striped volume created on top of SSDs.