After upgrading MongoDB from version 4.x to 7.x with feature compatibility set to 6.0 write ops slow

Dear Percona Support Team,

We recently upgraded our MongoDB cluster from version 4.4 to 7.x, and since the upgrade, we have been experiencing significant write performance issues. The write operations, which previously completed in a timely manner, are now taking considerably longer. This is severely impacting our application’s performance and user experience. FCV set to 6.0

Details:

  • MongoDB Version: Upgraded from 4.4 to 7.x
  • Cluster Configuration:
    • Number of nodes: 5
    • Replica Set: Yes
    • Sharding: [No]
    • Deployment Environment: [e.g., On-premise, AWS, etc.] AWS
  • Symptoms:
    • Write latency has increased significantly across all nodes.
    • Logs indicate several warnings related to writeConcernMajorityJournalDefault and cache evictions.
    • Schema locks are more frequent, causing contention and delays in write operations.

Steps Taken:

  • Reviewed and adjusted writeConcern settings, but the issue persists.
  • Analyzed mongostat and mongotop outputs, which confirm the degraded write performance.
  • Restarted nodes to check for any temporary relief, but the issue remains.
  • No significant issues were present in the logs before the upgrade.

Mongo has a history of becoming slower every release. In your case the biggest change is “majority” is the default write concern since 5.0. You should adjust that parameter at replica set level. See https://www.mongodb.com/docs/manual/reference/command/setDefaultRWConcern/#mongodb-dbcommand-dbcmd.setDefaultRWConcern and set it back to 1.

Hi @Ivan_Groenewold thanks for your response. Despite setting the default write concern to ‘w: 1’, we’re still experiencing write performance issues. Downgrading to MongoDB 5.x resolved the problem, but it persisted in 6.x.

Are there any other configurations or adjustments we might have missed?