LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-11-2015, 01:38 PM   #1
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Firefox Hogging cpu?


I'm running into firefox hogging the cpu (like 178% in top) sometimes from startup, with 1 or 2 stationery displayed tabs. I'm using firefox-42.0 installed with Ruario's script.I had it also in firefox-32.0.3. Kill it, and it starts again in a few minutes. Or it might not.

I have a standard 14.1 and use AdBlockPlus, NoScriot, and a fkesh video downloader extensions. What's the deal?
 
Old 11-11-2015, 03:46 PM   #2
Arcosanti
Member
 
Registered: Apr 2004
Location: Mesa, AZ USA
Distribution: Slackware 14.1 kernel 4.1.13 gcc 4.8.2
Posts: 246

Rep: Reputation: 22
It's an issue that seems to affect firefox regardless of the OS. Perhaps cpulimit might be able to help you.

http://slackbuilds.org/repository/14...earch=cpulimit

You'll have to make some changes to how you fire up firefox for this to work.
 
Old 11-11-2015, 04:52 PM   #3
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
I never see Firefox CPU spiking except when initially loading a page or watching a video. You may want to try uBlock Origin and uMatrix as replacements for AdBlockPlus and NoScript, they should be a little lighter on resources. I'm not familiar with flash(?) video downloader but you may want to disable that add-on to see if it might be the culprit. Also is the CPU spiking occurring only when you have specific web pages loaded in a tab?
 
1 members found this post helpful.
Old 11-11-2015, 05:43 PM   #4
Arcosanti
Member
 
Registered: Apr 2004
Location: Mesa, AZ USA
Distribution: Slackware 14.1 kernel 4.1.13 gcc 4.8.2
Posts: 246

Rep: Reputation: 22
Quote:
Originally Posted by speck View Post
I never see Firefox CPU spiking except when initially loading a page or watching a video. You may want to try uBlock Origin and uMatrix as replacements for AdBlockPlus and NoScript, they should be a little lighter on resources. I'm not familiar with flash(?) video downloader but you may want to disable that add-on to see if it might be the culprit. Also is the CPU spiking occurring only when you have specific web pages loaded in a tab?
Unfortunately I have. Both in Windows XP and Linux. I just switched over to kernel 4.1.13 from kernel 4.0.4 and I have just noticed that IceCat, a GNU rebranded Firefox, is not hogging the processor amymore. Hmm interesting. Under kernel 4.0.4 it was running at around 99 percent on both cores.

Last edited by Arcosanti; 11-11-2015 at 05:47 PM.
 
Old 11-11-2015, 05:50 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I habitually have to kill F/F - even on 4.? kernels. Now that you mention it, I haven't really noticed the problem on 4.4.0 though ... hmmm I'll keep an eye on it.
 
Old 11-11-2015, 06:12 PM   #6
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
Quote:
Originally Posted by Arcosanti View Post
Unfortunately I have. Both in Windows XP and Linux. I just switched over to kernel 4.1.13 from kernel 4.0.4 and I have just noticed that IceCat, a GNU rebranded Firefox, is not hogging the processor amymore. Hmm interesting. Under kernel 4.0.4 it was running at around 99 percent on both cores.
I run a pretty light desktop (just bare Openbox) with the nouveau drivers and haven't seen Firefox have any issues like that in at least a few years (although I've heard others have). My hardware isn't particularly great (first gen i3 and 4GB ram) and I'm also running the newest 4.1.x kernel on Slackware 14.1. I wonder if it's a particular combination of GUI desktop/video driver/hardware/etc. that's causing the CPU utilization issue?
 
Old 11-11-2015, 08:35 PM   #7
pzognar
Member
 
Registered: Jun 2015
Distribution: Debian Jessie 64
Posts: 163
Blog Entries: 9

Rep: Reputation: Disabled
Many years ago, I had Firefox hogging the CPU. Turns out that it was because the spinny thing (when waiting for a page to load) and the graphics driver. Anything animated (like the spinny thing) would do it. Eventually fixed it by using the driver for my card instead of the fallback vesa driver. Obviously I am unsure if that is the cause of your problem.
 
