Skip to content

Commit e623319

Browse files
authoredSep 24, 2024
DOCSP-42223-updates-performance-page-v6.0-backport (9379) (#9470)
* DOCSP-42223-updates-performance-page (#9379) * Moves FTDC into its own page * Revises performance page to include Atlas * Updates table of contents to include FTDC page * Removes FTDC link from general perf page * Reformats page to closer match concept template (cherry picked from commit ded49f9) # Conflicts: # source/administration/analyzing-mongodb-performance.txt * Adds permissions include * Remove database profiler section
1 parent 9edd3b1 commit e623319

5 files changed

+174
-139
lines changed
 

‎source/administration/analyzing-mongodb-performance.txt

+14-139
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@ affecting your performance, refer to the :ref:`server-status-locks`
4949
section and the :ref:`globalLock` section of the
5050
:dbcommand:`serverStatus` output.
5151

52+
.. note::
53+
Some ``serverStatus`` response fields are not returned on
54+
{+atlas+} M0/M2/M5 clusters. For more information, see
55+
:ref:`free-shard-commands-with-limits` in the {+atlas+}
56+
documentation.
57+
5258
Dividing :serverstatus:`locks.<type>.timeAcquiringMicros` by
5359
:serverstatus:`locks.<type>.acquireWaitCount`
5460
can give an approximate average wait time for a particular lock mode.
@@ -102,158 +108,27 @@ reuse connections more efficiently. An extremely high number of
102108
connections, particularly without corresponding workload, is often
103109
indicative of a driver or other configuration error.
104110

111+
Self-Managed Connection Limits
112+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
113+
105114
Unless constrained by system-wide limits, the maximum number of
106115
incoming connections supported by MongoDB is configured with the
107116
:setting:`~net.maxIncomingConnections` setting. On Unix-based systems,
108117
system-wide limits can be modified using the ``ulimit`` command, or by
109118
editing your system's ``/etc/sysctl`` file. See :doc:`/reference/ulimit`
110119
for more information.
111120

112-
.. _database-profiling:
113-
114-
Database Profiling
115-
------------------
116-
117-
The :doc:`/tutorial/manage-the-database-profiler` collects detailed
118-
information about operations run against a mongod instance. The
119-
profiler's output can help to identify inefficient queries and
120-
operations.
121-
122-
You can enable and configure profiling for individual databases or for
123-
all databases on a :binary:`~bin.mongod` instance.
124-
Profiler settings affect only a single :binary:`~bin.mongod` instance and
125-
will not propagate across a :term:`replica set` or :term:`sharded
126-
cluster`.
127-
128-
See :doc:`/tutorial/manage-the-database-profiler` for information on
129-
enabling and configuring the profiler.
130-
131-
The following profiling levels are available:
132-
133-
.. include:: /includes/database-profiler-levels.rst
134-
135-
.. include:: /includes/warning-profiler-performance.rst
136-
137-
.. note::
138-
139-
.. include:: /includes/fact-log-slow-queries.rst
140-
141-
.. include:: /includes/extracts/4.2-changes-log-query-shapes-plan-cache-key.rst
142-
143-
.. _ftdc-stub:
144-
145-
Full Time Diagnostic Data Capture
146-
---------------------------------
147-
148-
To help MongoDB engineers analyze server behavior, :binary:`~bin.mongod` and
149-
:binary:`~bin.mongos` processes include a Full Time Diagnostic Data
150-
Capture (FTDC) mechanism. FTDC is enabled by default. Due to its
151-
importance in debugging deployments, FTDC thread failures are fatal and
152-
stop the parent ``mongod`` or ``mongos`` process.
153-
154-
.. important:: FTDC Privacy
155-
156-
FTDC data files are compressed and not human-readable. MongoDB Inc.
157-
engineers cannot access FTDC data without explicit permission
158-
and assistance from system owners or operators.
159-
160-
FTDC data **never** contains any of the following information:
161-
162-
- Samples of queries, query predicates, or query results
163-
- Data sampled from any end-user collection or index
164-
- System or MongoDB user credentials or security certificates
165-
166-
FTDC data contains certain host machine information such as
167-
hostnames, operating system information, and the options or settings
168-
used to start the :binary:`mongod <bin.mongod>` or
169-
:binary:`mongos <bin.mongos>`. This information may be
170-
considered protected or confidential by some organizations or
171-
regulatory bodies, but is not typically considered to be Personally
172-
Identifiable Information (PII). For clusters where these fields were
173-
configured with protected, confidential, or PII data, please notify
174-
MongoDB Inc. engineers before sending the FTDC data so appropriate
175-
measures can be taken.
176-
177-
FTDC periodically collects statistics produced by the following
178-
commands:
179-
180-
- :dbcommand:`serverStatus`
181-
- :dbcommand:`replSetGetStatus` (:binary:`mongod <bin.mongod>` only)
182-
- :dbcommand:`collStats` for the :data:`local.oplog.rs` collection (:binary:`mongod <bin.mongod>` only)
183-
- :dbcommand:`connPoolStats` (:binary:`mongos <bin.mongos>` only)
184-
185-
Depending on the host operating system, the diagnostic data may include
186-
one or more of the following utilization statistics:
187-
188-
- CPU utilization
189-
- Memory utilization
190-
- Disk utilization related to performance. FTDC does not include
191-
data related to storage capacity.
192-
- Network performance statistics. FTDC only captures metadata and
193-
does not capture or inspect any network packets.
194-
195-
.. note::
196-
197-
If the :binary:`~bin.mongod` process runs in a :term:`container`, FTDC
198-
reports utilization statistics from the perspective of the container
199-
instead of the host operating system. For example, if a the
200-
:binary:`~bin.mongod` runs in a container that is configured with RAM
201-
restrictions, FTDC calculates memory utilization against the container's
202-
RAM limit, as opposed to the host operating system's RAM limit.
203-
204-
FTDC collects statistics produced by the following commands on
205-
file rotation or startup:
206-
207-
- :dbcommand:`getCmdLineOpts`
208-
- :dbcommand:`buildInfo`
209-
- :dbcommand:`hostInfo`
210-
211-
:binary:`mongod <bin.mongod>` processes store FTDC data files in a
212-
``diagnostic.data`` directory under the instances
213-
:setting:`storage.dbPath`. All diagnostic data files are stored
214-
under this directory. For example, given a :setting:`~storage.dbPath`
215-
of ``/data/db``, the diagnostic data directory would be
216-
``/data/db/diagnostic.data``.
217-
218-
:binary:`mongos <bin.mongos>` processes store FTDC data files in a
219-
diagnostic directory relative to the :setting:`systemLog.path` log
220-
path setting. MongoDB truncates the logpath's file extension and
221-
concatenates ``diagnostic.data`` to the remaining name. For example,
222-
given a :setting:`~systemLog.path` setting of
223-
``/var/log/mongodb/mongos.log``, the diagnostic data directory would be
224-
``/var/log/mongodb/mongos.diagnostic.data``.
225-
226-
FTDC runs with the following defaults:
227-
228-
- Data capture every 1 second
229-
- 200MB maximum ``diagnostic.data`` folder size.
230-
231-
These defaults are designed to provide useful data to MongoDB Inc.
232-
engineers with minimal impact on performance or storage size. These
233-
values only require modifications if requested by MongoDB Inc. engineers
234-
for specific diagnostic purposes.
235-
236-
You can view the FTDC source code on the
237-
`MongoDB Github Repository <https://github.com/mongodb/mongo/tree/master/src/mongo/db/ftdc>`_.
238-
The ``ftdc_system_stats_*.ccp`` files specifically define any
239-
system-specific diagnostic data captured.
240-
241-
To disable FTDC, start up the :binary:`mongod <bin.mongod>` or
242-
:binary:`mongos <bin.mongos>` with the
243-
``diagnosticDataCollectionEnabled: false`` option specified to the
244-
:setting:`setParameter` setting in your configuration file:
245121

246-
.. code-block:: yaml
122+
{+atlas+} Connection Limits
123+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
247124

248-
setParameter:
249-
diagnosticDataCollectionEnabled: false
125+
{+atlas+} sets the limit for concurrent incoming connections based on
126+
the cluster tier and class. To learn more, see :ref:`<connection-limits>`
127+
in the Atlas documentation.
250128

251-
Disabling FTDC may increase the time or resources required when
252-
analyzing or debugging issues with support from MongoDB Inc. engineers.
253129

254130
.. toctree::
255131
:titlesonly:
256132
:hidden:
257133

258134
Connection Pool </administration/connection-pool-overview>
259-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
.. _self-managed-ftdc:
2+
.. _ftdc-stub:
3+
4+
=================================
5+
Full Time Diagnostic Data Capture
6+
=================================
7+
8+
.. facet::
9+
:name: genre
10+
:values: reference
11+
12+
.. default-domain:: mongodb
13+
14+
.. contents:: On this page
15+
:local:
16+
:backlinks: none
17+
:depth: 1
18+
:class: singlecol
19+
20+
To help MongoDB engineers analyze server behavior, :binary:`~bin.mongod` and
21+
:binary:`~bin.mongos` processes include a Full Time Diagnostic Data
22+
Capture (FTDC) mechanism. FTDC is enabled by default. Due to its
23+
importance in debugging deployments, FTDC thread failures are fatal and
24+
stop the parent ``mongod`` or ``mongos`` process.
25+
26+
Behavior
27+
--------
28+
29+
.. note:: FTDC User Permissions on Windows
30+
31+
.. include:: /includes/fact-ftdc-windows-user-permissions.rst
32+
33+
FTDC periodically collects statistics produced by the following
34+
commands:
35+
36+
- :dbcommand:`serverStatus`
37+
- :dbcommand:`replSetGetStatus` (:binary:`mongod <bin.mongod>` only)
38+
- :dbcommand:`collStats` for the :data:`local.oplog.rs` collection (:binary:`mongod <bin.mongod>` only)
39+
- :dbcommand:`connPoolStats` (:binary:`mongos <bin.mongos>` only)
40+
41+
Depending on the host operating system, the diagnostic data may include
42+
one or more of the following utilization statistics:
43+
44+
- CPU utilization
45+
- Memory utilization
46+
- Disk utilization related to performance. FTDC does not include
47+
data related to storage capacity.
48+
- Network performance statistics. FTDC only captures metadata and
49+
does not capture or inspect any network packets.
50+
51+
.. note::
52+
53+
If the :binary:`~bin.mongod` process runs in a :term:`container`, FTDC
54+
reports utilization statistics from the perspective of the container
55+
instead of the host operating system. For example, if a the
56+
:binary:`~bin.mongod` runs in a container that is configured with RAM
57+
restrictions, FTDC calculates memory utilization against the container's
58+
RAM limit, as opposed to the host operating system's RAM limit.
59+
60+
FTDC collects statistics produced by the following commands on
61+
file rotation or startup:
62+
63+
- :dbcommand:`getCmdLineOpts`
64+
- :dbcommand:`buildInfo`
65+
- :dbcommand:`hostInfo`
66+
67+
FTDC Data Files
68+
~~~~~~~~~~~~~~~
69+
70+
:binary:`mongod <bin.mongod>` processes store FTDC data files in a
71+
``diagnostic.data`` directory under the instances
72+
:setting:`storage.dbPath`. All diagnostic data files are stored
73+
under this directory. For example, given a :setting:`~storage.dbPath`
74+
of ``/data/db``, the diagnostic data directory would be
75+
``/data/db/diagnostic.data``.
76+
77+
:binary:`mongos <bin.mongos>` processes store FTDC data files in a
78+
diagnostic directory relative to the :setting:`systemLog.path` log
79+
path setting. MongoDB truncates the logpath's file extension and
80+
concatenates ``diagnostic.data`` to the remaining name. For example,
81+
given a :setting:`~systemLog.path` setting of
82+
``/var/log/mongodb/mongos.log``, the diagnostic data directory would be
83+
``/var/log/mongodb/mongos.diagnostic.data``.
84+
85+
FTDC Privacy
86+
~~~~~~~~~~~~
87+
88+
FTDC data files are compressed and not human-readable. They inherit
89+
the same file access permissions as the MongoDB data files. Only
90+
users with access to FTDC data files can transmit the FTDC data.
91+
92+
MongoDB engineers cannot access FTDC data without explicit
93+
permission and assistance from system owners or operators.
94+
95+
FTDC data **never** contains any of the following information:
96+
97+
- Samples of queries, query predicates, or query results
98+
- Data sampled from any end-user collection or index
99+
- System or MongoDB user credentials or security certificates
100+
101+
FTDC data contains certain host machine information such as
102+
hostnames, operating system information, and the options or settings
103+
used to start the :binary:`mongod <bin.mongod>` or
104+
:binary:`mongos <bin.mongos>`. This information may be
105+
considered protected or confidential by some organizations or
106+
regulatory bodies, but is not typically considered to be Personally
107+
Identifiable Information (PII). For clusters where these fields are
108+
configured with protected, confidential, or PII data, please notify
109+
MongoDB engineers before sending FTDC data to coordinate
110+
appropriate security measures.
111+
112+
Details
113+
-------
114+
115+
You can view the FTDC source code on the
116+
`MongoDB Github Repository <https://github.com/mongodb/mongo/tree/master/src/mongo/db/ftdc>`_.
117+
The ``ftdc_system_stats_*.ccp`` files specifically define any
118+
system-specific diagnostic data captured.
119+
120+
FTDC Defaults
121+
~~~~~~~~~~~~~
122+
123+
FTDC runs with the following defaults:
124+
125+
- Data capture every 1 second
126+
- 200MB maximum ``diagnostic.data`` folder size.
127+
128+
These defaults are designed to provide useful data to MongoDB
129+
engineers with minimal impact on performance or storage size. These
130+
values only require modifications if requested by MongoDB engineers
131+
for specific diagnostic purposes.
132+
133+
Disable FTDC
134+
~~~~~~~~~~~~
135+
136+
To disable FTDC, start up the :binary:`mongod <bin.mongod>` or
137+
:binary:`mongos <bin.mongos>` with the
138+
``diagnosticDataCollectionEnabled: false`` option in the
139+
:setting:`setParameter` settings of your configuration file:
140+
141+
.. code-block:: yaml
142+
143+
setParameter:
144+
diagnosticDataCollectionEnabled: false
145+
146+
Disabling FTDC may increase the time or resources required when
147+
analyzing or debugging issues with support from MongoDB engineers.
148+
For information on MongoDB Support, visit `Get Started With MongoDB Support <https://www.mongodb.com/support/get-started?tck=docs_server>`_.
149+

‎source/administration/self-managed-performance.txt

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ Self-Managed Performance
1313
Disable Transparent Hugepages </tutorial/transparent-huge-pages>
1414
Health Managers </administration/health-managers>
1515
UNIX ulimit </reference/ulimit>
16+
Full Time Diagnostic Data Capture </administration/full-time-diagnostic-data-capture>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
On Windows, to collect system data such as disk, cpu, and memory, FTDC requires Microsoft access permissions from the following groups:
2+
3+
- Performance Monitor Users
4+
5+
- Performance Log Users
6+
7+
If the user running :binary:`mongod <bin.mongod>` and :binary:`mongos
8+
<bin.mongos>` is not an administrator, add them to these groups to log
9+
FTDC data. For more information, see `the Microsoft documentation here <https://learn.microsoft.com/en-us/windows/win32/perfctrs/restricting-access-to-performance-extension--dlls>`_.

‎source/tutorial/manage-the-database-profiler.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.. _database-profiler:
2+
.. _database-profiling:
23

34
=================
45
Database Profiler

0 commit comments

Comments
 (0)
Please sign in to comment.