I’m facing slowness in mongodb because of the listDatabase command fired by the monitoring tool . Can any of you please suggest why the listDatabase command takes more time and sometimes it hangs when concurrency increase listdatabase_strace.log (49.8 KB)
. Any inputs so that I can check further.
since it was determined that when listing a large number of databases, calculating the sizes was quite time consuming.
If the monitoring tool you’re using does not permit changing the listDatabases command to show only the names, you might want to raise this issue with the creator of that tool, since it’s a pretty big performance hit if there are a lot of databases like in your case.
Since the nameOnly parameter is only added in MongoDB version 3.2.13 and newer, unfortunately you would have to upgrade to it.
The last release in the 3.2 branch is 3.2.22 in Dec 2018, but please consider upgrading to a supported MongoDB version. At this time of writing, it means at least the 4.2 series.