High CPU-load and numerous tasks in background

  • When I load my dashboard (3 grouped sensor graphs) my rpi cpu usage is on 100% for some minutes - even if the dashboard is fully loaded.

    Additionally I'm wondering if it's normal that mycontroller runs approx 36 java processes at once - most of them have 0.0% cpu usage.


    Further more I've found some errors in my log:

    2018-01-06 14:34:30,369 ERROR [Acme.Utils.ThreadPool(2)-PooledThread: Acme.Serve.Serve$ServeConnection@823c08] [org.mycontroller.standalone.metrics.engines.McMetricEngine:262] Exception,
    java.sql.SQLException: Could not perform raw query for SELECT sensorVariableId, MIN(min) AS min, MAX(max) AS max, SUM(avg*samples)/SUM(samples) AS avg, SUM(samples) AS samples, 1498136632009 AS timestamp FROM metrics_double_type_device WHERE sensorVariableId=101 AND timestamp > 1498136332009 AND timestamp <= 1498136632009 GROUP BY sensorVariableId
    	at com.j256.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:25)

    I've just updated to version 1.1.0 but the behavior was similar with 1.0.0.

  • @axel

    Additionally I'm wondering if it's normal that mycontroller runs approx 36 java processes at once - most of them have 0.0% cpu usage.

    Which command are you using to list this? Yes, MyController runs with multi-thread.

    Have you changed metric retention settings? How many days this MyController log data? Do you have frequently changing binary data?

  • MOD


    Are you using the "real" java?
    I had the same issue on an RPI, see this topic and it had to do with the opensource java that comes pre-installed. It was sooooo slow... it was fixed by using the original java version

  • I've used htop to list the processes.

    I've changed the metric retention settings as follows:

    Data: Double, Counter
    Raw data 1 Minutes
    One minute data 6 Hours
    Five minutes data 10 Days
    One hour data 90 Days
    Six hours data 1 Years
    Twelve hours data 5 Years
    One day data 10 Years
    Binary data 180 Days 
    GPS data 180 Days

    I've got 4 nodes with 3 sensor values each (humidity, temperature, battery voltage) which send every 5 minutes to a MQTT gateway.

    I've got no binary data.

    The oldest data are three weeks old, the backup file is about 140kb.

    I'm using the follwing java version as descirbed in this tutorial:

    VM vendor Oracle Corporation
    VM name Java HotSpot(TM) Client VM
    VM version 1.8.0_151-b12
    Java home /opt/jdk1.8.0_151/jre

  • @axel I do not see any configuration issue in your setup. Can you send your MyController log file and backup to my email address? Remove/change important information (email, pushbullet, SMS, etc)
    email address jkandasa at gmail dot com

  • @Axel
    Thanks for the logs and backup file. I do not see any issue with MyController restored in my local(I tested with SNAPSHOT version).
    From your log file, I see that MyController takes a lot of time to start[57, 62, 67, 1807 seconds]. seems like your raspberry PI loaded with some other application?
    If yes, I request to stop all other application running in your raspberry PI and try again.
    I recommend using RASPBIAN OS LITE edition.

Suggested Topics