[DOCS-5426] Reduce ambiguity between per-DB and instance-wide profiling Created: 13/May/15  Updated: 30/Oct/23  Resolved: 18/Jan/18

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Minor - P4
Reporter: Akira Kurogane Assignee: Kay Kim (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 6 years, 4 weeks ago

 Description   

I understand now that

  1. The mongod process ensures instance-wide profiling by using the --profile command line argument or operationProfiling.mode config file setting and
  2. The db.setProfilingLevel() command only affects a single database

but when I read http://docs.mongodb.org/manual/reference/configuration-options/ earlier I skipped to certain sections and the behaviour was ambiguous for a while

At the top of the page you might read this:

You can enable profiling on a per-database or per-instance basis.

but then if you take the link to subsection "Enable Database Profiling and Set the Profiling Level" you will see the db-specific version only. At this stage if you don't know that the instance-wide profiling can only enabled with a startup option it's hard to figure out whether the db.setProfiling() command is talking about database-level or instance-level. I know it says "Database profiling" but the distinction between a single db namespace and a whole database server is routinely ignored in database manuals.

In short, after arriving on page and both reading the summary at the top and then jumping to the section that looks relevant it was confusing whether the command was for one db or instance-wide.

One idea I suggestion I have is to change:

You can enable profiling on a per-database or per-instance basis.

to

"You can enable or disable profiling on per-database basis by using the db.setProfilingLevel command, or you can force it to be on for all databases in a mongod instance by using a startup option."



 Comments   
Comment by Akira Kurogane [ 18/Jan/18 ]

I see the content has moved around since I created this ticket. I will close as 'Fixed'.

Comment by Akira Kurogane [ 14/May/15 ]

And a third request:

The documentation is clear about whether setting slowms is instance-wide or database-specific.

Specify the Threshold for Slow Operations

The threshold for slow operations applies to the entire mongod instance. When you change the threshold, you change it for all databases on the instance.

But just so it's easier to find it could "slowms" be worked into that paragraph? E.g.

"When you change the <tt class='literal'>slowms</tt> threshold value, you change ...."

That way it wont be missed by people grep'ing their way through the page. Also Google is more likely to show that as the link preview content when you do a search for "mongodb slowms per-database" or something like that.

Comment by Akira Kurogane [ 13/May/15 ]

Also one extra note:

For example, to enable profiling for all database operations, consider the following operation in the mongo shell:

May I suggest changing it to: "For example, to enable profiling for all operations in a database, consider ...". Once again this would just be to avoid misleading readers into thinking db.setProfilingLevel() is for all dbs.

Generated at Thu Feb 08 07:50:17 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.