Closed Bug 1636204 Opened 4 years ago Closed 4 years ago

about:processes shows unrealistic memory usage numbers on Linux.

Categories

(Core :: DOM: Content Processes, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox-esr68 --- unaffected
firefox75 --- unaffected
firefox76 --- unaffected
firefox77 --- unaffected
firefox78 --- fixed

People

(Reporter: emilio, Assigned: Kwan)

References

Details

Attachments

(5 files)

See screenshot.

So, let's list what's wong:

  • pid 0, that's basically impossible;
  • missing processes;
  • numbers are off.

I suspect that this and bug 1636203 are the same and that both are due to a bug in parsing /proc/[pid]/stat. It lives here, in case anybody wants to look at it.

All the indexes were off by two, so the values were for completely different
measurements, and thus nonsense. Resident Set Size still doesn't seem to be
handled correctly, perhaps because it's being treated as a bytes count rather
than the page count it is somewhere, but with this change the Virtual Memory
figures match what system monitor displays.

Attached image about-processes.png

This is what I see after the two patches.

As noted in the comment /proc/[pid]/stat is returning the number of pages, but
this value is being used elsewhere as a bytes figure, so we need to multiply by
the page size to get that.

Attached image about-processes2.png

And with the third patch now resident memory matches.

Assignee: nobody → moz-ian
Status: NEW → ASSIGNED
Pushed by btara@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c7713eb6813c
Use correct indexes for parsing /proc/[pid]/stat. r=Yoric
https://hg.mozilla.org/integration/autoland/rev/25f2f567dad6
Return size in bytes instead of page count for RSS in ProcInfo. r=Yoric
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
Summary: about:processes shows unrealistic memory usage numbers. → about:processes shows unrealistic memory usage numbers on Linux.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: