Firefox use lot of cpu

19,179

Solution 1

It seems to me that you aren't using the Hardware Acceleration (which could lead to high CPU consumption, or your hardware don't support it). If you have your Video drivers updated and correctly configured, you could force Firefox to use Hardware acceleration:

  1. Open about:config, accept that you know what you are doing (technically it's me)
  2. Search for layers.acceleration.force-enabled. If it's not created, right click an empty area, hit New > Boolean, and name it as layers.acceleration.force-enabled.
  3. Right click layers.acceleration.force-enabled and hit Toggle.
  4. Restart firefox and check your CPU consumption, should be manageable now.

How to know if you have HW-Accel

  1. Open up a terminal.
  2. Run sudo apt-get install mesa-utils
  3. Once it finish run glxinfo | grep render
  4. It should have a line that reads:

    direct rendering: Yes

    OpenGL renderer string: Gallium 0.4 on ATI RV515 (this line could be whatever)

If it's says No or the second line says Software rasterizer it means you are doomed needs to configure your video card (if it supports HWA) or buying a new shinny card.

Solution 2

Quite possible is that the root of the slowdown is one or several of installed FF extensions. Try disabling them one by one to see if they cause the problem. Initially, you may disable all of them to see if FF consumes significantly less resources in your case (there is an option in Help menu Restart with Add-ons Disabled...)

See a detailed instruction here: https://support.mozilla.org/en-US/kb/troubleshoot-extensions-themes-to-fix-problems

UPD: There is a list of known problematic FF extensions, to ease problem detection: http://kb.mozillazine.org/Problematic_extensions

Solution 3

I found the posting of @Hadi in a similar thread. [Link deleted because offline]

Try this solution

  1. Open Firefox.
  2. Type 'about:Config' into the address line and hit Go or return. This takes you into the Firefox expert Config menu.
  3. See if there is an entry called browser.cache.disk.capacity.

  4. If Yes then modify the value to 16384, close Firefox and restart Firefox.

  5. If No right click somewhere on the about:Config page and select Integer. Create an Integer entry called 'browser.cache.memory.capacity' and set it to 16384. Close Firefox and restart Firefox.

If this solution not work then install an AdBlock extension such as Adblock Plus

Share:
19,179

Related videos on Youtube

John
Author by

John

Updated on September 18, 2022

Comments

  • John
    John almost 2 years

    I have a notebook nb510 Toshiba with Ubuntu 12.04 and firefox 22.0 with extensions like addock-plus, x-notifier, download helper, xmarks. Sometimes it's take more cpu than 100% This information of firefox:

    @nb510:~$ top
    
    top - 02:23:57 up 18 min,  2 users,  load average: 0.42, 0.39, 0.36
    Tasks: 153 total,   1 running, 152 sleeping,   0 stopped,   0 zombie
    Cpu(s):  3.9%us,  0.8%sy,  0.0%ni, 95.2%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
    Mem:   2047344k total,   741132k used,  1306212k free,    54984k buffers
    Swap:  2068352k total,        0k used,  2068352k free,   370208k cached
    
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND   
     2320 john      20   0  576m 117m  36m S   117  5.9   1:31.67 firefox          
     1015 root      20   0  120m  39m 7588 S    9  2.0   2:02.09 Xorg     
     2088 john      20   0 92592  15m  11m S    7  0.8   0:11.30 gnome-terminal     
     2183 john      20   0  2852 1176  888 R    1  0.1   0:08.58 top                
        9 root      20   0     0    0    0 S    0  0.0   0:06.83 kworker/1:0        
        1 root      20   0  3636 2052 1316 S    0  0.1   0:01.80 init               
        2 root      20   0     0    0    0 S    0  0.0   0:00.00 kthreadd           
        3 root      20   0     0    0    0 S    0  0.0   0:00.02 ksoftirqd/0        
        6 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/0        
        7 root      RT   0     0    0    0 S    0  0.0   0:00.24 watchdog/0         
        8 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/1        
       10 root      20   0     0    0    0 S    0  0.0   0:00.13 ksoftirqd/1        
       12 root      RT   0     0    0    0 S    0  0.0   0:00.05 watchdog/1         
       13 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/2        
       15 root      20   0     0    0    0 S    0  0.0   0:00.03 ksoftirqd/2        
       16 root      RT   0     0    0    0 S    0  0.0   0:00.00 watchdog/2         
       17 root      RT   0     0    0    0 S    0  0.0   0:00.00 migration/3        
       18 root      20   0     0    0    0 S    0  0.0   0:00.88 kworker/3:0
    

    and this from firefox

      Paramètres de base de l'application
    
            Nom
            Firefox
    
            Version
            22.0
    
            Agent utilisateur
            Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:22.0) Gecko/20100101 Firefox/22.0
    
            Configuration de compilation
    
              about:buildconfig
    
      Extensions
    
            Nom
    
            Version
    
            Activée
    
            ID
    
            British English Dictionary
            1.19.1
            true
            [email protected]
    
            DownloadHelper
            4.9.17
            true
            {b9db16a4-6edc-47ec-a1f4-b86292ed211d}
    
            Element Hiding Helper pour Adblock Plus
            1.2.3
            true
            [email protected]
    
            Ubuntu Firefox Modifications
            2.6
            true
            [email protected]
    
            Xmarks
            4.2.1
            true
            [email protected]
    
            X-notifier
            3.3.3
            true
            {37fa1426-b82d-11db-8314-0800200c9a66}
    
      Préférences modifiées importantes
    
          Nom
    
          Valeur
    
            accessibility.typeaheadfind.flashBar
            0
    
            browser.cache.disk.capacity
            1048576
    
            browser.cache.disk.smart_size_cached_value
            1048576
    
            browser.cache.disk.smart_size.first_run
            false
    
            browser.places.smartBookmarksVersion
            4
    
            browser.startup.homepage
            http://www.google.fr/ig
    
            browser.startup.homepage_override.buildID
            20130627161504
    
            browser.startup.homepage_override.mstone
            22.0
    
            dom.mozApps.used
            true
    
            extensions.lastAppVersion
            22.0
    
            network.cookie.prefsMigrated
            true
    
            places.database.lastMaintenance
            1375143077
    
            places.history.expiration.transient_current_max_pages
            52413
    
            plugin.disable_full_page_plugin_for_types
            application/pdf
    
            plugin.importedState
            true
    
            privacy.sanitize.migrateFx3Prefs
            true
    
            security.warn_viewing_mixed
            false
    
            storage.vacuum.last.index
            0
    
            storage.vacuum.last.places.sqlite
            1375140331
    
      Accélération graphique
    
            Description de la carte
            VMware, Inc. -- Gallium 0.4 on llvmpipe (LLVM 0x300)
    
            Fenêtres avec accélération graphique
            0/1 Basic Bloqué pour la version de votre pilote graphique.
    
            ID du périphérique
            Gallium 0.4 on llvmpipe (LLVM 0x300)
    
            ID du vendeur
            VMware, Inc.
    
            Rendu WebGL
            Bloqué pour la version de votre pilote graphique.
    
            Version du pilote
            2.1 Mesa 8.0.4
    
            AzureCanvasBackend
            cairo
    
            AzureContentBackend
            none
    
            AzureFallbackCanvasBackend
            none
    
      JavaScript
    
            Ramasse-miettes incrémentiel
            true
    
      Accessibilité
    
            Activée
            false
    
            Empêcher l'accessibilité
            0
    
      Versions des bibliothèques
    
            Version minimale attendue
    
            Version utilisée
    
            NSPR
            4.9.6
            4.9.6
    
            NSS
            3.14.3.0 Basic ECC
            3.14.3.0 Basic ECC
    
            NSSSMIME
            3.14.3.0 Basic ECC
            3.14.3.0 Basic ECC
    
            NSSSSL
            3.14.3.0 Basic ECC
            3.14.3.0 Basic ECC
    
            NSSUTIL
            3.14.3.0
            3.14.3.0
    

    Thank you for your help

  • Bach
    Bach about 8 years
    Why should the value be 16384?