Skip to main content
Home
The Baheyeldin Dynasty
The journey for wisdom starts with knowledge
  • Home
  • About
  • Site Map
  • Contact

Solutions to Firefox using too much CPU on Ubuntu Linux

  1. Home

By Khalid on 2012/07/23 - 00:51, last updated 2022/11/16 - 15:14

Ubuntu decided several months ago to forgo its policy of sticking with Firefox 3.6, and go with the latest versions from Mozilla.

With Firefox 13 running on Ubuntu 10.04, I had good performance, and did not suffer from this problem that I am about to describe. The only issue I faced was excessive disk activity and that was fixed by disabling the FireBug extension. Other than that, Firefox was speedy and responsive.

However, things changed when I upgrade to Firefox 14 a week ago, again on Ubuntu 10.04. This was installed 18-July-2012 to be specific, and the version is 14.0.1+build1-0ubuntu0.10.04.1.

Ever since the upgrade, I am seeing high CPU usage, and it is not related to the number of tabs or windows that are open.

With a single tab, with no site loaded, Firefox takes 5% of CPU

To narrow down what is using a lot of CPU, I used oprofile a system wide profiler, with the debugging symbols for Firefox.

The following simple shell script was used:

#!/bin/sh

DIR=/tmp/oprof.$$

opcontrol --no-vmlinux --session-dir=$DIR
opcontrol --callgraph=6
opcontrol --start
sleep 15
opcontrol --shutdown

opreport -a -l --session-dir=$DIR

Here is the output from the above script:

samples      %   image-name      app-name       symbol-name
33103    54.22   no-vmlinux      no-vmlinux     /no-vmlinux
 5818     9.53   libxul.so       libxul.so      pref_enumChild
 3934     6.44   libc-2.11.1.so  libc-2.11.1.so __GI___strncmp_ssse3
 1289     2.11   oprofiled       oprofiled      /usr/bin/oprofiled
  752     1.23   libxul.so       libxul.so      PL_DHashTableEnumerate

As you can see, 9.5% are in libxul.so, in the pref_enumChild() function.

Loading a single tab, with www.washingtonpost.com, and with Javascript disabled for it using NoScript.

Same 5% of Firefox usage.

With 5 Windows open, as I used to do with Firefox 13, CPU usage goes up to between 19% to 22% just for Firefox. Same function uses 16% of the calls.

samples     %    image-name      app-name       symbol-name
51944   39.44    no-vmlinux      no-vmlinux     /no-vmlinux
21390   16.24    libxul.so       libxul.so      pref_enumChild
10671    8.10    libc-2.11.1.so  libc-2.11.1.so __GI___strncmp_ssse3
 3007    2.28    oprofiled       oprofiled      /usr/bin/oprofiled
 2669    2.02    libxul.so       libxul.so      PL_DHashTableEnumerate

Something is seriously broken Mozilla, and needs to be fixed.

Anyone has solutions or workarounds for this?

Update: 27 July 2012.

The problem is fixed, but I have no idea what fixed it.

What I did was try the ESR release (10.0.5). I just extracted it, changed to the firefox directory, then run ./firefox. It checked the plugins for compatibility, then started normally. CPU usage was high, the same as Firefox 14.

After that, I launched Firefox 14 normally, and again it checked the plugins. However, this time CPU usage is low again.

Update 27 February 2014

At present, I am on KDE Ubuntu 12.04 64 bit.

After having Firefox eat up close to 50% of the CPU (i.e. one CPU on a dual core laptop), here is what I have done to solve this problem:

1. Disable and remove the FireBug extension. This extension was causing a lot of disk I/O, and slowing down the entire laptop.

2. Disable and remove the YSlow extension. This was causing the CPU usage to spike to 50%, and the fan to go on continuously. Once disabled, the CPU usage by Firefox is between 2% and 10%.

See Also

Ubuntu has opted to go for the latest releases, which may cause surprises. What I did is to install Firefox ESR on Ubuntu 12.04 64 bits.

Contents: 
Linux
Internet
Tags: 
Ubuntu
Firefox
CPU
oprofile
  • Add comment

Comments

masko (not verified)

firefox in 2013?

Sat, 2013/12/14 - 13:50

Hi,
I have used linux for years and after chrome is came the firefox is disappear from my life as from life of many other ubuntu users and linux users at all. sorry but is there any reason to use firefox? it always used and uses high cpu especially at linux system.

  • reply

