Performance degradation from java driver version 3.10.1 to 5.1.1

Hi Team,

Our application was responsible for writing documents to MongoDB. We recently updated the Java driver from version 3.10.1 to 5.1.1. Following the upgrade, we noticed a notable decline in performance.

With the same application code base, with driver 3.10.1 it processed 1.40MB/sec where as driver 5.1.1 processed only 1.19MB/sec.
Maven artifacts used are:

 <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongodb-driver-sync</artifactId>
            <version>5.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongodb-driver-legacy</artifactId>
            <version>5.0.1</version>
            <scope>provided</scope>
        </dependency>

Can you provide assistance with this matter? Are there any additional configurations that need to be adjusted to enhance performance?

Hi @Sabareesh_Babu , there is nothing I’m aware of that would explain this drop. If you could provide a standalone benchmark that demonstrates the issue, we can look into it.

Regards,
Jeff Yemin