[SERVER-36822] Report correct number of CPUs Created: 23/Aug/18  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Bruce Lucas (Inactive) Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 1
Labels: sa-remove-fv-backlog-22
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
duplicates SERVER-38231 Capture CPU utilization for each core... Closed
duplicates SERVER-40506 ftdc (hostInfo.num_cores,systemMetric... Closed
Related
Assigned Teams:
Service Arch
Operating System: ALL
Participants:

 Description   

Currently, on Linux mongod records the number of CPUs at startup, and uses this information in a couple of contexts:

  • FTDC queries the value recorded at startup and reports it at each sample in the "num_cpus" field. This is required for downstream tooling to scale the normalized CPU metrics properly when computing CPU percentage.
  • The number recorded at startup is returned by the hostInfo command in the numCores field. This number is used by Ops Manager also for the purpose of scaling the normalized CPU metrics reported on the Ops Manager charts.

The above assumes that the number of CPUs cannot change after mongod startup. However this is not the case, because Linux supports hot-pluggable CPUs and also enabling and disabling CPUs dynamically. If the number of CPUs changes after startup the normalized CPU metrics will be reported incorrectly.

To accommodate this we should dynamically query the number of CPUs so we can report the correct number.

Acceptance Criteria:

mongod should detect the change in the number of CPUs dynamically and report the number. 



 Comments   
Comment by Bruce Lucas (Inactive) [ 21/Dec/21 ]

I don't believe this is a duplicate - as far as I know the linked tickets still query the number of CPUs only at mongod startup, so they don't correctly handle a change in the number of CPUs at runtime.

Comment by Blake Oler [ 20/Dec/21 ]

Closing as duplicates of linked SERVER tickets.

Generated at Thu Feb 08 04:44:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.