Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 14-04-2018, 17:37   #1
Registered User

Join Date: Jul 2017
Posts: 67
OpenCPN Rpi cpu usage and temperature

I am running OpenCPN (4.8.2) on an Rpi 3. I am monitoring system performance with the 'top' command in another terminal and looking at cpu temperature with /opt/vc/bin/vcgencmd measure_temp. When I start OpenCPN the CPU usage goes over 100% (not really sure what that means other than there are 4 CPU's so maybe max is 400%?). But what concerns me is that the cpu temperature rises by 20 degress (in my house environement) and I occasionally get the 'red' thermometer showing up in the tool bar.

I have followed the normal instructions for installing OpenCPN and its dependencies and plugins (I only have dashboard running in this case). I am wondering if there are a set of instructions for optimizing the performance on an Rpi and cutting down on cpu usage. I have enabled the graphics acceleration (OPENGL) in the OpenCPN setup, but I am not sure I loaded anything else specific for it.

Searching the web and this forum I have not found any recent sets of instructions concerning this.
thanks,
CapnRon47 is offline   Reply With Quote
Old 14-04-2018, 18:16   #2
Registered User

Join Date: Jul 2017
Posts: 67
Re: OpenCPN Rpi cpu usage and temperature

OK, after a bit more reading about OpenGL ( the graphics accelerator for Rpi) I realized that while I enabled it in OpenCPN I had not enabled the 'full' OpenGL in 'Raspi-Config.' After doing this the cpu usage of OpenCPN had dropped considerably (although a new processes Xorg is also there now). and the temperature rise is not as bad as before. It is still up about 10 degress from nothing running but this is manabable.
CapnRon47 is offline   Reply With Quote
Old 14-04-2018, 18:41   #3
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,425
Re: OpenCPN Rpi cpu usage and temperature

As long as it's below 80C you should be ok. This is hot enough to burn your finger. I put a heatsink on mine, but if you added a larger heat sink it would help more.

As you can see, using software to perform graphics creates a lot of heat, but even this is managable. Maybe you don't have sufficient airflow.
seandepagnier is offline   Reply With Quote
Old 14-04-2018, 20:34   #4
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: OpenCPN Rpi cpu usage and temperature

Htop is a bit better watch what's going on. Mine runs about 60 deg.

Openplotter image is tried and tested by many.
conachair is offline   Reply With Quote
Old 14-04-2018, 20:51   #5
Registered User

Join Date: Jul 2017
Posts: 67
Re: OpenCPN Rpi cpu usage and temperature

I have OpenPlotter on another SD card. I will try Htop to monitor the performance. But I am still looking for instructions for setting up the Rpi for the most economical operation. I have installation instructions, but I don't think they cover optimizing performance (unless I missed something)
CapnRon47 is offline   Reply With Quote
Old 14-04-2018, 21:26   #6
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: OpenCPN Rpi cpu usage and temperature

Just as a data point I run OpenPlotter on a Pi 3. At startup of OpenCPN CPU rises to 70-80% for about 10 seconds, then settles back to 8-10% while in operation. Current temp (ambient is 28) is 51.5C on my system, which has been running for several weeks since the last reboot.

Don't have a clean install of just OpenCPN, but would be happy to pass along settings in this setup if useful.
Dsanduril is offline   Reply With Quote
Old 14-04-2018, 21:32   #7
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: OpenCPN Rpi cpu usage and temperature

Quote:
Originally Posted by CapnRon47 View Post
I have OpenPlotter on another SD card. I will try Htop to monitor the performance. But I am still looking for instructions for setting up the Rpi for the most economical operation. I have installation instructions, but I don't think they cover optimizing performance (unless I missed something)
Not sure there will actually be that many gains to be had, raspbian is pretty lean already. My pi3 stays on all the time running openolotter with node red doing lots of sensor monitoring and saving data to a database, also doubles up as media centre streaming net radio or playing mp3 as well as running opencpn under way, it works hard but copes well with it. I just keep an eye in htop now and again for any processes being greedy.
conachair is offline   Reply With Quote
Old 15-04-2018, 00:00   #8
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: OpenCPN Rpi cpu usage and temperature

This might be of interest as well, history of the onboard power supplies -

https://www.raspberrypi.org/blog/pi-power-supply-chip/
conachair is offline   Reply With Quote
Old 15-04-2018, 09:10   #9
Registered User

Join Date: Jul 2017
Posts: 67
Re: OpenCPN Rpi cpu usage and temperature

I am interested in what software you are using for streaming audio (Mopidy?). I have a Kbox https://github.com/sarfata/kbox-firmware which collects all my NMEA instrument data and adds its own sensor outputs for barometric pressure and attitude (pitch and roll). It sends this data out either over serial or wifi connection (websocket) to my Rpi-3 running the SignalK-server. [I have configured the wifi on the Rpi to run as both an access point (AP) and as a Client simultaneously] The SK server in turn converts the SK data into NMEA data readable by OpenCPN, also running on this Rpi. [the mulitiple data conversion is necessary because the SK server does not recognize 'XDR' nmea sentences]. I am powering the Rpi (only) using one of these on the boat (the Kbox using 12v directly)

HOMREE DC 8-35V to DC 5V Step-Down Converter Buck Module 12V/24V to 5V 3A 15W USB

It supplies 5v at 3 amps and seems to be sufficient. I may need to find a more open location for the Rpi as right now it is inside my (fairly spacious) electronics compartment.
CapnRon47 is offline   Reply With Quote
Old 16-04-2018, 10:44   #10
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: OpenCPN Rpi cpu usage and temperature

Quote:
Originally Posted by CapnRon47 View Post
I am interested in what software you are using for streaming audio (Mopidy?).
The streaming is just web page radio but works well enough. Today fitted one of these -
https://www.hifiberry.com/shop/boards/hifiberry-amp2/

What a great sound! Into some existing car speakers, very pleased.

All the other data, i2c etc goes into a esp8266 then over wifi into the pi.
conachair is offline   Reply With Quote
Old 16-04-2018, 16:45   #11
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,733
Images: 2
Re: OpenCPN Rpi cpu usage and temperature

Capt Ron, An increase of 20deg is not cause for concern IMHO. The rpi guys have been running these pretty hard and will advise you too.
rgleason is offline   Reply With Quote
Old 16-04-2018, 19:15   #12
Registered User

Join Date: Jul 2017
Posts: 67
Re: OpenCPN Rpi cpu usage and temperature

With enabling the hardware graphics accelerator I think I solved the CPU usage and thermal issue. What I have run into now is the DC-DC converter that I purchased (and thought was working well), is causing the 'red' LED on the RPi to blink every now and then (maybe once a minute). Which indicates its input voltage is dropped below something like 5.64 volts. I have a very stable 13 volts source (4 marine battery house bank) so I cannot imagine the problem is there. It has to be with the $9 converter. That converter is supposed to put out 3 amps at 5 volts, more than the Rpi should use, especially given that I am not driving anything.

Does anyone have better suggestions for powering the Rpi from a nominal 12 volt system? And does the Rpi put occasional loads on the power source that might cause the drop in voltage?

thanks,
Ron
CapnRon47 is offline   Reply With Quote
Old 16-04-2018, 19:30   #13
Registered User
 
Dsanduril's Avatar

Join Date: Aug 2011
Location: Petersburg, AK
Boat: Outremer 50S
Posts: 4,229
Re: OpenCPN Rpi cpu usage and temperature

In addition to power supplies, not all USB cables are created equal. 2A is a lot for the tiny wires used in some USB cables. The shorter the better, and the bigger the conductor the better. There are a very few cables that will actually tell you conductor size.

No affiliation, just a satisfied customer, I am happy with Anker products in this role. I have an Anker powered USB hub that uses a 12V wall-wart, chopped of the wart and plugged directly into my 12V system and has so far run for more than a year at 12.3 to 14.5V input voltage. I also use a couple of their 30cm high-power USB cables with larger conductors for the power side of things. Since I started using the hub as the power supply and the cables I haven't had one low voltage warning from the PIs (I run two PI 3's from one 10-port hub).
Dsanduril is offline   Reply With Quote
Old 16-04-2018, 20:20   #14
Registered User

