Open Bug 735690 Opened 13 years ago Updated 2 years ago

Idle browser (no pages showing) still uses a small amount of CPU

Categories

(Firefox :: General, defect)

x86
macOS
defect

Tracking

()

People

(Reporter: zwol, Unassigned)

Details

(Whiteboard: [Snappy:P3])

Attachments

(2 files)

To confirm that bug 650649 was fixed, I let Firefox 11 sit idle for six hours, using a brand new profile, showing only one window with one tab displaying about:blank. In the process I noticed that the browser seems to use a small amount of CPU even when it hasn't got anything to do. The attached graph shows CPU time (as reported by ps(1)) as a function of clock time. The spikes every half hour are due to URL-classifier updates and are expected. The gradual upward trend in between these spikes, however, is not. The raw data set corresponding to this graph is https://bugzilla.mozilla.org/attachment.cgi?id=605652 .
Version: 4.0 Branch → unspecified
I subtracted out the periodic CPU bursts due to the URL classifier. It looks like some small but steady CPU-consuming operation kicks in about 15 minutes after startup and runs continuously thereafter, except for a couple of pauses. Separate regressions on the three apparently-linear segments report a slope of 2.88 CPU-seconds per hour, with agreement to within 0.2%, and R^2 better than 0.9999 in all three fits. The red line in the attached chart is an extrapolation from the fit to the second linear segment. This model says to me that there's only one idle task to track down.
(In reply to Marco Bonardo [:mak] from comment #2) > may that be > http://mxr.mozilla.org/mozilla-central/source/browser/components/ > nsBrowserGlue.js#1127 ? though it should kick in once a day, not on each idle and not surely increase cpu like that.
ah wait, I misread that as doing idle task every 15 minutes, sorry. what's the time between increases?
In the data set I collected, the increments fluctuate in the 10s--30s range, but that could be a rounding artifact: OSX ps(1) only reports CPU time to two decimal places. 2.88 / 3600 is 0.0008 CPU-seconds per second, or 0.01 CPU-seconds every 12.5 seconds.
Doesn't the idle service constantly poll to see if the machine is back from idle? Not saying that's not a bug.
This doesn't really seem [MemShrink] or [Snappy] to me.
Whiteboard: [MemShrink] [Snappy] → [Snappy]
Hmm. Try disabling safe browsing (Prefs -> Security -> "Block reported...") to disable updates, wait 15 minutes to ignore any startup stuff, attach a profiler, and let it gather data for a few hours?
I think this is [snappy] as it shows there is more background processing than is expected and gets worse over time.
Whiteboard: [Snappy] → [Snappy:P3]
I'm seeing something similar. It's not clear whether it's the exact same issue but the symptoms sound similar: When Nightly 15.0a1 (2012-05-04) is sitting idle with all windows closed on Mac OS X Lion it hums along using approximately 0.5-1.0% CPU. With one empty window open it takes up 4-9%. If I close this empty window the CPU monitor drops back to 0.5-1.0% again. I didn't notice this behavior prior to 15.0a1 though it may have existed.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: