Bug 923416

Summary: Firefox consumes too much CPU
Product: Red Hat Enterprise Linux 6 Reporter: Alexander Todorov <atodorov>
Component: firefoxAssignee: Martin Stransky <stransky>
Status: CLOSED WONTFIX QA Contact: Desktop QE <desktop-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.4CC: atodorov, stransky, tpelka
Target Milestone: rcKeywords: OtherQA
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-09 08:34:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexander Todorov 2013-03-19 19:08:02 UTC
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 10:49:42 UTC
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 08:26:51 UTC
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 08:29:58 UTC
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 12:43:19 UTC
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 12:00:25 UTC
Yes, it's the intel driver...assigning to Xorg.

Comment 9 Adam Jackson 2013-06-25 19:31:11 UTC
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 12:49:06 UTC
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 08:30:23 UTC
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.