Join Date: Jul 2017
Posts: 67
Re: OpenCPN Rpi cpu usage and temperature

Thanks for that recommendation. That sounds like the way to go.
CapnRon47 is offline   Reply With Quote
Old 17-04-2018, 00:00   #15
cruiser

Join Date: Nov 2007
Location: Probably in an anchorage or a boatyard..
Boat: Ebbtide 33' steel cutter
Posts: 5,030
Re: OpenCPN Rpi cpu usage and temperature

Quote:
Originally Posted by CapnRon47 View Post
With enabling the hardware graphics accelerator I think I solved the CPU usage and thermal issue. What I have run into now is the DC-DC converter that I purchased (and thought was working well), is causing the 'red' LED on the RPi to blink every now and then (maybe once a minute). Which indicates its input voltage is dropped below something like 5.64 volts. I have a very stable 13 volts source (4 marine battery house bank) so I cannot imagine the problem is there. It has to be with the $9 converter. That converter is supposed to put out 3 amps at 5 volts, more than the Rpi should use, especially given that I am not driving anything.

Does anyone have better suggestions for powering the Rpi from a nominal 12 volt system? And does the Rpi put occasional loads on the power source that might cause the drop in voltage?

thanks,
Ron
Are you getting a small lightning bolt icon top-right of the screen? That indicates low power. 5.64v is *really* high for usb power, is that measured from a meter ? Careful, if so you might blow up the pi.
. Before fitting a hifiberry i used a not quite the cheapest buck converter into a short butchered micro usb lead for power set to about 5.15v.
conachair is offline   Reply With Quote
Reply

Tags
enc, opencpn


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenCPN problem on RPi with Raspbian 9.1 janth OpenCPN 16 15-10-2017 08:30
World Chart missing/opencpn/rPi dugsmith98 OpenCPN 1 01-03-2017 17:05
Rpi OpenCPN System - recommendations geoffr OpenCPN 17 01-02-2017 10:45
CPU Usage George64 OpenCPN 0 28-08-2011 00:50
OpenCPN and Atom CPU? amadeus OpenCPN 7 03-11-2009 14:38

Advertise Here


All times are GMT -7. The time now is 20:51.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.