Navigation

Profile Databases

Note

Available only with Cloud Manager Premium. This feature is available only with Cloud Manager Premium, which comes with certain MongoDB subscriptions. Contact MongoDB for more information.

Overview

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

Cloud Manager can collect and display statistics from any of your mongod instances that have profiling enabled. Cloud Manager displays this data in the Profiler section of an instance’s Metrics page.

Considerations

Important

Please read the following considerations before enabling profiling.

Security

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

system.profile Collection

The MongoDB profiler stores data in the system.profile collection. This is a capped collection with a 1 MB default size. You may increase the size of this collection up to 4 MB.

When collecting data from the profiler, Cloud Manager ignores data about operations on the system.profile collection, such as Monitoring Agent queries of the system.profile collection.

Resource Consumption Impact

The profiler consumes resources which may slow MongoDB performance. Consider the resource impact before enabling profiling.

Data Collection

Every minute, the agent queries the system.profile collection for the last 20 documents created. The agent sends those documents to Cloud Manager.

See also

Database Profiler in the MongoDB Manual.

Cloud Manager samples profile documents until it samples either all documents returned or 4 MB of returned document data. This 4 MB limit may be reached if you increase the collection’s size to 4 MB and your database creates large profiler documents.

The Monitoring Agent tries to minimize its effect on the monitored systems. If polling profile data slows database performance, Cloud Manager throttles how often it collects data.

Leaking Cursors with Monitoring Agent version earlier than 3.8.0.230

If the agent authenticates as a user containing the clusterAdmin role, the agent might leak cursors if you enable profiling. A leaked cursor automatically times out on the server after 10 minutes.

Data Display

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

Time to Propagate

With profiling enabled, configuration changes made in Cloud Manager can take up to 2 minutes to propagate to the agent and 1 more minute before profiling data appears in the Cloud Manager interface.

Enable Profiling and the Collection of Profiling Data

1

Click Deployment, then the Processes tab, then the Topology view.

2

On the line listing the process, click Metrics.

Alternatively, you can click the process.

3

Click the Profiler tab above the charts.

4

Toggle the Profiling button to On.

5

Define slow operations.

By default, profiling collects data for operations that take longer than 100 milliseconds. The threshold for slow operations applies to all databases on the process. To change this threshhold, click the number of milliseconds and enter a new number.

6

Click Review & Deploy to review your changes.

7

Review and approve your changes.

Cloud Manager displays your proposed changes.

  1. If you are satisfied, click Confirm & Deploy.
  2. Otherwise, click Cancel and you can make additional changes.

Enable Collection of Profiling Data

This procedure enables Cloud Manager to collect profiling data from a mongod instance. Separate from enabling Cloud Manager, you must enable each instance’s profiler, either upon deployment or through the setProfilingLevel command. If you are using Automation, set the profile option under Advanced Options to enable profiling upon deployment.

To enabled collection of profiling data from an instance’s active profiler:

1

Click Deployment, then the Processes tab, then the Topology view.

2

Click the ellipses icon for the process and select Monitoring Settings.

3

Click the Profiling tab.

4

Turn on profiling.

Click the button to toggle between Off and On. When the button is On, Cloud Manager receives database profile statistics.

←   View Metrics View Logs  →