The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    CPU utilisation very high when firefox is loading page ?

    Discussion in 'Linux Compatibility and Software' started by wearetheborg, Jul 29, 2007.

  1. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    My (core duo 2Ghz) CPU consumption gets very high (70-95%) when firefox is loading pages. Is this normal ?
     
  2. John Ratsey

    John Ratsey Moderately inquisitive Super Moderator

    Reputations:
    7,197
    Messages:
    28,841
    Likes Received:
    2,166
    Trophy Points:
    581
    That seems high. I would try reinstallation of Firefox.

    Flash can give the CPU some work so you might want to load Flashblock.

    John
     
  3. ViciousXUSMC

    ViciousXUSMC Master Viking NBR Reviewer

    Reputations:
    11,461
    Messages:
    16,824
    Likes Received:
    76
    Trophy Points:
    466
    sounds like the work of spyware or a virus... id try a new install of firefox first and go from there like John said.
     
  4. t12ek

    t12ek Notebook Consultant

    Reputations:
    9
    Messages:
    190
    Likes Received:
    0
    Trophy Points:
    30
    Since you're posting in the Linux forum, I'm assuming you're running some Linux distro, correct? If that's the case, I doubt that it's a spyware/virus issue. But, it's definitely not normal to have that much CPU usage for just loading web pages (I'm also assuming you just mean regular web pages, not like, 20 tabs, all loading really flash heavy pages).

    Since this is a Linux question and not Windows, I doubt that reinstalling Firefox (unless you replace config files, but I'll get to that in a minute) will actually do anything useful. As for the config files, better to just manually back them up and reload the defaults.

    Okay, so, for starters, which distro are you using? Honestly, it shouldn't really matter, but it's nice to know because sometimes distro specific problems do crop up.

    I guess, the first thing is to make sure that it is indeed the Firefox that's taking up all your resources, so open up a terminal and run "top" (views running processes), then load a couple web pages and check to make sure that it's the Firefox process that's using the CPU (it's "firefox-bin" on my computer).

    Another thing you can try is backing up your Firefox settings to see if that's the problem and reloading the default ones.

    You can do this with the following command:
    Code:
    $ mv ~/.mozilla/firefox ~/.mozilla/firefox.bak
    Then reloading Firefox, it will automatically load the default profile again. See if that makes a difference. Note that this will also backup any extensions and add-ons that you've added through your user account, but it won't effect any system-wide plugins (like the mplayer-plugin, or flashplayer-plugin for example).

    If you find that that doesn't make a difference, you can always restore your old profile with the following commands:
    Code:
    $ rm -r ~/.mozilla/firefox/
    $ mv ~/.mozilla/firefox.bak ~/.mozilla/firefox
    
    This should give you a good start at least to narrowing down the problem. Let us know what you figure out.
     
  5. Bog

    Bog Losing it...

    Reputations:
    4,018
    Messages:
    6,046
    Likes Received:
    7
    Trophy Points:
    206
  6. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    I'll check it out. Another sympto is that say a page loads, then when I scroll down for the first time, I again get very high cpu utilisation. Only for the first time, when I scroll back up and back down again, things are fine.
    I should mention I usually have a lot of tabs open in my firefox session, and firefox gobbles up memory.
    Eg, top gives 733m-Virtual, 572m-Res, and 26m- Shared.
    I have 2GB of ram.

    My OS is Suse SLED-10
     
  7. t12ek

    t12ek Notebook Consultant

    Reputations:
    9
    Messages:
    190
    Likes Received:
    0
    Trophy Points:
    30
    Does it still exhibit the same problems when you have only a handful of tabs open? (< 5)
    Even with 2GB, could you be maxing out your ram? Does top show you using your swap space?
     
  8. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    Yes, even with one tab open, the cpu utilisation jumps up for a second or two when the page is loading (30-50% ;).
    Though I could not replicate the behavior of cpu utilisation jumping when I was scrolling the page for the first time when only one tab was open.

    I've observed the same behavior on Mandriva
     
  9. LIVEFRMNYC

    LIVEFRMNYC Blah Blah Blah!!!

    Reputations:
    3,741
    Messages:
    2,382
    Likes Received:
    0
    Trophy Points:
    55
    Maybe any FF plugins could be the cause.
     
  10. band-aid

    band-aid Notebook Consultant

    Reputations:
    1
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    30
    Firefox always acted weird when I had IPv6 enabled. Blacklist it in about:config and see if it works any faster.
     
  11. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    Yep, some plugins can really mess things up.

    I had a proxy switching plugin (can't remember the name) that I used until a few weeks ago. I got rid of it when I noticed that creating a new firefox window (yes, window, not tab) was very slow: the CPU would go to 100% for a few seconds and then the new window would appear. I found that plugin was the culprit. I removed it and everything was fine again. I replaced it with FoxyProxy which works fine.

    One thing you can do to help diagnose the problem is to run:

    $ firefox -safe-mode

    It will start firefox without loading plugins, extensions, etc. You can then check whether you still have the problem. Another thing which may be useful for testing is to run it as if you were another user. If you run

    $ firefox -ProfileManager

    Firefox will start with a profile manager window. You can then create a brand new profile and use that profile to start firefox. You can then check whether you still have that problem or not.

    Edit: Actually t12ek's suggestion achieves the same thing as -ProfileManager.
     
  12. monkey89

    monkey89 Notebook Enthusiast

    Reputations:
    2
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    5
    What graphics card do you have? It's possible that you aren't using the proper drivers, which means the CPU is forced to do a lot more work to render the pages. If you have an nVidia/ATi card, try using the official binary drivers and see if that improves things.
     
  13. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    I have a Nvidia quadro fx 1500m card, but I had the same problem on other computers too..
    I tried firefox in safe mode, with a new profile, with ony one tab, and while the problem was less pronounced, it still existed. CPU usage by firefox would still hit upto 50% when a page was loading.
    I'm surprised you guys dont see this.
     
  14. lemur

    lemur Emperor of Lemurs

    Reputations:
    524
    Messages:
    1,024
    Likes Received:
    0
    Trophy Points:
    55
    1. Are you using top for CPU usage? (One of your previous messages suggests that you do.)

    2. How long does that usage stay up when you load a page?

    3. Does it affect the responsiveness of the GUI?

    4. It would be helpful to know what drivers you are using for X. Find the section called "Device" in /etc/X11/xorg.conf and tell us what it says. In my conf file, it looks like this:

    Code:
    Section "Device"
            Identifier      "ATI Technologies Inc Radeon R250 [Mobility FireGL 9000]
    "
            Driver          "ati"
            BusID           "PCI:1:0:0"
    EndSection
    
    My CPU usage hits 100% for a fraction of a second when I load a page. For sure, I have a much crappier processor right now (Intel(R) Pentium(R) M processor 1.60GHz says /proc/cpu) than you do. Still, in my case I know it's nothing to worry about.
     
  15. wearetheborg

    wearetheborg Notebook Virtuoso

    Reputations:
    1,282
    Messages:
    3,122
    Likes Received:
    0
    Trophy Points:
    105
    1. I use top

    2. CPU usage is high for 1-2 secs.

    3. Yes, but not a whole lot. What does sometimes freeze is when firefox is opening a new tab, the current tab freezes, or becomes very sluggish, when I try to do scroll, or type something in the reply box.

    Code:
    Section "Device"
      BoardName    "Quadro FX 1500M"
      BusID        "1:0:0"
      Driver       "nvidia"
      Identifier   "Device[0]"
      Screen       0
      VendorName   "NVIDIA"
    EndSection