Closed Bug 1396481 Opened 4 years ago Closed 3 years ago
Firefox has a high idle CPU load (~3%) which severely shortens battery life
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0 Build ID: 20170824053622 Steps to reproduce: Use Firefox. Actual results: Firefox has an idle CPU load of around 3%, with spikes of up to 10%. This is enough of a load to require me to close Firefox when it is not in active use and I am using my device (a Surface Pro 4) in its portable mode. In all seriousness I *must* use Microsoft Edge to view PDFs when mobile because Firefox drains the battery too quickly. Expected results: Firefox should use 0% CPU when idle by making use of blocking API calls, enabling the OS kernel to properly use CPU sleep and wait states.
Some interesting behavior that I think I am observing is that Firefox's CPU usage increases as other programs increase their CPU usage. ~70% load in another program produces ~6% load in Firefox, up from the 3% seen when most programs are idle.
Tested on Surface Pro 4 - Mozilla/5.0 (Windows NT 10.0; Win64 x64; rv:55.0) Gecko/20100101 Firefox/55.0 Build ID: 2017083103124 and cannot reproduce the issue. While in idle state, with Firefox browser active, the total CPU usage is between 0-2%(with no spikes) and no drain battery issues are detected while testing. If you still have the issue please install the latest Firefox Nightly 57 for Win x 64 from here : http://archive.mozilla.org/pub/firefox/nightly/2017/09/2017-09-06-22-03-06-mozilla-central/ After that please follow the steps from this link: https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Reporting_a_Performance_Problem Basically you need to install the Cleopatra addon to capture the profile which afterwards you can attach it here(share) so further investigation can be done. Thank you
Mr. Alin, The problem is less noticeable in nightly. There are spikes of 2-10% but CPU usage will go below 2% quite regularly. It does not reach a stable 0%. Unfortunately extensions I use do not work and may never work with Firefox past v. 57 so I do not have much interest in troubleshooting the issue until I can figure out if a GUI modification API will be added to WebExtensions. In the meantime I will be moving to Palemoon or qutebrowser. I would suggest that it might still be useful to follow up on this report in some way as 2% was around what I was originally seeing before I noticed other programs would increase Firefox's CPU usage. That 2% was the cause of the fast battery draining, regardless of whether 2% is normal or not. If I close Firefox the battery does not drain extremely quickly (1hr lifetime, as opposed to 5-6hrs). I am using a Surface Pro 4 i7 if that matters. Respectfully, R0b0t1
Since this user isn't moving to Firefox 57, I'm marking this 57wontfix. To R030t1, it sounds like you're running a good number of AddOns. Try creating a new profile in "about:profiles", and see if you still have the issue.
Mr. R030t1, As you might know, one of the major reasons that starting with 57 only web-extensions will be allowed in Firefox was exactly this: Mozilla couldn't verify the old add-ons from performance point of view, security, etc. So, as Joe suggested you might want to run the CPU usage test on a safe-mode profile or on a new profile. I concur with Joe's opinion that most likely the CPU spikes you see is caused in concurrence with some of the add-ons you are running. As a side note, Mozilla is working closely with contributors to translate legacy add-ons to web-extensions format, but as you might imagine, the resources are limited, so we can't do all at once.
Mr. R030t1, Since you have add-ons/extensions running in the browser, it means they require processes to say "Yes, I'm still alive. Please keep this process running" which will use some processing power. If you want it to use less, turn off the extensions, and when it is in idle, close all the unnecessary pages you might have open. Sidenote: Firefox requires processes to keep itself alive, which in fact will take away ~0-5% of your CPU's power.
Stuart, it appears to me that this is the same problem as in bug 1404042. [dupeme]?
Hello, To the two suggesting I disable extensions or close tabs: that should not be necessary. The extensions themselves may spawn processes but that does not mean the processes will be busy. They will be sleeping most of the time. I was able to get Firefox, with extensions, down to ~0% CPU usage again due to a minor update. As for tabs, I have no good way to save them outside of Firefox. (In reply to Nanami from comment #6) > Sidenote: Firefox requires processes to keep itself alive, which in fact > will take away ~0-5% of your CPU's power. This means Firefox is poorly designed. The processes should be making blocking OS calls, and have no reason to be continuously running in the background. I am now on Firefox 57. I must close Firefox when mobile. Background CPU usage is close to 4%, which drains my battery extremely quickly. I have ~2hrs intermittent use, down from 8-9hrs. Cheers, R0b0t1
Developer apathy is making my system unusable, and there is nothing I can do.
Component: Untriaged → General
OS: Unspecified → Windows 10
Hardware: Unspecified → x86_64
(In reply to R030t1 from comment #9) > Developer apathy is making my system unusable, and there is nothing I can do. What you can do is answer the questions in bug 1417968 comment 1.
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.