wh7qq
Posts: 1059
Joined: Thu Oct 09, 2014 2:50 am

[SOLVED]Java script a resource hog

Mon Oct 10, 2016 11:40 pm

Edit: 10/13/2016.This problem is not a pixel issue as originally reported, but with javascript.

I installed the latest update with Pixel today on my RPi3 and after a short period of happy browsing on Chromium, I was greeted by the thermometer icon on the right side of my screen. Running

Code: Select all

/opt/vc/bin/vcgencmd measure_temp
, I saw I was above 80 C. I tried using less gpu memory but that was no help. Only killing the browser would bring the temp down. I already have copper heat sinks installed on the two upper chips so a fan is the next step for cooling but the noise increase is unacceptable. With htop, I see my pi using 100% of all four cpu cores.

Any suggestions for minimizing the load?
Last edited by wh7qq on Thu Oct 13, 2016 9:08 pm, edited 4 times in total.

User avatar
DougieLawson
Posts: 33620
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Pixel a resource hog

Tue Oct 11, 2016 7:34 am

Get a stick on heatsink.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

gordon77
Posts: 3340
Joined: Sun Aug 05, 2012 3:12 pm

Re: Pixel a resource hog

Tue Oct 11, 2016 7:48 am

Is that on top of the existing heatsink they have ? ;)

User avatar
DougieLawson
Posts: 33620
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Pixel a resource hog

Tue Oct 11, 2016 7:53 am

gordon77 wrote:Is that on top of the existing heatsink they have ? ;)
Ok get a fan.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

gkreidl
Posts: 5689
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Pixel a resource hog

Tue Oct 11, 2016 8:35 am

wh7qq wrote:I installed the latest update with Pixel today on my RPi3 and after a short period of happy browsing on Chromium, I was greeted by the thermometer icon on the right side of my screen. Running

Code: Select all

/opt/vc/bin/vcgencmd measure_temp
, I saw I was above 80 C. I tried using less gpu memory but that was no help. Only killing the browser would bring the temp down. I already have copper heat sinks installed on the two upper chips so a fan is the next step for cooling but the noise increase is unacceptable. With htop, I see my pi using 100% of all four cpu cores.

Any suggestions for minimizing the load?
It's not "Pixel", which is just a new LXDE desktop design.
All Browsers are resource hogs, at least once you start using them and open lots of web pages.
On the RPi you should NEVER open more than a few web pages at the same time. It will soon start swapping, because the browser will need more memory,
You should restart the browser from time to time because it is caching a lot and will therefore use lots of memory.

Both Firefox and Chromium are multi-threaded and use multiple cores. Some web pages are simply programs written in JS which are running all the time. This will take a lot of your processing power although nothing really seems to happen and especially when you are connected to multiple websites of this kind.

A heat sink won't help much without a good airflow. With most RPi cases the airflow is terribly bad or there is none at all. For my RPi3 I use a case with open sides and it almost never starts to throttle, even when all 4 cores are running at 100% (I'm not using a fan and don't want to).
Or get the FLIRC case.
Last edited by gkreidl on Tue Oct 11, 2016 8:37 am, edited 1 time in total.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

fruitoftheloom
Posts: 17295
Joined: Tue Mar 25, 2014 12:40 pm

Re: Pixel a resource hog

Tue Oct 11, 2016 8:37 am

wh7qq wrote:I installed the latest update with Pixel today on my RPi3 and after a short period of happy browsing on Chromium, I was greeted by the thermometer icon on the right side of my screen. Running

Code: Select all

/opt/vc/bin/vcgencmd measure_temp
, I saw I was above 80 C. I tried using less gpu memory but that was no help. Only killing the browser would bring the temp down. I already have copper heat sinks installed on the two upper chips so a fan is the next step for cooling but the noise increase is unacceptable. With htop, I see my pi using 100% of all four cpu cores.

Any suggestions for minimizing the load?
What other Processes are running at the same time ??? https://www.raspberrypi.org/magpi/command-line-pi
Adieu

wh7qq
Posts: 1059
Joined: Thu Oct 09, 2014 2:50 am

Re: Pixel a resource hog

Tue Oct 11, 2016 4:32 pm

Both Firefox and Chromium are multi-threaded and use multiple cores. Some web pages are simply programs written in JS which are running all the time. This will take a lot of your processing power although nothing really seems to happen and especially when you are connected to multiple websites of this kind.

A heat sink won't help much without a good airflow. With most RPi cases the airflow is terribly bad or there is none at all. For my RPi3 I use a case with open sides and it almost never starts to throttle, even when all 4 cores are running at 100% (I'm not using a fan and don't want to).
Or get the FLIRC case.
Firefox seems marginally better than chromium in this regard...the 80 C milestone takes a bit longer but you can see both rising several degrees per min. or more. The worst offender, as far as web design, I have encountered is adafruit.com. Most web pages coast along in the 60's even with several pages going but a single instance of adafruit.com has me rapidly heading to 80 and beyond. Right now, I am at 52 C with firefox and with gmail and this page open. It is early morning so the room temp is cooler...mid 70 F (Hawaii).

