Bug 923416 - Firefox consumes too much CPU
Firefox consumes too much CPU
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: firefox (Show other bugs)
6.4
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Martin Stransky
Desktop QE
: OtherQA
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-19 15:08 EDT by Alexander Todorov
Modified: 2013-10-09 04:34 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-09 04:34:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alexander Todorov 2013-03-19 15:08:02 EDT
Description of problem:
Freshly started Firefox with empty start page consumes 8% CPU according to top. 

While loading Bugzilla and entering this bug the CPU usave was between 10 and 25% as far as I could see. 

I'm not sure, but that was probably the cause of my Lenovo X220 battery being drained very quickly two days ago. (Normal desktop usage can survive up to 4-5 hrs, it didn't last even 2 hrs the other day). 

I didn't have any such issues with previous versions of Firefox.


Version-Release number of selected component (if applicable):
firefox-17.0.3-1.el6_3.x86_64
Comment 1 Martin Stransky 2013-03-22 06:49:42 EDT
Do you have ny special extension installed? Can you try to run FF in safe mode? ($firefox -safe-mode). And can you reproduce it with upstream binary from mozilla.org?
Comment 2 Alexander Todorov 2013-03-25 04:26:51 EDT
I have several non standard extensions but I doubt they are the cause b/c I had the same with previous versions as well. 

Running in safe mode isn't that much different. When FF loads the CPU usage spikes at around 10%. If I wait it settles down to 1% or less. 

While loading this page it spikes back to 16% then settles down once the page is fully loaded. If I scroll down to the bottom of the page after it's been loaded CPU usage spikes back to 20% for a short time.

While typing this comment the average CPU usage is 4-5%.
Comment 3 Martin Stransky 2013-03-25 04:29:58 EDT
If the scrolling causes the load it's caused by your graphics driver. I can reproduce it with VESA X drivers. Generally any overdraw of the page causes the power peek. 

Which X driver do you run? It may be caused some unsupported graphics operation which has to be emulated by CPU.
Comment 4 Alexander Todorov 2013-03-25 08:43:19 EDT
Looking at this again I see Xorg right next to Firefox in top output. 

I don't know how to reliably tell which Xorg driver I am using. NOTE: I don't have xorg.conf file, it's auto configured. I googled some commands and here's what comes out:


$ lspci -nnk | grep -i vga -A3 
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09)
	Subsystem: Lenovo Device [17aa:21da]
	Kernel driver in use: i915
	Kernel modules: i915


$ grep LoadModule /var/log/Xorg.0.log
[    57.434] (II) LoadModule: "glx"
[    57.444] (II) LoadModule: "intel"
[    57.445] (II) LoadModule: "vesa"
[    57.445] (II) LoadModule: "modesetting"
[    57.445] (II) LoadModule: "fbdev"
[    57.467] (II) LoadModule: "fbdevhw"
[    57.679] (II) LoadModule: "fb"
[    57.689] (II) LoadModule: "dri2"
[    57.860] (II) LoadModule: "evdev"


$ egrep -i " connected|card detect|primary dev" /var/log/Xorg.0.log | grep II
[    57.678] (II) intel(0): Output LVDS1 connected


I guess it's the intel driver. If you want me to execute another command just let me know which one.
Comment 5 Martin Stransky 2013-04-18 08:00:25 EDT
Yes, it's the intel driver...assigning to Xorg.
Comment 9 Adam Jackson 2013-06-25 15:31:11 EDT
How is this the intel driver?  The only way the intel driver uses CPU is if a client application asked it to do something.  If you don't want it to use CPU, stop telling it to draw things.
Comment 10 Martin Stransky 2013-10-08 08:49:06 EDT
I have intel video cards on all my company laptops and I can't reproduce the issue. I guess it somehow specific to the hardware - missing HW acceleration or so (scrolling can use OpenGL textures in FF).

Anyway, Alexander, you can turn off the OpenGL acceleration (Pereferences -> Advanced -> General -> turn off hw acceleration - see http://lifehacker.com/disable-firefoxs-hardware-acceleration-to-fix-slowness-749344037).
Comment 11 Alexander Todorov 2013-10-09 04:30:23 EDT
I now have firefox-17.0.9-1.el6_4.x86_64 and with HW acceleration turned off it looks to be better although I still can see Firefox spikes up to 14% CPU consumption from time to time.

Note You need to log in before you can comment on or make changes to this bug.