johnmiller
Posts: 25
Joined: Thu Jan 08, 2015 8:38 am
Contact: Website

100% CPU all the time

Mon May 01, 2017 10:11 pm

I have a Raspberry Pi 2 Model B. It is running at 100% pretty much constantly.

Here is what I am running:
* Raspbian Jessie with Pixel (updated)
* FlightRadar24 Feed - http://feed.flightradar24.com/ - Sends flight data to server using USB antenna.
* VNC Server - https://www.realvnc.com/raspberrypi/ - Included with Jessie, allows viewing of Pi on other devices.
* Cayenne - https://mydevices.com/cayenne/features/ - Allows Pi status to be viewed on Android app.

I set the resolution of my Pi down to Default, but that didn't help.

My questions:
* Is it normal for my Pi to be running at 100%?
* Is it okay for the Pi to be running at 100% all the time?
* Is there any way I can reduce the load on the processor?

Thank you for your help!
John Miller
Raspberry Pi 2 Model B
Raspbian Jessie with Pixel

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: 100%

Mon May 01, 2017 10:34 pm

It is OK for it to be running 100%. You can check usage by opening a terminal and typing in:
top
And looking at the processes and how much CPU they use.
There are 10 types of people: those who understand binary and those who don't.

johnmiller
Posts: 25
Joined: Thu Jan 08, 2015 8:38 am
Contact: Website

Re: 100%

Tue May 02, 2017 12:38 am

Thank you!
John Miller
Raspberry Pi 2 Model B
Raspbian Jessie with Pixel

User avatar
HawaiianPi
Posts: 5838
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: 100%

Tue May 02, 2017 1:22 am

johnmiller wrote:I have a Raspberry Pi 2 Model B. It is running at 100% pretty much constantly.

* Is there any way I can reduce the load on the processor?
Which version of the Pi2 do you have?

The newer version 1.2 uses the same BCM2837 SoC as the Pi3, and it's a more efficient chip than the older BCM2836 SoC, so it could run at a reduced load even at the same 900MHz clock speed. You could also overclock it to 1.2GHz (the default speed of the Pi3), but I would recommend a fan and/or heatsink at that speed with high software loads.

Of course the other option would be to get a Pi3. The difference between the Pi2v1.2 and Pi3 is the higher default clock speed (Pi2v1.2=900MHz, Pi3=1.2GHz) and the Pi3 includes built-in WiFi & Bluetooth. If you don't need the built-in wireless features then a Pi2v1.2 clocked at 1.2GHz should give the same performance as a Pi3.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: 100%

Tue May 02, 2017 1:40 am

Extra tip... When top is running press the 1 key on your keyboard to see the usage of each core.

johnmiller
Posts: 25
Joined: Thu Jan 08, 2015 8:38 am
Contact: Website

Re: 100%

Tue May 02, 2017 2:58 am

Thank you for the replies! I appreciate them.

A Pi 3 would help a little bit, but I am guessing I would max that baby out too in no time! :-)

Here is one thought I had: Just use a PC or design a Linux-dedicated computer. I have built computers before. Also, I have Raspbian Jessie with Pixel running through a USB boot on a small ASUS laptop I have, and the CPU is at about 13% (a little bit lower than on my Pi!).

The issue, though: I want to prototype. But, I have not come across a way to interface a breadboard with a PC through USB or some other interface. Is there some way to do that?

Thank you again!
John Miller
Raspberry Pi 2 Model B
Raspbian Jessie with Pixel

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: 100%

Tue May 02, 2017 7:52 am

As others have suggested top (or htop) will let you see all the things that are running on the Pi and see what's generating the load.

Initially I would suspect Cayenne but that's based on no real evidence. Running something to upload to FR24 shouldn't stress the Pi that much (I ran some tools for RF24 a few years ago on a Pi1 with no issues).

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: 100%

Tue May 02, 2017 8:28 am

This is not down to the Pi itself, something is simply running a loop without reliquishing processor time during the loop when it doesn't need it (i.e. with a sleep or similar)

One of the apps you are running is slightly badly behaved/badly coded.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

johnmiller
Posts: 25
Joined: Thu Jan 08, 2015 8:38 am
Contact: Website

Re: 100% CPU all the time

Thu May 04, 2017 2:43 am

Cayenne was the culprit. I killed it. :-)

If any of you out there want to know how to uninstall it, here you go:

Code: Select all

sudo systemctl disable myDevices
rm -rf /etc/systemd/system/myDevices.service
rm -rf /etc/init.d/myDevices
rm -rf /usr/bin/myDevices
rm -rf /etc/myDevices/
John Miller
Raspberry Pi 2 Model B
Raspbian Jessie with Pixel

Return to “Beginners”