Closed Bug 444116 Opened 17 years ago Closed 16 years ago

Firefox 3 CPU usage spikes, does NOT happen in FF 2

Categories

(Firefox :: General, defect)

3.0 Branch
x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: baseliners, Unassigned)

References

()

Details

(Keywords: perf)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0 I installed Firefox 3 on Windows XP SP2 on my Thinkpad. The Firefox process CPU usage keeps varying between 2-3% and 15-17%. And it constantly keeps jumping - i.e. it's never a constant 2% or a constant 15%. I didn't have this issue with Firefox 2. Anyone else seeing the same issue? I disabled all my add-ons and the problem persists. Looks like others are also having the same issue. See the thread I started on the support forum. Link below. http://support.mozilla.com/tiki-view_forum_thread.php?comments_parentId=69069&forumId=1 Reproducible: Always Steps to Reproduce: 1. Open Firefox 2. Open a few tabs (in my case, 10 tabs) 3. Open Task Manager and view cpu usage of FireFox Actual Results: CPU continuously fluctuates between 2 - 15%. Expected Results: cpu usage stays more or less constant at < 10%
Version: unspecified → 3.0 Branch
I'm seeing something like this on Windows 2000 -- at times, FF consumes 50% cpu (one thread on hyperthreaded pentium 4) for minutes and stays unresponsive. Browsing SSL-secured sites is nearly impossible because of this.
Windows 2000 also I get periodic cpu spikes of 100% seemingly at random. Flash and javascript seem to increase the length and rate of the spikes. Addons have a little effect, but not that big, same with the amount of tabs. It started happening when I upgraded firefox 2 to firefox 3. I then deleted every trace of firefox from my computer (everything, including reg keys etc) and did a fresh install. Still happens.
(In reply to comment #1) > I'm seeing something like this on Windows 2000 -- at times, FF consumes 50% cpu > (one thread on hyperthreaded pentium 4) for minutes and stays unresponsive. I've uninstalled Extended Cookie Manager extension and the problem went away.
Same problem here, was very occaisional in 2.x but with 3.01 and XP SP3 this happens a couple of times/day. 100% of one processor, without any active browsing. Will stay that way until shut down. Not page dependent. Not flash or adobe.
This has been happening to me (using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 with WinXP Pro SP2) since I upgraded from version 2. It drives me crazy and forces me to open Internet Explorer, which does not have this problem.
"Me too" with Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 (Windows 2000 Pro) over an AMD Athlon 1.1GHz w/ 1GB PC133 RAM. But for me, it seems to depend on the pages being loaded or displayed. Yahoo mail, GMail and almost any news page slow things enough to make Winamp sputter. Pls see Bug 434846, Bug 435781 and Bug 441212 as they are quite similar. Maybe some can be duped. (Is my machine strong enough for FF3?)
I started getting this problem on both my machines after I installed Firefox 3. My P4 3.00GHz 1GB Ram XPmce and my Core Duo 1.80GHz 2GB Ram XPpro. The P4 sometimes goes to full usage of the cpu and often nothing will stop it except shutting down firefox. Even thru multiple restarts.
I'm trying to analyze the dependency of the CPU spike on the type of page loaded. For example, this page brings CPU to between 10% or 20% when loading. The add-ons page bust it to around 50%, just like Yahoo Mail, while GMail goes over 60% and YouTube (with some stuff blocked by NoScript) crosses 80% when loading the page, stays around 35% when loading a video and between 50% and 60% when playing it. Closing a background tab boosts it to 20%. Never too much to note: I also started to have this problem when upgrading from latest 2.x to 3.x. I don't know what all this means, but I hope it can help guide programmers on what kind of elements impact CPU usage and how. Many thanks.
Developers - this seems to have gotten much worse after I installed 3.0.3 yesterday. Now the CPU usage stays at about 50% consistently. Please help!
Severity: normal → critical
Just for comparison, I'm running FF 2.0.0.17 - Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.8.1.17) Gecko/20080829 Firefox/2.0.0.17 - at home with Win2k SP4, everything pt-BR. Unfortunately, the machine is different from the one I mentioned above - this is a P4 2.4GHz DDR333, while the former is an AMD 1.1GHz PC133. But anyway, simultaneously loading and playing an YouTube video keeps CPU between 20 and 35%. Noticeable is that only playing the video already loaded brings CPU to the same region, and loading the video seldom changes from 0%. It seems that downloading is harmless in 2.x, but causes lots of trouble in 3.x. Or 3.x does some huge side task in the background when downloading stuff, that 2.x doesn't. The video is http://br.youtube.com/watch?v=4c4QF1ZMvpI - so you can have fun while watching CPU numbers. Changing tabs and playing around in FF usually stays below 10%, with few spikes over that.
I've been living with this issue for 2 years over probably 15 consecutive versions of Firefox. The only thing you can do to fix the problem is to restart the browser every 20 minutes. Folks - be careful of all the suggested solutions to this problem - you might try to do some tweak in about:config, then restart the browser for it to take effect and then Poof! - it's working great... until you've opened enough tabs again and the CPU is spiking again. Don't bother, NO TWEAK WILL FIX THIS problem. I've tried them all. This is a CORE MOZILLA ENGINE architecture design flaw. Mozilla developers have to recognize this and people have to stop talking about tweaks to address the problem (like disabling flash, browser.cache settings, etc.) This issue will kill Firefox as a browser if it's not addressed soon. Millions of people are experiencing it and hating Firefox for it already. The only thing that still keeps me a FF user is the lack of extensions for Google Chrome. Here's what I think is happening - FF is leaking memory somewhere and the garbage collector keeps being invoked over and over again. This is a result of running all tabs in the same OS process. The FF developers should stop whatever features they are working on and redesign the browser to use a multi-process architecture like Google Chrome. Guys, seriously, not a single feature in FF3 (as opposed to FF2) made any difference to me. I'd be 100x happier still using FF2 if it had a multi-process architecture. You guys basically wasted a whole 2 year development cycle (FF2 to FF3) trying to optimize the browser's memory and CPU performace, and guess what? Nothing that you did made a single bit of difference. So what if FF3 uses 500 megs of RAM instead of 700 in FF2? It's still slow as hell due to these CPU spikes. The ONLY THING you can do to speed up Firefox now is to make it MULTI-PROCESS! Look at Google's code for inspiration - it's open source for God's sake. Hope you can understand why I'm so frustrated - I've been restarting my web browser every 20 minutes every single day for the past 2 years. Please go multi-process. Please!
However, in order to make this bug more useful, please follow the steps found at http://new.quality.mozilla.org/bug-writing-guidelines and report back with your results. Any number of things could be causing this, one of which is an extension. Alex, you are wanting multi-process, you can feel free to file another bug with that as a request. That is not very related to this bug.
Going multi-process *is* related to this bug because it's the only way to reliably find it and fix it. You said, "Any number of things could be causing this, one of which is an extension." This is correct. Thousands of possible causes have been suggested for this problem on hundreds of different forums. It's like finding a needle in a haystack. The only sane solution right now is to go multi-process. There is a good chance this will alone will be enough to get rid of the CPU spikes, and if not, it will make it MUCH easier to track them down, because you will be able to see exactly which tab is causing them. I will also file a new bug requesting a multi-process architecture. Thanks for the suggestion.
Alex, if you want to file a multi-process bug feature request, please feel free to do so. So far though, no one who is seeing this issue has followed the steps I gave in Comment #12, which will almost immediately give the cause if it is an extension or something. Please read and follow those steps.
Tyler: I have already submitted a proper bug report along the lines you stated in your previous post to Alex. I will reiterate on his behalf that it is NOT a plugin or extension problem, as the issue replicates itself when ALL, I repeat ALL, plugins and extensions are disabled. My main issue is audio glitching on www.jango.com, a flash based internet radio community. Audio skips and stutters intermittently as the cpu randomly spikes to 100% briefly for no apparent reason. I have sent numerous emails to the people at Jango and they assure me thier site is "optimised" for Firefox 3 and yet I never had this problem with version 2. The same problem exists on any flash based site but mostly noticable on music and video sites (jango, youtube, myspace etc..)
Either Alex or Asa, could you pls cite the multi-process bug? If you believe this is the cause of this bug, it would be good to track both together. Each one in its own thread, obviously.
Yes, please give your report as said in comment 16. You say you have tried in Safe Mode, how about a new profile (don't make any changes either). Also, as you say this is with a flash site, update your Flash to version 10.
To Alex's point - I don't know if a multi-process architecture for FF will resolve the issue. But I do know that Chrome is much faster than FF and doesn't eat up my CPU and allows me to do what I want quicker. I hate to admit this but I've switched to Chrome on all my Windows machines. It doesn't have all the add-ons that FF has but I've been able to find some workarounds or gadgets to do what I want.. and Chrome isn't anywhere near perfect (e.g. a simple thing such as font setting doesn't work on most of the pages I use). But it's still more efficient for me right now. On my Macs (running OS X), I still use FF 3 and this same problem exists on the Mac platform as well (though this bug is specifically for Windows). Tyler - are you not able to reproduce the problem on your end? Is that why you're looking for someone to file a report after trying with no extensions, new profile etc.? I'd be surprised (jealous) if there are folks who don't see this problem at all.
No, I am no able to get significant spikes that are not normal behavior (background apps, activity, etc.). A new profile will make sure there is nothing corrupted by an extension, and will be the same as reinstalling FF. That will tell us for sure if this is with FF. Also, update Flash to 10, as that has several fixes and a total rewrite of their code. that could be the issue.
OK, I have Flash 10.0 r12 over FF 3.0.4 over Win2k SP4 over an AMD 1.1GHz processor and 1Gb PC133 RAM and created a clean test profile. Loading any page into Yahoo Mail kicks CPU usage by 50%, while GMail does 60% (most pages seem to do in this range). Loading an YouTube video takes less CPU, between 20 and 30%, but watching the video makes it hit 80%. If I select a tab other than the YouTube one (i.e., video playing in background), usage drops to around 35 or 40%. This page alone draws 5% or less when I'm typing (typ 2-3%). Firefox start page (default) takes 30% to load. A Google search stays below 20%. Opening a pdf file from http://www.fairchildsemi.com/ds/TI%2FTIP42.pdf takes some 30%, while the same file from the hard drive openw with 10%. I hope this helps. Is someone able to make a testcase page? Best regards
I installed the latest Firefox 2: Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.8.1.18) Gecko/20081029 Firefox/2.0.0.18 Flash 10.0.12.36 Loading this page or Firefox start page makes CPU usage raise slowly from 10% to something between 20 and 30%, then drop. The bug page does a spike of 46% for a couple seconds before dropping. Loading Yahoo Mail or GMail makes CPU go a bit above 30%, shortly falling to below 5%. Loading the YouTube video mentioned in Comment #10 makes CPU wander from 15 to 30%, regardless of whether it's focused or not. Watching the video makes CPU usage stay quite constant around 75% in the foreground and a bit above 20% in the background. Loading the pdf file mentioned in Comment #20 peaks CPU at 20%, shortly. Loading the same file from my HD hits 8%. This bug page idle goes to 0%, while typing in it peaks at 6% (typ 3-4%). Funny thing I noticed is Flash animations can get FF2 quite unstable (dunno about 3) - The animation in http://www.adobe.com/products/flash/about/ drives CPU usage to 99% in some instants (like when a movie appears in the animation) and 0% in others (when the animation is a still drawing). FF2 seems way softer in CPU than FF3. But Flash seems to drive FF nuts somehow. Many thanks.
About the CPU instability* mentioned above - FF3 does exactly the same: 0% when the still orange monitor appears, 99% with the cute blonde speaking. *Unstable in the sense of varying wild, not in the sense of disfunctioning
Not sure if this is a Flash issue of a FF issue. Flash movies are often CPU hogs, and not much can be done on that at our end. I often see flash hogging the CPU in movies totally offline on local files without a browser.
Comparison data between Comment #20 and Comment #21 tends to indicate a FF thing, since most pages had significant greater CPU usage in FF3 than in FF2. I assume Flash is the same for both. Also, the hogging is apparent in many different pages. Are we able to point the problem strictly to Flash content in all of them? I loaded http://www.adobe.com/products/flash/about/ in different browsers and got the same results: Opera 9.62: CPU time peaking at 87%, with 9% idle time MSIE 6.0: CPU time peaking around 60%, with roughly 40% idle time I bothered to gather idle times because of MSIE integration with the OS Is someone able to confirm or deny these results, or to create good test cases? Many thanks.
I have been able to reliably replicate CPU and HDD spikes similar to those described above using the following approach: - create a clean, new profile of Firefox 3.0.6 with no add-ons - create 60 live bookmarks pointing to 60 different RSS feeds - browse the web normally - within 10-15 minutes cpu usage spikes to 20-50% for a period of 60 to 120 seconds with heavy HDD i/o, Firefox is frozen during this time - run NETSTAT to confirm that many RSS feeds are being access simultaneously - after 60 to 120 seconds Firefox returns to normal until 10 to 15 minutes later when the next Firefox RSS feed refresh cycle begins Proposed solution: reduce priority for RSS feed refreshes for Live Bookmarks and establish a limit of no more than four simultaneous RSS feed updates
Sorry if this is a silly question, but I have to ask: Is RSS the cause of the problem or is it one of its various causes? I mean, this solution would solve the problem or just avoid RSS feeds to cause it?
Good question. Support for RSS feeds is the primary (if not only, I can't really think of another) purpose for Firefox Live Bookmarks, a feature added in 2.x. Live Bookmarks and support for RSS feeds is a major FF feature, so avoiding RSS feeds is tantamount to defeaturing FF. The problem is architectural. I would assume that the Live Bookmarks feature was conceived and tested in an environment of "light" RSS usage, say less than 20 RSS feeds. A typical RSS user today might subscribe to 50 to 100 feeds of blogs, news services, network status, calendars, etc. For example, the www.mozilla.org home page alone features three separate RSS feeds. The proposed solution is to maintain the Live Bookmarks feature in FF, but adjust the refresh parameters to reduce the priority of feed refresh and limit the number of feeds which refresh simultaneously.
What called my attention is that I am not a RSS user nor have live bookmarks (whatever this is). At least not intentionally. :) Is there a way we can disable RSS feeds and/or live bookmarks, or to remove them, whatever, in order to verify whether FF keeps hogging CPU or not?
If you do not create a Live Bookmark, then you should not have active RSS feeds unless you have installed an RSS reader add-in such as Sage. You can distinguish Live Bookmarks from normal bookmarks as Live Bookmarks have an three orange diagonal curved lines on the bookmark folder icon.
(In reply to comment #29) > you should not have active RSS feeds unless you have installed an RSS reader > add-in such as Sage. > Live Bookmarks have an three orange diagonal curved lines on the bookmark > folder icon. I didn't install RSS-related add-ins (I have FireFTP, IE Tab, Java Quick Starter - who the hell put this here? - and NoScript as extensions, the default theme and all auto-installed plugins, such as Adobe Reader, Flash and so on) and, according to your directions, I found no live bookmark here. Unless FF can hide something from me, I guess the CPU hogging problem doesn't depend on RSS or Live bookmarks. Not that they don't cause a problem, but there's still something prior to them.
Oops, wait a minute! I accessed one of my bookmarks a while ago and just noticed the orange lines, but in the address bar instead. There seems to be the evil lines in other bookmarks I have... Damn! I don't want anything autofed! This seems related to Bug 354903 and Bug 329534. But it can be a totally different thing. There should be a way to disable Live Bookmarks and RSS feeds. Currently, they're of no use for me and can be swallowing CPU and bandwidth. Also, this would help isolate the problem. Which way to go now?
baseliner, do you see this problem with current beta of 3.1? http://www.mozilla.com/en-US/firefox/all-beta.html the multiprocessor issue is bug 277547
Severity: critical → major
Keywords: perf
Wayne - No I haven't tested 3.1 Beta. Just looked thru the release notes and I don't see anything in there that hints at an improvement to address this issue.. it says 3.1 is an incremental release so I doubt there's a fix in there for this issue... but let me know if I overlooked something..
3.1 Beta 3 has many fixes that are not covered in the release notes. It could have a fix in it. Or you could try the nightly, ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-1.9.1/ or ftp://ftp.mozilla.org/pub/firefox/nightly/latest-mozilla-central/
I'm about to ditch Firefox and go to Opera, which is something I never thought I'd be typing. I've been a FF user for a LONG time but this is ridiculous. I'm seeing excuses all over the place on what's causing this - and yet NOTHING suggested applies to me. NO Live Bookmarks NO Addons NO Plugins IT IS FIREFOX THAT IS THE ISSUE I've tried tweeking the cache, no effect. I've tried every other "trick" I could find on Google - NO EFFECT. It has to be a bug that's in the hardcode! PLEASE for the love of GOD fix this issue. I can't take much more of this 100% CPU usage and can not for the life of me figure out why I see forum posts from people saying FF3 is "faster" - how is it "faster" when it freezes constantly!? Using: FF3.0.8 on Win XP SP3 -- a VERY disappointed, loyal, FireFox User
If baseliner agrees, let's clarify there is no usage of utube nor flash. And this bug does not apply to people who see the problem already in FF 2. repeating for latecomers - http://support.mozilla.com/en-US/kb/Firefox+consumes+a+lot+of+CPU+resources Tyler is quite correct in comment 34 (see http://tinyurl.com/cdp4oj and that list surely doesn't cover all the performance related bugs). Therefore, there is no point in speculating or helping unless you first try version 3.1, now at beta 3. Question - do you have MS' Silverlight installed? It would appear in installed programs list or windows update list, or both.
Summary: Firefox 3 CPU usage spikes → Firefox 3 CPU usage spikes, does NOT happen in FF 2
Asa in comment #15 > Tyler: I have already submitted a proper bug report along the lines you stated > in your previous post to Alex. I don't find any bugs submitted by Asa nor Alex. Don't waste your time looking. There are a couple multiprocessor/multithread bugs - but please don't comment in them unless you have technical input. There are more than a few flash related bug reports http://tinyurl.com/cd5zrm - almost all end up being adobe problems, not mozilla.
reporter, baseliner is gone. => incomplete bugzilla@badave.net, you should try v3.5, which I think is now at beta 4. suggest others pursue bugs relevant to their issue (live bookmarks, etc)
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INCOMPLETE
The problem remains with FF 3.5.7, but it seems to be connected to Flash. With no Flash pages and nothing visibly happening, I see CPU usage at 0-2%, as it should be. When I visit a web page containing a Flash video, but _don't_ play the video, CPU usage starts to go up. With four tabs open from breadtopia.com, CPU usage is over 50% with nothing visibly happening. If you play and pause a video the CPU usage will go way up until the tab is closed. This problem is serious because users shouldn't be expected to debug performance problems, or even know whether there is Flash stuff hidden somewhere in a web page. Since FF lets the user choose applications and add-ons, the most general solution in Firefox would be to provide some sort of automatic feedback when an application or add-on turns out to be a performance hog. All add-ons are disabled and there are no RSS feeds or live bookmarks.
You need to log in before you can comment on or make changes to this bug.