Very high CPU usage

I am using openHAB 2.4.0~20180603104525-1 (Build #1294) on a raspberry pi 3.

whenever I connect the raspberry via smb and edit some rules, after saving the changes the system useage jumps from 3-4% to 25% and stays there, even when I disconnect the smb connection. “tops” shows JAVA at fault. I have changed from zulu to oracle java. no difference.
After rebooting it is normal again, hovering around 3-4%. When I have 25% load, the system is no longer reactive and must be rebooted.

tops: 490 openhab 20 0 512956 376580 14680 S 100.0 37.7 23:46.38 java
java -version openjdk version “1.8.0_152”

I would try #1295 first.

Also think about your java platform:


Never mind, did not read that … :sunglasses:

What is #1295?

Editing rules results in reparsing/recompilation, and that is a single-threaded process to make full use of a single CPU core. The Pi has 4 cores, that results in your ~25% usage being shown.
If you save multiple times during an edit this in fact queues up so your Pi is busy for quite a while recompiling for each save.
I believe it’s even worse if you edit over CIFS(Samba) because that’s causing twice the amount of changes on file level, causing the number of recompiles to double once more.
Try to copy your file to your PC, edit it there and copy it back no sooner that you’ve finished editing it.

PS: Please don’t ever reboot. This is not required and does in fact not solve anything, it’s just hiding and postponing your problems.

Hello Markus. Thank you for your explanations. These symptoms are new. I never had them before. That’s why I wanted to find out where to look. I must boot however, as the system starts to CRAWL, it is not useable at all. If I don’t find the root cause I will start again with a fresh system. It is not normal, that is for sure.