Navigation

Profile Database

A database profiler gathers statistics about writes, cursors, and commands on one running mongod instance.

Atlas can collect and display statistics from any of your mongod instances. Atlas displays this data in the Profiler section of an instance’s Metrics page. To access an instance’s metrics, click the Metrics button for that instance.

The Profiler displays one aspect, like Operation Execution Time, that could slow database operations over a set time frame. It displays this data in both a chart and a table that each can filter on aspect and time frame.

Considerations

Important

Please read the following considerations before you enable profiling.

Security

Profile data may include sensitive information including the content of database queries. Ensure that exposing this data to Atlas is consistent with your information security practices.

Data Display Limitations

Atlas displays no more than 10,000 data points in the Profiler charts.

Log data is processed in batches. Data can be delayed up to five minutes from realtime.

Enable and Disable Profiling

Atlas enables Profiling by default.

To disable profiling:

  1. Click Project Settings in the left navigation.
  2. Toggle Performance Advisor and Profiler to Off.

Your mongod instance collects profile data for operations longer than the slow operation threshold and report them to Atlas. The threshold for slow operations applies to the entire mongod instance. Atlas sets this threshold to 100 ms. You can’t change this threshold.

Profiler Interface

Profiling Chart

Above the chart, select the metric and time period you want to see.

  1. Select the metric from the Display menu. Accepted options are:
    • Operation Execution Time (default)
    • Keys Examined
    • Docs Returned
    • Examined:Returned Ratio
    • Num Yields
    • Response Length
  2. Select the time period from the View Last menu. Accepted options are:
    • 24 hr (default)
    • 12 hr
    • 6 hr
    • 1 hr
    • 15 min

Profiling Table

Above the table, select the namespace, operation type, and metric you wish to profile:

  1. Click All Namespaces to change which combination of databases and collections to profile.
  2. Click All Operations to change which operations you want to profile.
  3. Click Operation Execution Time to change which metric you want to profile. Accepted options are:
    • Operation Execution Time (default)
    • Keys Examined
    • Docs Returned
    • Examined:Returned Ratio
    • Num Yields
    • Response Length