MongoDB Upgrade to 5.+ latency issues

Hi, We upgraded 15 clusters from mongoDB version 4.4 to 5.0.28 and after one day to version 6.0.16.

In 3 clusters we are experiencing high latency on writes.

Cluster details :

7 nodes: 2 in AWS domain controller - Oregon (uw2-edt-01), another 3 are in AWS domain controller - 42, Virginia (uw2-est-01) , and the last 2 are in AWS domain controller -Ireland (eu-west-1)

  • We have latency only on write operations.
  • After day or two we changed the following parameters :
  1. allowDiskUseByDefault - False
  2. Write concern, from Majority to w: 2, j: true, wtimeout: 5000.

We noticed significant improvement, however we still have latency issues, compared to version 4.4.

We did change the write concern to w:1, but we still have significant latency issues between the versions.

What else can we check? Maybe this is an insert/upsert issue.

I also have this further questions :

  1. noticing a lot of this INFO in our slow log :
    msg":“Slow query”,“attr”:{“type”:“command”,“ns”:“config.$cmd”,“command”:{“update”:“system.sessions”,“ordered”:false,“allowImplicitCollectionCreation”:false,“writeConcern”:{“w”:“majority”,“wtimeout”:15000},“$db”:“config”},“numYields”:0,“reslen”:1124,“locks”:{“ParallelBatchWriterMode”:{“acquireCount”:{“r”:1784}},“ReplicationStateTransition”:{“acquireCount”:{“w”:0}},"
  • why these logs appears so many times ? also we changed the default writeConcern to w:2. So why we noticing it in this log as : “w”:"majority ?
  1. There is a different between write commands that are more fast than others, for example : FINDANDMODIFY vs Insert vs Upsert?

Can you please advise how we can make it better ?