Avoid OOM killer While taking MongoDump

In this blog we can see about how to avoid OOM (Out Of Memory) killer while taking MongoDump, So I have analysed and provided proper solutions.

Explain about MongoDump :-

  • MongoDump tool is part of the MongoDB tools package.
  • It is a utility for creating a binary export of the contents of a database.
  • It can read data from either mongod or mongos instance,in addition or reading directly from MongoDB data files without an active mongod.
  • If you take backup all the databases in a cluster you should have the backup role which provided the required privileges for backing in all databases.

Experimental scenario :-

Mongo running with below mentioned hardware configuration.

CPU : 8

RAM : 15 GB

Data size : 70 GB (compressed)

In Default Wired tiger storage Engine use around 8 GB of total RAM.

At that same time Wired tiger cache use around 6 GB ( That is the size of the currently in the cache)

Overall usage around 14 GB so remaining 1 GB is available.

FYI, Here i have attached PMM graphs screen shot.

If we initiated MongoDump without any option by default it starts with parallel four collection at one time so available memory is not enough to allocate the dump process so it leads to OOM killer.

  • We can use numParallelCollections options to reduce parallel collections.
  • So the memory consumption also reduced.
--numParallelCollections= 1

If we use this option while taking MongoDump, we can avoid OOM killer.

Conclusion :-

I hope this blogs will helps you to avoid OOM killer, so prioritize to use for this option.

Published by arunkumarblog

RHCE Linux RedHat Certified Professionals,Working on MongoDB and MySQL Database Administrator.

2 thoughts on “Avoid OOM killer While taking MongoDump

Leave a reply to Vishwanath Cancel reply

Design a site like this with WordPress.com
Get started