From 4703c4a9831a975f809c3393ecc1f9fe7c26d0f8 Mon Sep 17 00:00:00 2001 From: ravind Date: Wed, 30 Mar 2016 10:44:04 -0400 Subject: [PATCH] DOCS-7536 - Profiler defaults to off or '0' --- source/reference/command/profile.txt | 15 ++++++++++----- source/tutorial/manage-the-database-profiler.txt | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/source/reference/command/profile.txt b/source/reference/command/profile.txt index f6196b6be49..ebde3090f54 100644 --- a/source/reference/command/profile.txt +++ b/source/reference/command/profile.txt @@ -17,8 +17,13 @@ profile data regarding performance. The database profiling system can impact performance and can allow the server to write the contents of queries to the log. Your deployment should carefully consider the - security implications of this. - Consider the following prototype syntax: + security implications of this. The profiler is off by default. + + .. |command| replace:: ``profile`` + + .. include:: /includes/fact-dbcommand.rst + + The :dbcommand:`profile` command has the following syntax: .. code-block:: javascript @@ -30,7 +35,7 @@ profile **Level** **Setting** --------- ---------------------------------------------- -1 No change. Returns the current profile level. - 0 Off. No profiling. + 0 Off. No profiling. The default profiler level. 1 On. Only includes slow operations. 2 On. Includes all operations. ========= ============================================== @@ -58,7 +63,7 @@ profile .. note:: - This command obtains a write lock on the affected database and will - block other operations until it has completed. However, the write + This command obtains a write lock on the affected database and + blocks other operations until it has completed. However, the write lock is only held while enabling or disabling the profiler. This is typically a short operation. diff --git a/source/tutorial/manage-the-database-profiler.txt b/source/tutorial/manage-the-database-profiler.txt index 7bee7389d79..e1f7f61e919 100644 --- a/source/tutorial/manage-the-database-profiler.txt +++ b/source/tutorial/manage-the-database-profiler.txt @@ -16,7 +16,7 @@ The database profiler collects fine grained data about MongoDB write operations, cursors, database commands on a running :program:`mongod` instance. You can enable profiling on a per-database or per-instance basis. The :ref:`profiling level ` is also -configurable when enabling profiling. +configurable when enabling profiling. The profiler is *off* by default. The database profiler writes all the data it collects to the :data:`system.profile <.system.profile>` collection, which @@ -43,7 +43,7 @@ The following profiling levels are available: - ``0`` - the profiler is off, does not collect any data. :program:`mongod` always writes operations longer than the :setting:`~operationProfiling.slowOpThresholdMs` threshold - to its log. + to its log. This is the default profiler level. - ``1`` - collects profiling data for slow operations only. By default slow operations are those slower than 100 milliseconds.