[SERVER-69046] suppress ARM Mac cpufrequency startup messages Created: 22/Aug/22  Updated: 29/Oct/23  Resolved: 11/Oct/22

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

Type: Task Priority: Major - P3
Reporter: Eric Milkie Assignee: Alex Li
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: Service Arch 2022-10-03, Service Arch 2022-10-17
Participants:

 Description   

On an M1 Mac, every time mongod starts it outputs some extra lines:

{"t":{"$date":"2022-08-22T13:15:05.576-04:00"},"s":"I",  "c":"CONTROL",  "id":23352,   "ctx":"initandlisten","msg":"Unable to resolve sysctl {sysctlName} (number) ","attr":{"sysctlName":"hw.cpufrequency"}}
{"t":{"$date":"2022-08-22T13:15:05.576-04:00"},"s":"I",  "c":"CONTROL",  "id":23351,   "ctx":"initandlisten","msg":"{sysctlName} unavailable","attr":{"sysctlName":"machdep.cpu.features"}}

It would be nice to suppress these messages, or remove cpufrequency entirely (is it used by anything?)



 Comments   
Comment by Githook User [ 11/Oct/22 ]

Author:

{'name': 'Alex Li', 'email': 'alex.li@mongodb.com', 'username': 'lia394126'}

Message: SERVER-69046 Suppress ARM Mac cpufrequency startup messages
Branch: master
https://github.com/mongodb/mongo/commit/c76c82acc8feeb88295b97e07860ef21012bb47c

Comment by Eric Milkie [ 24/Aug/22 ]

Ah yes, the common field to be populated is "cpuFrequencyMHz"; on Linux this is populated just fine. For macOS I now propose we zero out this field entirely, since in a few years no one will be running an Intel-based mac anyway.

Comment by Bruce Lucas (Inactive) [ 24/Aug/22 ]

CPU frequency and features are also present on other platforms. I think I misunderstood what you meant by "entirely" - removing it just from MacOS seems fine.

Comment by Eric Milkie [ 24/Aug/22 ]

Since it's a macOS-only stat, it probably hasn't been used in perf investigations =)

Comment by Bruce Lucas (Inactive) [ 24/Aug/22 ]

It's reported in hostInfo which is recorded in FTDC, and I think it has been occasionally useful for performance investigations.

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