[macOS] navigator.hardwareConcurrency reports physical cores instead of logical since Bug 1546544
Categories
(Core :: DOM: Core & HTML, defect, P2)
Tracking
()
People
(Reporter: dveditz, Unassigned, NeedInfo)
References
(Regression)
Details
(Keywords: regression, Whiteboard: intentional)
Apparently navigator.hardwareConcurrency reports physical cores ("2" on my mac). The spec, MDN, and Chrome's implementation report logical cores ("4" on my mac).
There was some discussion about this in bug 1008453 and it looked like it was going toward reporting logical, but the code didn't change that before landing. Might be Mac only -- there's platform-specific code and I haven't tested elsewhere.
Comment 1•5 years ago
|
||
Reporter | ||
Comment 2•5 years ago
|
||
Thanks, Spectre.
Comment 3•5 years ago
|
||
(In reply to Daniel Veditz [:dveditz] from comment #0)
Might be Mac only -- there's platform-specific code and I haven't tested elsewhere.
On my Windows 10 laptop, both Firefox and Chrome report navigator.hardwareConcurrency
== 12. Windows Task Manager and System Information confirm I have 6 physical cores and 12 logical processors.
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 4•5 years ago
•
|
||
This is due to the Mac-specific mitigation added in the same bug. We intentionally reduced navigator.hardwareConcurrency when the mitigation is enabled because it effectively disabled hyperthreading and navigator.hardwareConcurrency is meant to reflect the number of logical processors.
There is a Chromium bug filed[1] requesting hardwareConcurrency report the lower number like the Firefox implementation, but the bug hasn't had any activity since September so we need to ask about it.
:drno recently reached out to Google about a Hangouts issue where Hangouts was using navigator.hardwareConcurrency so we're looking into normalizing this behavior.
- Issue 1002584: Update the value of Navigator.hardwareConcurrency to reflect tcsm_enable
https://bugs.chromium.org/p/chromium/issues/detail?id=1002584
Updated•5 years ago
|
Friendly ping! What is the status here?
On a test M1 Pro machine: navigator.hardwareConcurrency
in Firefox Nightly 102 reports 2
. In latest stable Safari, Chrome, and Edge, it reports 8
.
Google Meet doesn't work in HD (720p) anymore and shows lower resolution video of all participants. Maybe because of this?
However it works well in 720p in Chrome, Safari, and Edge.
Comment 6•3 years ago
|
||
(In reply to Sagar from comment #5)
Friendly ping! What is the status here?
On a test M1 Pro machine:
navigator.hardwareConcurrency
in Firefox Nightly 102 reports2
. In latest stable Safari, Chrome, and Edge, it reports8
.Google Meet doesn't work in HD (720p) anymore and shows lower resolution video of all participants. Maybe because of this?
However it works well in 720p in Chrome, Safari, and Edge.
@Sagar, could you confirm you're seeing navigator.hardwareConcurrency
as being 2 on the M1 Pro? And that this is not in a VM?
It would also help if you could provide a screenshot or copy-and-paste of the data from About this Mac -> System Report... -> Hardware Overview. Just the part with the CPU information such as
Hardware Overview:
Model Name: MacBook Pro
Model Identifier: MacBookPro17,1
Chip: Apple M1
Total Number of Cores: 8 (4 performance and 4 efficiency)
Thanks!
Comment 7•3 years ago
|
||
Sagar, have you enabled the privacy.resistFingerprinting
pref?
I wonder if the timer mitigations from bug 1546544 are still necessary now that we've shipped Fission (on desktop).
Updated•3 years ago
|
Comment 8•3 years ago
|
||
Comment 9•2 years ago
|
||
Unfortunately this is not actionable without more information from the reporter.
Dear reporter,
Please feel free to reopen this, when you have a chance to get back here form comment 6 and comment 7. Thank you.
Description
•