Hi All ,
I’m facing performance issue cause of db.printSlaveReplicationInfo() command in very old version of mongodb . Can anyone please suggest if there is any known issue for similar case.
MongoDB Version : 3.2.1 - We know, this is a very old version and on it to upgrade
namespace operation pattern count min (ms) max (ms) 95%-ile (ms) sum (ms) mean (ms) allowDiskUse
local.system.replset count {} 227 101 2052311 8187.7 4786039 21083.9 None
local.oplog.rs query None 77 107 3346 2682.8 105609 1371.5 None
local.system.replset query None 44 195 16021 2829.9 74833 1700.8 None
Strace logs :
strace -i -t -f mongo --quiet --eval “db.printSlaveReplicationInfo()” as per logs it took around 10 mins to print the response,
execve("/usr/bin/mongo", ["mongo", "--quiet", "--eval", "db.printSlaveReplicationInfo()"], [/* 23 vars */]) = 0
[pid 15343] 01:52:22 [00000033b9e0ed5c] sendto(3, "Y\0\0\0\2\0\0\0\0\0\0\0\332\7\0\0local\0count\0008\0\0\0"..., 89, MSG_NOSIGNAL, NULL, 0) = 89
[pid 15343] 01:52:22 [00000033b9e0ebdc] recvfrom(3,
"?\0\0\0N\23;\10\2\0\0\0\333\7\0\0", 16, MSG_NOSIGNAL, NULL, NULL) = 16
[pid 15343] 02:04:21 [00000033b9e0ebdc] recvfrom(3, "*\0\0\0\22waitedMS\0\0\0\0\0\0\0\0\0\20n\0\1\0\0\0\1ok"..., 47, MSG_NOSIGNAL, NULL, NULL) = 47
[pid 15343] 02:04:21 [00000033b9e0ed5c] sendto(3, "K\0\0\0\3\0\0\0\0\0\0\0\332\7\0\0admin\0replSetGet"..., 75, MSG_NOSIGNAL, NULL, 0) = 75
[pid 15343] 02:04:21 [00000033b9e0ebdc] recvfrom(3, "(\4\0\0R\23;\10\3\0\0\0\333\7\0\0", 16, MSG_NOSIGNAL, NULL, NULL) = 16
[pid 15343] 02:04:21 [00000033b9e0ebdc] recvfrom(3, "\23\4\0\0\2set\0\n\0\0\0vinay1\0\tdate\0006\304\216"..., 1048, MSG_NOSIGNAL, NULL, NULL) = 1048
[pid 15343] 02:04:21 [00000033b9adae84] fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
[pid 15343] 02:04:21 [00000033b9ae531a] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fa3a18ee000
[pid 15343] 02:04:21 [00000033b9adb57d] write(1, "source: abcc.o"..., 41source: abcc.org:27017
) = 41
[pid 15343] 02:04:21 [00000033b9adae35] stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2294, ...}) = 0
[pid 15343] 02:04:21 [00000033b9adb57d] write(1, "\tsyncedTo: Tue Mar 08 2022 01:20"..., 51 syncedTo: Tue Mar 08 2022 01:20:34 GMT-0600 (CST)
) = 51
[pid 15343] 02:04:21 [00000033b9adb57d] write(1, "\t2626 secs (0.73 hrs) behind the"..., 42 2626 secs (0.73 hrs) behind the primary
) = 42
[pid 15343] 02:04:21 [00000033b9adb57d] write(1, "source: abc.o"..., 41source: abc.org:27017
) = 41
[pid 15343] 02:04:21 [00000033b9adae35] stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2294, ...}) = 0
[pid 15343] 02:04:21 [00000033b9adb57d] write(1, "\tsyncedTo: Mon Mar 07 2022 20:02"..., 51 syncedTo: Mon Mar 07 2022 20:02:11 GMT-0600 (CST)
) = 51
[pid 15343] 02:04:21 [00000033b9adb57d] write(1, "\t21729 secs (6.04 hrs) behind th"..., 43 21729 secs (6.04 hrs) behind the primary
) = 43