As far as air flow, I use an adafruit VESA mount open on all sides, on the back of my Viewsonic LCD monitor. It is one of the older, fluourescent backlights so it runs a bit warmer than the LED type. The RPi is thus on its edge so it should cool convectively. Bluetooth and wifi are not activated. I never had this issue rear its ugly head with prior upgrades of Raspbian. The heatsinks, I think, don't do much. Maybe the conductive tape has higher thermal resistance than it should.

ElEscalador
Posts: 598
Joined: Tue Dec 15, 2015 4:55 pm
Location: Detroit, MI USA
Contact: Website

Elescalador

Tue Oct 11, 2016 5:03 pm

At what temp does the icon come on? I have a couple running - the one I'm using to vnc into thr other gets hotter and taking the cover off both has helped...but I think 65C is the hottest I've seen either get. I ordered heat sinks and cases with fans, but hope not to need the fans. Is 65 not even enough to worry about - I only noticed because they were acting sluggish as heck, although I don't know for sure that temp was the culprit.
My Autonomous Robot Project and a few of my other projects below.

https://lloydbrombach.wordpress.com/

Tinderbox (UK)
Posts: 53
Joined: Sat Oct 08, 2016 8:56 pm
Location: England, United Kingdom

Re: Pixel a resource hog

Tue Oct 11, 2016 5:34 pm

The Pi 3 SOC begins to throttle at 80c fitting a standard heatsink to the soc in an enclosed case only slows the fast rise to 80c, you need a fan to keep the temps around 70c , the SOC is rated to 125c but only guaranteed to 85c

I saw a video of a big heatsink (no fan but open to the air) attached to the soc and the guy overclocked the Pi3 from 1200mhz to 1400mhz and the temp only hit around 60c after 10min of 100% cpu usage.

John.
Raspberry Pi 3 Model B

User avatar
r3d4
Posts: 934
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Pixel a resource hog

Wed Oct 12, 2016 2:56 pm

wh7qq wrote:I installed the latest update with Pixel today on my RPi3 and after a short period of happy browsing on Chromium,
Any suggestions for minimizing the load?
how was this diffrent to 'happy browsing on Chromium' before you updated ?

wrt : minimizing the load ... first on the list imho should bee disable javascript !

wh7qq
Posts: 1059
Joined: Thu Oct 09, 2014 2:50 am

Re: Pixel a resource hog

Wed Oct 12, 2016 10:33 pm

I ran a test this morning...loaded the offending web page (https://learn.adafruit.com/external-dri ... t?view=all) in Firefox and watched the temp rise to 75C where I stopped the test. Cpu usage remained at 100% for the duration of the test. After going into about:config and disabling javascript, cpu usage stayed below 10% after the initial load and the temp stayed under 60C.

Doing the same test with Chromium, there seemed to be little or no difference if javascript was enabled or disabled in the privacy settings. In both cases, cpu utilization was over 60% and the temp rose, albiet more slowly, past 70C and still rising.

Conclusion is forget Chromium (which I did not have on previous upgrades anyway) and to turn off javascript in Firefox. It does mess up my gmail...have to run it in html mode...but that is no loss to me. We shall see about other sites. Of some interest, closing the window to the panel task bar had no effect on Chromium but did reduce cpu utilization in Firefox to nearly 0%.

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Pixel a resource hog

Thu Oct 13, 2016 12:48 am

Firefox has noScript to kill the resource hogging Javascript. You do not have to waste 3 cores to display animated advertising.

wh7qq
Posts: 1059
Joined: Thu Oct 09, 2014 2:50 am

Re: Pixel a resource hog

Thu Oct 13, 2016 5:20 am

Yes, that is why I disabled it in about:config without adding another plug-in. See above:
After going into about:config and disabling javascript, cpu usage stayed below 10% after the initial load and the temp stayed under 60C.
It worked.

wh7qq
Posts: 1059
Joined: Thu Oct 09, 2014 2:50 am

Re: Pixel a resource hog

Thu Oct 13, 2016 8:26 pm

I was premature (wrong) to blame Pixel for the overheating. I tried an older backup with Firefox installed and again the usage went to 100% and the temp went over 70C so I stopped it. Not having the thermometer icon in previous editions, I might not have noticed the overheating or just was in the web page a short time or I was using a different computer. The problem is with pages that extensively use javascript...which turns out to be many of them, in spite of the security issues. Lazy web designers.

peterlite
Posts: 720
Joined: Sun Apr 17, 2016 4:00 am

Re: Java script a resource hog

Thu Oct 13, 2016 8:49 pm

"Lazy web designers"
The advertisers demand animation and a constant stream of information on what you are looking at on the page. Most of the Javascript is advertising for your customers or for your own marketing dictators. NoScript lets you turn off all the external javascript without removing the little bit that loads images from CDNs.

wh7qq
Posts: 1059
Joined: Thu Oct 09, 2014 2:50 am

[SOLVED] Java script a resource hog

Thu Oct 13, 2016 9:06 pm

Good suggestion. Thank you. I had disabled javascript in about:config to avoid loading still another plugin, but it wiped out too many web pages or prevented filling in data. Noscript allows normal web page viewing but keeps the offending scripts to a minimum. Thanks again.

Return to “Troubleshooting”

Who is online

Users browsing this forum: OzOns and 35 guests