[SERVER-77341] cpuload add the time consuming statistics and mongos add cpuload command support Created: 22/May/23  Updated: 29/Oct/23  Resolved: 07/Jul/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: y yz Assignee: George Wangensteen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-05-22-16-18-39-966.png     PNG File image-2023-05-22-16-18-54-436.png     PNG File image-2023-05-22-16-19-13-373.png     PNG File image-2023-05-22-16-19-39-921.png     PNG File image-2023-05-22-16-37-07-301.png     PNG File image-2023-05-22-16-38-44-465.png    
Issue Links:
Duplicate
is duplicated by CDRIVER-4646 cpuload add the time consuming statis... Closed
Assigned Teams:
Service Arch
Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2023-07-10
Participants:

 Description   

perfect befor:

  1. cpuload command,the time consuming statistics is not available.
  2. cpuload command is not surport in mongos,Sometimes we need to analyze mongos's cpu performance.

perfect after:
    cpuload add the time consuming statistics and mongos add cpuload command support.

 



 Comments   
Comment by Githook User [ 07/Jul/23 ]

Author:

{'name': '3058078489@qq.com', 'email': '3058078489@qq.com', 'username': 'y123456yz'}

Message: SERVER-77341 Add cpuload command to mongos and add duration statistics
to the command's output

Closes https://github.com/mongodb/mongo/pull/1546

Signed-off-by: George Wangensteen <george.wangensteen@mongodb.com>
Branch: master
https://github.com/mongodb/mongo/commit/dc55466d246d48f4a82d982b092c153b5dd5490f

Comment by y yz [ 30/Jun/23 ]

hi, George Wangensteen

 I have optimized the code according to your comment, thanks

 

Comment by George Wangensteen [ 29/Jun/23 ]

HI 1147952115@qq.com , thanks for the explanation. I left some small comments on the PR about a change we need to make before we can merge. We can continue the conversation on the PR as we go through code-review. Thanks very much for your contribution; we appreciate it! 

Comment by y yz [ 27/Jun/23 ]

hi, george.wangensteen@mongodb.com, thanks for you reply.

 

Background is as follows:
1. When we have a new server model arrived, or the same server has upgraded the linux operating system kernel, testers will run tests on these servers, one of which is to perform cpuload analysis on mongos and mongod to confirm performance.

2. We will not use these services online until test(contain cpuload) are OK, we will use enableTestCommands to start our tests. couload return value increased time statistics can help us to test and analyze server CPU performance.

3. Since we use different server of mongos and mongod, we need to conduct cpuload analysis on mongos, so mongos also needs to support the cpuload command.

 

thanks

Comment by George Wangensteen [ 26/Jun/23 ]

Hi 1147952115@qq.com , thanks for the contribution! I took an initial look at the PR you provided, but before I reviewed it I wanted to clarify the motivations here. Currently, we only use the cpuLoad command as a canary and for noise-analysis during performance testing, to get data on the actual CPU independent of the mongoDB workload. The command is test-only, which means that it can only be run when the server is started-up in "testing-mode" / with "enableTestCommands" parameter set to true. Since this command can't be run on a production server (i.e. one without testing mode enabled), I'd like to understand the use-case of adding this to mongos and changing the output before reviewing, to make sure this is the best solution for you. Could you tell me your use-case for this change?

Thanks, 

George

Comment by Chris Kelly [ 22/May/23 ]

Thanks for the pull request, 1147952115@qq.com! I'm passing this along to the relevant team to take a look.

Comment by y yz [ 22/May/23 ]

this is an improved feature, but Ican not choose "Improvement" button.

 

Comment by y yz [ 22/May/23 ]

the perfect code:  https://github.com/mongodb/mongo/pull/1546

Comment by y yz [ 22/May/23 ]

Generated at Thu Feb 08 06:35:14 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.