Closed Bug 1697832 Opened 3 years ago Closed 3 years ago

Firefox takes much CPU time, while all tabs and add-ons are low

Categories

(Core :: Performance, defect)

Firefox 86
defect

Tracking

()

RESOLVED WORKSFORME
Performance Impact none

People

(Reporter: vincent-moz, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0

Steps to reproduce:

  1. Start Firefox (my machine is a Debian/unstable laptop).
  2. Use it.
    But this may be hard to reproduce.

Actual results:

According to htop, Firefox suddenly started to take up to 100% CPU time (80% in average), and has been like that for several dozens of minutes. According to atop, from 15:30 to 16:30,

PID SYSCPU USRCPU  RDELAY  VGROW   RGROW  RDDSK   WRDSK  CPU CMD

29571 0.89s 77.94s 0.09s 0K 6580K 0K 0K 13% Web Content
29571 0.89s 2m08s 0.13s -1024K 5304K 0K 0K 22% Web Content
29571 1.18s 4m48s 0.21s 1024K 668K 0K 0K 48% Web Content
29571 1.80s 8m05s 0.40s -13.4M -5704K 0K 0K 81% Web Content
29571 1.90s 8m06s 0.47s 11340K -6656K 0K 0K 82% Web Content
29571 1.78s 7m56s 0.36s -1024K 9556K 0K 0K 80% Web Content
29571 1.98s 8m04s 0.35s -18.6M -12.2M 0K 0K 81% Web Content

I don't know whether I was using Firefox when this started to occur. I noticed the issue because the fan of my laptop started to make a lot of noise around 16:00.

I've looked at about:performance, but every tab (from the 12 listed ones) and the only add-on are low (Energy Impact), while the CPU usage issue remains.

Expected results:

Firefox should not take CPU time (or very little).

Component: Untriaged → Performance
Product: Firefox → Core

Vincent, would you mind to record a Gecko profile when such a situation happens again? You can find instructions at:
https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem

Alternatively you could also (temporary) install my PerfChaser extension to keep track of CPU usage for Firefox processes and threads. It might help us to figure out which of those actually cause it. But therefore you would have to make use of [Firefox Nightly] (https://www.mozilla.org/en-US/firefox/channel/desktop/#nightly) or Firefox DevEdition. The extension can be found at: https://github.com/whimboo/perfchaser

Flags: needinfo?(vincent-moz)

OK, I've installed the profiler and I'll upload a profile if the problem occurs again.

BTW, I noticed after quitting Firefox that I had opened a PDF file in xpdf by following a link and forgot to quit xpdf (and the tab that contained the link I followed was closed several hours before the CPU problem occurred). AFAIK, this was the only unusual thing I did, in case this matters.

Also feel free to install my PerfChaser extension, which should help you to more easily recognize the problem:
https://github.com/whimboo/perfchaser

It would be good to know which processes consume that much CPU, and also which threads for each of them. Also maybe specific websites that you are visiting are causing the problem, and in worst cases even open background tabs (but that should be kinda unlikely).

Whiteboard: [qf-]

Vincent, have you had the chance to reproduce the problem again? If not we might have to close this bug.

Also see my last comment. Thanks.

AFAIK, I couldn't reproduce the problem.

Flags: needinfo?(vincent-moz)

Ok, closing the bug in this case. Feel free to reopen in case you see it again. Then it would be good to know which processes and also threads are causing that high load.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Performance Impact: --- → -
Whiteboard: [qf-]
You need to log in before you can comment on or make changes to this bug.