Page 1 of 2
RaZBerry High CPU Usage
Posted: 10 Jul 2014 08:06
by wizzard72
After installing z-way-server v1.7.1 I see high cpu (100%) usage after approximately 1 or 2 days. The z-way-server service uses 96.x% cpu, sporadic it drops to 15% cpu usage and immediately is goes back to 96% cpu usage. After restarting the z-way-server service the cpu utilization is normal again, but then it's starts all over again. In 1 or 2 day's it's 96% again.
My Z-Wave setup contains the RaZberry, 4 light dimmers, 1 Dual Relay with metering function and a power switch with metering function.
If I install version v1.7.1-rc2, the cpu utilization is normal. Overall the cpu utilization of rc2 is better than v1.7.1.
Is anyone seeing this behavior? And more important how to fix this?
Re: RaZBerry High CPU Usage
Posted: 11 Jul 2014 22:47
by SolarFlor
Re: RaZBerry High CPU Usage
Posted: 14 Jul 2014 13:49
by wizzard72
I've seen that topic. It's about how many devices a Razberry can handle. Version 1.7.1 has high and (very) long CPU spikes compared with version v.1.7.1-rc2. Perhaps there is a location that I can clear out, for example cache, automation, etc. Also it would be very handy to see what causes the CPU spices. Is it reading the energy consumption, is it a specific device, etc.?
Re: RaZBerry High CPU Usage
Posted: 15 Jul 2014 22:49
by PoltoS
It is possible to see with atop which thread is eating the CPU. Then you can use gdb to do backtrace of thet thread, so we can identify it. Also it is worth to try without JS automation - may be it is eating your CPU. Can you reproduce it somehow? Does the high load happens even if there are no data from Z-Wave network?
Re: RaZBerry High CPU Usage
Posted: 26 Jul 2014 20:41
by wizzard72
I was on a short holiday. Today I have updated to version v.1.7.2. See what happens tomorrow...
How can I disable JS Automation?
Re: RaZBerry High CPU Usage
Posted: 28 Jul 2014 18:08
by wizzard72
After one day running version v.1.7.2 I have a very high CPU usage again. I need some help how to debug, because I never had the pleasure to do so.
I have looked in gdb, but it makes no sense to me...
Re: RaZBerry High CPU Usage
Posted: 28 Jul 2014 23:36
by pofs
To disable automation, remove everything in automation folder, just place empty main.js there.
It's hard to say what eats your CPU, but you may use "htop" or "ps -p <pid> -M" to see threads. It might give some insight on what is eating processor.
We will add thread names in the future version for easier debugging.
Re: RaZBerry High CPU Usage
Posted: 07 Aug 2014 08:31
by wizzard72
I have disabled the automation 2 days ago. For the last 2 days the CPU is less than 5%. The high CPU is normally visable after2 days. For now I keep the automation disabled.
Re: RaZBerry High CPU Usage
Posted: 07 Aug 2014 22:05
by SolarFlor
to reduce the CPU I have added the following comand to crontab
Code: Select all
0 3 * * * /etc/init.d/z-way-server restart
I realised that after the restart the CPU is reducing
Re: RaZBerry High CPU Usage
Posted: 10 Aug 2014 10:50
by Lumberjack
I see the same on one of my razberries (I have 4 with a total of 79 z-wave devices). All run 1.7.2. Only on 1 device I have this high CPU usage. I had to restart it this morning as it was almost all the time at high CPU level.
I wrote my own home automation in python so I don't need the Javascript one. I noticed wizzard72 disabled it and noticed the CPU stay low. How can I do that? I did not explicitly install home automation, just ran the normal install shell script.