[DOCS-10003] Clarification needed for serverStatus globalLock.activeClients.total Created: 16/Mar/17  Updated: 30/Oct/23  Resolved: 30/Oct/17

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

Type: Task Priority: Major - P3
Reporter: Stennie Steneker (Inactive) Assignee: Stennie Steneker (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-28494 Fix globalLock.activeClients.total se... Closed
Related
Participants:
Days since reply: 6 years, 15 weeks, 2 days ago

 Description   

According to the serverStatus documentation globalLock.activeClients.total is:

The total number of active client connections to the database (i.e., the sum of globalLock.activeClients.readers and globalLock.activeClients.writers).

This used to be correct for MongoDB 2.6 and earlier, but MongoDB 3.0+ appears to have changed the calculation. The total is perhaps including internal system operations since it seems to align with the number of running operations as reported by db.currentOp(true).inprog.length.

Example from MongoDB 3.4.2:

> db.serverStatus().globalLock.activeClients
{
  "total": 11,
  "readers": 0,
  "writers": 0
}

The description of "client connections" also makes it easy to conflate this with the metric users are probably looking for: db.serverStatus().connections.current.



 Comments   
Comment by Githook User [ 30/Oct/17 ]

Author:

{'email': 'stennie@cpan.org', 'name': 'Stephen Steneker', 'username': 'stennie'}

Message: DOCS-10003: Clarification needed for globalLock.activeClients.total

Signed-off-by: kay <kay.kim@10gen.com>
Branch: v3.4
https://github.com/mongodb/docs/commit/4f8f4a7a184c060bd3e9a3f3282460167a78539f

Comment by Githook User [ 30/Oct/17 ]

Author:

{'email': 'stennie@cpan.org', 'name': 'Stephen Steneker', 'username': 'stennie'}

Message: DOCS-10003: Clarification needed for globalLock.activeClients.total

Signed-off-by: kay <kay.kim@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/fa13369b9d6761832022509853dfb6aade5a6737

Comment by Kay Kim (Inactive) [ 08/Aug/17 ]

Tickets created before server ticket has even started. Will close.

Comment by Eric Milkie [ 24/Mar/17 ]

I think the stats are confusing; why would "total currentQueue" be the sum of queued readers and queued writers, but "total activeClients" be totally divergent from the count of active readers and active writers?

I will file a SERVER ticket to consider changing the stat here to something more useful. We can use this ticket to document the change.

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