Hi Team, we have a performance regression test of 600k operations on a Schema, containing 3 tables with 100 records each. The operations include 200k update, 200k delete and 200k insert operations. Average document size is around 500 bytes.
On the most recent MongoDB community servers, such as 7.0.15 and 8.0.1 under the replicaSet setup, we have recently observed a decline in performance. Compared to the mongoDB community server 4.4.29, the performance has decreased by over 50%. We checked earlier versions of MongoDB, including 5.0.30, which also exhibits the same degradation.
System Configuration :
2 core CPU with 32 GB Ram
MongoDB Configuration :
- The replicaSet configuration was same for all the versions of mongoDB community server including 1 Primary node and 2 secondary node, all running on the same machine to eliminate network latency.
- The writeConcern was set to 0.
- 10,000 bulk operations were performed at once.
mongoDB 4.4.29
The commit transaction processed [600,001] operations in [633] seconds, with a rate of [947] operations per second.
mongoDB 8.0.1
The commit transaction processed [590,001] operations in [1,053] seconds, with a rate of [560] operations per second.
code snippet :
session.startTransaction();
getMongoClient()
.getDatabase(tableNamesArray[0])
.getCollection(tableNamesArray[1])
.bulkWrite(writeModels.get(tableName));
session.commitTransaction();