Agenda

This document provides a brief about various performance enhancements that can be configured on Mongo DB to improve performance 


Production checklist operations

Link: https://docs.mongodb.com/manual/administration/production-checklist-operations/

Increase the MongoDB memory

Step 1: Execute the below command to get a list of parameters

db.adminCommand({getParameter: ‘*’})

Step 2: Check the value of the field "internalQueryExecMaxBlockingSortBytes", it defaults to be about 33,554,432 bytes (32MB)

Step 3: Increase the memory using the below command

db.adminCommand({"setParameter":1,"internalQueryExecMaxBlockingSortBytes": 104857600})

For version > 4.3.X

db.adminCommand({"setParameter":1,"internalQueryMaxBlockingSortMemoryUsageBytes": 104857600})

Verify the ulimit configuration in the server 

Mongo recommended values:

  • -f (file size): unlimited

  • -t (cpu time): unlimited

  • -v (virtual memory): unlimited

  • -l (locked-in-memory size): unlimited

  • -n (open files): 64000

  • -m (memory size): unlimited

  • -u (processes/threads): 64000

Link: https://docs.mongodb.com/manual/reference/ulimit/