@Igor_Solodovnikov
Is this true: you executed tests with Kubernetes operator by MongoDB corp and MongoDB Community Edition and in those tests there were no timing issue?
– Only MongoDB Community Edition and yes there was no timing issue
You mentioned that MongoDB guys have fixed the issue in v5.2. So creation of the first collection can take longer than expected in MongoDB Community edition v4.4 and v5.0. Is this correct?
– No - this is not correct. Fix in 5.2 is related to something else.
Do you see any difference between configurations where mongod instance is installed manually versus mongodb instance installed by Kubernetes operator?
– The only thing which is different is that Percona MongoDB runs additionally with sharding
Do you see any difference between single node mongodb and replica sets?
– I’ve run all setups as replica set
This log only appears in Percona and it looks it is related to sharding :
{“t”:{“$date”:“2022-04-07T22:19:45.814+00:00”},“s”:“I”, “c”:“COMMAND”, “id”:51803, “ctx”:“conn19676”,“msg”:“Slow query”,“attr”:{“type”:“command”,“ns”:“admin.$cmd”,“command”:{“listDatabases”:1,“maxTimeMS”:600000,“lsid”:{“id”:{“$uuid”:“4bb57c87-b141-400e-813b-9c4dc9b621c9”},“uid”:{“$binary”:{“base64”:“8oWwMUVUVSQBi/2N2mrozZM3ydIDKyYq6KEgTWZgcNU=”,“subType”:“0”}}},“$readPreference”:{“mode”:“primaryPreferred”},“$clusterTime”:{“clusterTime”:{“$timestamp”:{“t”:1649369980,“i”:2}},“signature”:{“hash”:{“$binary”:{“base64”:“3xYNVaFfPvki83klykHL+J1Re18=”,“subType”:“0”}},“keyId”:7083883792598827031}},“$audit”:{“$impersonatedUsers”:[{“user”:“percona_slow_0”,“db”:“percona_slow_0”}],“$impersonatedRoles”:[{“role”:“dbOwner”,“db”:“percona_slow_0”}]},“$client”:{“driver”:{“name”:“mongo-java-driver|legacy”,“version”:“3.12.8”},“os”:{“type”:“Windows”,“name”:“Windows 10”,“architecture”:“amd64”,“version”:“10.0”},“platform”:“Java/Oracle Corporation/1.8.0_191-b12”,“mongos”:{“host”:“luz-mongodb01-cluster-mongos-848fc699bc-x6k85:27017”,“client”:“127.0.0.1:52374”,“version”:“4.4.10-11”}},“$configServerState”:{“opTime”:{“ts”:{“$timestamp”:{“t”:1649369980,“i”:2}},“t”:1}},“$db”:“admin”},“numYields”:0,“reslen”:1478317,“locks”:{“ParallelBatchWriterMode”:{“acquireCount”:{“r”:25004}},“ReplicationStateTransition”:{“acquireCount”:{“w”:25004}},“Global”:{“acquireCount”:{“r”:25004}},“Database”:{“acquireCount”:{“r”:25003}},“Collection”:{“acquireCount”:{“r”:125327}},“Mutex”:{“acquireCount”:{“r”:25003}},“oplog”:{“acquireCount”:{“r”:1}}},“storage”:{},“protocol”:“op_msg”,“durationMillis”:5213}}
{“t”:{“$date”:“2022-04-07T22:19:45.826+00:00”},“s”:“I”, “c”:“SH_REFR”, “id”:24101, “ctx”:“ConfigServerCatalogCacheLoader-97”,“msg”:“Refreshed cached database entry”,“attr”:{“db”:“percona_slow_0”,“newDbVersion”:{“uuid”:{“$uuid”:“de9568ea-595e-4ede-b928-6b46bd1b22da”},“lastMod”:1},“oldDbVersion”:{},“durationMillis”:1}}
{“t”:{“$date”:“2022-04-07T22:19:45.827+00:00”},“s”:“I”, “c”:“SHARDING”, “id”:21950, “ctx”:“conn19676”,“msg”:“Setting this node’s cached database version”,“attr”:{“db”:“percona_slow_0”,“newDbVersion”:{“uuid”:{“$uuid”:“de9568ea-595e-4ede-b928-6b46bd1b22da”},“lastMod”:1}}}
=> I will run the whole test with Percona MongoDB Replicaset but without Sharding (if this is possible)
==> Should have done that earlier : as soon as Sharding is enabled, then listDatabases gets called (which kills the performance).