Informatic (not verified)

I had a similar problem,

Fri, 2014/01/17 - 06:32

I had a similar problem, firefox slows down my computer terribly. I've been desperate enough that I wanted to change to chrome. But we know with google chrome we have got zero privacy. It turned out that one of the plugs going crazy, this extension consumed huge amounts of resources. It is worthwhile to test it and turn off each part of the plug-ins and see if your firefox will work faster. Maybe it was the same with your firefox?

  • reply

Current

Pandemic

  • COVID-19
  • Coronavirus

Search

Site map

Contents

  • Family
    • Khalid
    • Ancestry
    • Extended
  • Friends
  • Nokat نكت
  • Writings
    • Cooking
    • Culture
    • Science
    • History
    • Linguistics
    • Media
    • Literature
    • Politics
    • Humor
    • Terrorism
    • Business
    • Philosophy
    • Religion
    • Children
  • Technology
    • Linux
    • Arabization
    • Drupal
      • Association
    • Software
    • Internet
    • Technology in Society
    • Digital Archeology
    • NCR History
    • MidEast Internet
    • Programming
    • Saudi ISPs
    • Miscellaneous
  • Places
    • Canada
      • Weather
    • Egypt
      • Cuisine
      • Alexandria
      • E.G.C.
    • USA
    • Saudi Arabia
  • Interests
    • Astronomy
    • Fishing
    • Photography
    • Snorkeling
    • Nature
    • Photomicroscopy
  • Miscellany

In Depth

  • al-Hakim bi Amr Allah: Fatimid Caliph of Egypt الحاكم بأمر الله
  • Alexandria, Egypt
  • Arabic on the Internet
  • Articles on the history of Muslims and Arabs in the Iberian Peninsula تاريخ المسلمين و العرب في الأند
  • DIY GOTO Telescope Controller With Autoguiding and Periodic Error Correction
  • E.G.C. English Girls College in Alexandria, Egypt
  • Egyptian Cuisine, Food and Recipes مأكولات مصرية
  • George Saliba: Seeking the Origins of Modern Science?
  • Internet Scams and Fraud
  • Mistaken for an Arab or Muslim: Absurdities of being a victim in the War on Terror
  • Mistaken Identity: How some people confuse my site for others
  • One People's Terrorist Is Another People's Freedom Fighter
  • Overview of Google's Technologies
  • Photomicroscopy
  • Pseudoscience: Lots of it around ...
  • Resources for using Google Adsense with Drupal
  • Rockwood Conservation Area, Southern Ontario
  • Selected Symbolic Novels And Movies
  • Snorkeling the Red Sea near Jeddah
  • Updates and Thoughts on the Egyptian Revolution of 2011

Recent Content

Most recent articles on the site.

  • Origin Of COVID-19: Natural Spillover, Lab Leak Or Biological Weapon?
  • Kamal Salibi and the "Israel from Yemen" theory
  • How To Upgrade HomeAssistant Core In A Python Venv Using uv
  • Ancestry - Paternal Side
  • Review of Wait Water Saver For Whole House Humidifiers
more

Most Comments

Most commented on articles ...

  • Another scam via Craigslist: offering more than asking price
  • Warning to female tourists thinking of marrying Egyptians
  • Craigslist classified for used car: Cheque fraud scam
  • Winning the lottery scam email: World Cup South African lottery
  • Email Scam: BMW 5 Series car and lottery winning
more

About Khalid

Various little bits of information ...

  • Khalid Baheyeldin: brief biography
  • Presentations and Talks
  • Youtube Videos
  • GitHub Projects
  • Drupal.org Profile
  • Astrophotography @ Flickr

Sponsored Links

Your Link Ad Here

Tags

Android Mobile Ubuntu Sony OnStep OpenWRT Router Ericsson COVID-19 Rogers Coronavirus Arabic Kubuntu Home Assistant GSM Telescope tablet Spectrum Scam Python 419 Laptop Firefox DIY CPU Conspiracy Comet Balkanization backup App
More

© Copyright 1999-2025 The Baheyeldin Dynasty. All rights reserved.
You can use our content under the Terms of Use.
Please read our privacy policy before you post any information on this site.
All posted articles and comments are copyright by their owner, and reflect their own views and opinions, which may not necessarily be consistent with the views and opinions of the owners of The Baheyeldin Dynasty.

Web site developed by 2bits.com Inc.