MongoDB profiler is an internal tool that enables DBAs and developers to collect information about executed MongoDB requests.
Profiler has three levels:
0 – profile is off
1 – profiler collects information on slow requests
2 – profiler collects all information
For production purposes level 1 is what DBA needs. In general, it is best to set it to some reasonable SLA required threshold, like 1,000 milliseconds (1 second), etc.
Level 2 is best for development purposes to get a complete log of executed requests.
Below is the list of profile related commands:
# set profiling to level 1 capture requests with duration over 500 ms
db.setProfilingLevel(1,500)
#get current profiler level
db.getProfilingLevel()
# get current profiler settings
MongoDB Enterprise > db.getProfilingStatus()
{ "was" : 1, "slowms" : 500 }
To return operations slower than 500 milliseconds, run a query similar to the following:
db.system.profile.find( { millis : { $gt : 50 } } ).pretty()
Enteros UpBeat High Load Capture continuously captures history of executed mongodb requests across all collection as well as other mongo db, OS, SAN and other operational statistics across muliple systems.
When the spike is identified, it can be cross-correlated across MongoDB nodes and correlated with MongoDB requests. A detailed report is generated to pinpoint what requests are were active during the problem time.
Also, please check my presentation on MongoDB performance tuning
The views expressed on this blog are those of the author and do not necessarily reflect the opinions of Enteros Inc. This blog may contain links to the content of third-party sites. By providing such links, Enteros Inc. does not adopt, guarantee, approve, or endorse the information, views, or products available on such sites.
Are you interested in writing for Enteros’ Blog? Please send us a pitch!
RELATED POSTS
How Intelligent Database Analytics Maximizes Cloud ROI Through FinOps
- 23 July 2026
- Software Engineering
Introduction Cloud adoption has transformed how enterprises build, scale, and operate modern applications. Organizations across banking, financial services, healthcare, education, retail, SaaS, and technology sectors are increasingly moving mission-critical workloads to cloud environments to improve agility, scalability, and innovation. However, while cloud platforms provide flexibility, they also introduce new financial and operational challenges. Uncontrolled resource … Continue reading “How Intelligent Database Analytics Maximizes Cloud ROI Through FinOps”
How to Optimize Higher Education Technology with Enteros Database Software, Operational Intelligence, and AI-Powered Analytics
Introduction Higher education institutions are rapidly transforming into digital-first organizations. Universities, colleges, research institutions, and online learning providers rely on advanced technology to support student success, academic excellence, research innovation, and administrative efficiency. From admissions and enrollment to learning management systems, student information systems, financial aid, research platforms, and campus operations, virtually every academic and … Continue reading “How to Optimize Higher Education Technology with Enteros Database Software, Operational Intelligence, and AI-Powered Analytics”
The Role of AI-Powered Database Monitoring in Building Resilient Enterprise Applications
Introduction Enterprise applications have become the backbone of modern business operations. Financial institutions process millions of digital transactions every day, healthcare providers rely on Electronic Health Records (EHR) to deliver quality patient care, retailers manage global e-commerce platforms, and universities support thousands of students through cloud-based learning systems. In every industry, application reliability has become … Continue reading “The Role of AI-Powered Database Monitoring in Building Resilient Enterprise Applications”
How to Optimize Logistics and Supply Chain Operations with Enteros Database Software, AI Analytics, and Database Observability
Introduction Global supply chains have become more complex, data-intensive, and time-sensitive than ever before. Logistics providers, manufacturers, retailers, distributors, and eCommerce companies must coordinate transportation networks, warehouses, inventory, suppliers, and customer deliveries across multiple regions and channels. Every shipment, inventory update, route change, warehouse transaction, and customer order depends on enterprise databases operating with speed, … Continue reading “How to Optimize Logistics and Supply Chain Operations with Enteros Database Software, AI Analytics, and Database Observability”