OH3 slowly let's system load rise

  • Platform information:
    • Hardware: Rpi4
    • OS: Openhabian
    • Java Runtime Environment: 11.0.11 2021-04-20 LTS
    • openHAB version: 3.1

Hi Guys,

I’m using openhab since version 2.1 with great pleasure. As time continues i’m learning more and more on how to build my Home Automation System. At first I created simple rules and when time evolves so did my knowledge of Openhab and it’s rules / items / things / etc. Over the years I continuously change things and build new stuff. My goal is to almost never use any button or app so the system becomes more and more complex and I rewrite lots of code every week. I don’t use the main UI at the moment and only use text based files because i’m used to it, see below what the system has to work with:

Bindings: 20
Things: 160
Items: 854 (lot’s of ‘virtual’ items)
Rules files: 36
Rules: 282
Lines of code: 8792

I check my cpu load a lot via graphs and I noticed that when I save a lot of Item files / Things files and rules files, the system load every time stays a slight higher then before. It fluctuates a lot between 0.2 and 1.0 when i’m not developing and fluctuates some more when i’m developing (between 0.5 and 2.0). That pretty normal behaviour. But when the day’s go by, i mostly improve things everyday, the average load stays a little bit higher then before and will never return to that lowest point.

Here are 2 graphs to clearify my ‘problem’:


As you can see in the 2nd graph I add / delete / modify a lot of rules and sometimes some item / things files. Almost every day i change stuff and the system get’s a lot of work to do, the load rises, and the load falls back to normal but a bit higher in system load. Until I restart the openhab service and it’s constant low again. As you can see in the first graph, when i’m on a holliday, it doesn’t rise but stay’s ‘normal’. My rules where running just as we where at home. Lights go on and off as someone watches over our cat, and all other automations just continue but the system load stays constant.

When I look at the system usage with the command: Top via SSH, I notice that java sometimes peaks. I think this is normal, it peaks from 2% to 10% and back, should have something to do with rules which are running at some point. But when the average load is high as you can see in the graph at Sunday 12 sept. and monday 13 sept. Java peaks a lot higher, from 3% to 50% and back, but sometimes even higher. After i restart the openhab service, this behaviour is gone and it’s constant again, until I start developing. It doens’t matter if Visual Studio runs or not or if i have some tabs open in Chrome with Sitemaps or Openhab Main UI.

It doesn’t bother me that a graph shows the load is higher, if the system works fine, it’s fine. But that’s not the case. When the load minimum is around 0.6 I notice rules getting slow and especially the hue binding is getting slow. So my lights don’t react within a second when I move somewhere. Especialy my bathroom with a lot of lights and complex rules (radio, scenes, moist detection, etc.) is getting slow. Sometimes I have to wait couple of seconds before the lights go on. (Changed a lot in the rules files today to make it quicker, but it’s an example).

Maybe it’s common and more of you notice this behaviour but I think it’s a bit strange. Not sure if it happend in openhab 2.x last year.

p.s. for me it’s annoying to restart openhab because of the bug with GoogleTTS. I have to: [openhab-cli clean-cache] to get a 50% change the voice is working again, otherwise i hear a white noise throught the 3.5mm jack (oh3-google-tts-only-white-noise) and my system is chatty so it must work :smiley: . So I mostly have to restart it couple of times before the voice is working normal again, it’s the only ‘sollution’.

Little bump, doesn’t anyone else have these problems? I can’t relate it to any binding or anything else, so it feels like a ‘problem’ with the openhab system.

I’m building a lot around the main ui now, and the problem is the same then, system load rises and rises and after a while it’s noticably slower then after restart.

Yes these problems are persistent.

1 Like