top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

MongoDB: How we can reduce the Load spikes that is happening in database ?

+1 vote
382 views
MongoDB: How we can reduce the Load spikes that is happening in database ?
posted Aug 6, 2016 by Mandeep Sehgal

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

Typically, you will need to review the logs as well as run the mongodb diagnostic tools such as mongotop,mongostat and mongoperf in order to determine the cause of the spikes. Mtools is another great diagnostic tool.
With knowledge of the cause of the spikes, it becomes easier to address the problem.

answer Sep 22, 2016 by Manikandan J
Similar Questions
+1 vote

We Have a 3 node mongodb setup with a primary,secondary and an arbiter. If a Primary node goes down the election process to choose a new primary is taking around 30 seconds. During this period all the Create and Update operations fail. So is there anyway to reduce this failover time so that the client application can resume normal operations in less time.

What is the ideal way to handle Create and Update failures during the failover time? Should it be queued and retried? if the number of operations are high the queue size will not be enough. So please suggest a solution for this problem.If the failover time can be reduced it would solve this problem.

We tried reducing the heartbeat interval in the replica configuration. It did not help either

0 votes

db.Job.insert({"job_Title" : "Website", "job_Location" : "Kolkata", "salary" : "40000", "company" : "ROHIT", "department" : { "$ref": "department", "$id": ObjectId("579302282d180c1b80be65ec"), "$db": "test"}, "status":"Act"})
var job = db.Job.findOne({"company":"LOKI"})
var dep = job.department db[dep.$ref].findOne({"_id":(dep.$id)})

How we write this mongoDB shell query in Java program for insert and find Document?

...