1 members found this post helpful.
Old 11-12-2015, 12:22 AM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Have you tried with a new profile to see if it's due to some configuration issue with yours?

Also, you may want to look at ublock origin instead of ABP. It is supposed to be much easier on your system resources.
 
1 members found this post helpful.
Old 11-12-2015, 05:08 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Thank you for the helpful replies, gentlemen
  • No, I have not tried with a new profile, but will certainly try it because that box is old and it doesn't hurt.
  • I will certainly try uBlock - thank you.
  • Yes, eye candy of any sort would slow things. If I'm playing a movie full screen, the thing sometimes can't keep lip movements in synch when someone is speaking fast.Bad built in video.
 
Old 11-12-2015, 09:10 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Well, removing ~/.mozilla did make a significant difference. It still loads a single uncomplicated page http://apod.nasa.gov/apod/astropix.html, displays it, and is still hogging 80 in top, although it goes down to 2%.

Now off to work on sounds and eye candy in about:config. I have to be diligent with that piece of trailing edge technology to get performance. I will also drop ABP for uBlock. I backed up the bookmarks, and can add them in.

Last edited by business_kid; 11-12-2015 at 09:12 AM.
 
Old 11-12-2015, 12:15 PM   #11
pzognar
Member
 
Registered: Jun 2015
Distribution: Debian Jessie 64
Posts: 163
Blog Entries: 9

Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
trailing edge technology
That phrase makes me smile.

A low-cpu way of blocking some advertisements is to use the /etc/hosts file to block domains.
 
1 members found this post helpful.
Old 11-13-2015, 01:59 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Original Poster
Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Quote:
Originally Posted by pzognar View Post
That phrase makes me smile.

A low-cpu way of blocking some advertisements is to use the /etc/hosts file to block domains.
Ingenious! What's the syntax?
 
Old 11-13-2015, 02:32 AM   #13
bormant
Member
 
Registered: Jan 2008
Posts: 426

Rep: Reputation: 240Reputation: 240Reputation: 240
Quote:
Originally Posted by business_kid View Post
What's the syntax?
man hosts describes the syntax. You can resolve that domains to 127.0.0.0 instead of their IPs, for ex.
Code:
127.0.0.1 www.microsoft.com microsoft.com
As result:
Code:
ping microsoft.com
PING microsoft.com (127.0.0.1) 56(84) bytes of data.
...
 
Old 11-13-2015, 06:47 AM   #14
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
If you want a pre-configured hosts file, winhelp2002.mvps.org contains a massive one with over 15k entries.

http://winhelp2002.mvps.org/hosts.txt

If you want to set up a cron job to update the file automatically, see this page.
 
Old 11-13-2015, 10:14 AM   #15
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
Quote:
Originally Posted by bassmadrigal View Post
If you want a pre-configured hosts file, winhelp2002.mvps.org contains a massive one with over 15k entries.

http://winhelp2002.mvps.org/hosts.txt

If you want to set up a cron job to update the file automatically, see this page.
It seems to me that anyone who downloads a file as root, replaces /etc/hosts with it, and marks it executable is just asking for trouble.

What if that file was replaced with something malicious? Call me paranoid, but having a script blindly download anything as root seems dangerous. If you plan to do so at the very least add into your download script the ability to verify the file is not malicious. I think it might be safer to set up a squid service that does the ad blocking. A Raspberry Pi or similar micro chip computer would be perfect for such a thing.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Opengl applications hogging CPU boogerballs Linux - Desktop 7 01-10-2015 10:28 AM
FF 5.0 hogging the cpu withHTML5 webm entz Linux - Software 1 07-20-2011 05:16 PM
[SOLVED] java hogging CPU (both Firefox/Chrome) temps skyrocket Ubunoob001 Ubuntu 5 06-05-2010 08:35 PM
CPU hogging. kirankumarburgu Programming 3 01-05-2009 11:02 AM
Zombie/Sleeping processes hogging CPU nomind Linux - General 2 04-21-2006 11:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration