In about:processes refresh, ResidentUniqueDistinguishedAmount is slow
Categories
(Core :: Performance, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox-esr91 | --- | wontfix |
firefox92 | --- | wontfix |
firefox93 | --- | wontfix |
firefox94 | --- | fixed |
People
(Reporter: Yoric, Assigned: florian)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
Comment 1•4 years ago
|
||
Fission M7 Beta
Reporter | ||
Comment 2•4 years ago
|
||
Frankly, at this stage, I don't know how to act upon the information.
Updated•4 years ago
|
Comment 3•3 years ago
|
||
Removing Fission milestone tracking for about:processes work.
Assignee | ||
Comment 4•3 years ago
|
||
Here's a profile of it: https://share.firefox.dev/3cHEGvU
The Mac implementation of ResidentUniqueDistinguishedAmount seems very slow, especially the mach_vm_region calls at https://searchfox.org/mozilla-central/rev/54f37fc1ac0f98b590af51e01ce82bb74179bf63/xpcom/base/nsMemoryReporterManager.cpp#480
Nika, you were asking in bug 1652813 for the resident unique value to be shown instead of the resident one (that I assume was less expensive to compute). Do you have a suggestion about what we could do here?
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 7•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 8•3 years ago
|
||
The slowness isn't limited to Mac.
I profiled the "GetProcInfo" runnables running on the StreamTrans threads on Mac/Linux/Windows. On Mac ResidentUniqueDistinguishedAmount dominates the profile (it's more than 98% of the samples). On Linux it's a large part of the time too. On Windows it doesn't dominate the time, because thread enumeration is very slow, but it's still about 40% of the time, to still worth optimizing.
Ideally we would get values from the operating system without doing any computations, and these values would match what's shown in the system's task manager. On Mac I found an API to do that (gives results in a few microseconds, compared to the 50ms ResidentUniqueDistinguishedAmount was taking), on Linux it seems the gnome system monitor shows in its memory column the result of substracting the shared memory from the resident size; we can do that too, and it's cheap. On Windows I couldn't find an API to access the value shown in the "Memory" column of the task manager. The value shown there is the value of the "Working Set - Private" counter, and I found no API to access it. The table at https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa965225(v=vs.85)#process-memory-performance-information says 'None'. It seems the best value we can get cheaply is "Private Bytes". This is the value shown by the "Process Hacker" tool, and also by the Chrome task manager, so should be good enough.
Assignee | ||
Updated•3 years ago
|
Pushed by fqueze@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dd1b040b050a reduce the overhead of collecting memory information for about:processes, r=dthayer.
Comment 10•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Assignee | ||
Updated•3 years ago
|
Description
•