-
-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High CPU on my Docker Daemon from ZvaveJS even without any data #3323
Comments
I forgot to tell you during the first start of the container when the docker daemon starts I can see this errors In order for them to disappear I need to restart the zwavejs container |
Please make a driver log, loglevel |
Attaching logs after start for first time of the docker daemon and when the errors disappear after restarting |
cc @AlCalzone any clue? I don't notice anything strange on logs @03397 You confirm that the CPU spike is only on startup but then it behaves normally or the cpu usage remains high? |
The CPU is spiking all the time when the docker daemon starts for the first time with all the containers. |
@03397 This seems to me something strange related to docker/docker-compose, tried to upgrade it? |
On second thought, after restarting the container of zwavejs only the errors go away. The spiking is there but not at the same rate. In order for the spiking to go away completely I need to stop zwavejs container completely. No, I have not upgraded since this comes as a package on my NAS |
Look below Server: |
Do we have any way of calling the node process in Docker with the Note that this might also require running another command in Docker and getting the generated file out of it.
|
Update the version: '3.7'
services:
zwavejs2mqtt:
container_name: zwavejs2mqtt
image: zwavejs/zwavejs2mqtt:latest
command:
- node
- --prof
- server/bin/www
docker compose exec zwavejs2mqtt /bin/sh -c 'node --prof-process $(ls -1t isolate* | head -n1)' > processed.txt (use Example of saved output: processed.txt
|
Managed to do what you guys have described |
@03397 can you do the last step again but with this changed command?
|
Adding new exported as per the conmand below |
Hmm... That last one has a lot of (unknown) stack frames, where I have no idea what it is.
There's a bottom up profile for 10080 of those ticks, and the "heaviest" part of zwave-js takes up 122 ticks, so roughly 1%. Not sure what this "Unaccounted" chunk is and how to figure it out though. Could it be that the peaks are due to slow I/O? |
@AlCalzone This runs on a raid 5 array with over 250MB/s thoughput with minimal I/O. There is not much going on the disks anyway. However, why do I get these overlays errors after the start of the zwavejs container? |
Ok I'm out of ideas. If anyone knows how we could get to the bottom of what causes the spikes, I'm all ears. |
Just wondering... Could it be that high cpu usage is due to log to file enabled with debug level? I know that at startup logs could be a lot expecially if the loglevel is very low |
@robertsLando I am not sure if this is causing the issue since this specific configuration is coming out of the box and I did not mess with it. This was not creating any issue in the past. I can try it if some can pinpoint me to the direction full path of changing this to info. |
Just go to settings UI and disable both application and driver log |
I was referring to the debug level of the docker. See my post about the docker info |
Oh I forgot you attached the settings on the issue, if so I have no clue... I was mentioning those logs, I have no clue about docker logs sincerly also not sure they could cause those errors |
So, one thing I noticed while debugging is that my CPU is constantly at 3-5% load without Z-Wave JS UI doing. It looks like this is due to |
I don't use nodemon inside docker, I just run node command |
which model of qnap do you have? |
@zeev-mindali |
Seems we found the reason of this in zwave-js/node-zwave-js#6612. Please follow updates there 🙏🏼 |
Hi guys, could you give a try to |
Is this included in this. I am on the latest tag |
Nope latest should be: 9.8.1.0207327 |
This is in a docker from docker hub. |
@03397 sorry I took the wrong sha part. Check this: |
The latest imnage downloaded is sha256:f5bcbe833942af9f7dc9516ef261e7c58ff3c08f5e6ee76ca10b4859b4194766 |
@03397 did you tried the tag of the link? I don't understand if you refer to the docker image sha or to the commit sha of zui, just try to do another docker pull if you are on master tag or use the tag you find in the link above |
Checklist
Deploy method
Docker
Z-Wave JS UI version
9.0.3.c37f5a4
ZwaveJS version
12.0.2
Describe the bug
I am running a docker instance on my QNAP NAS.
I have several containers utilizing almost 0% CPU utilization.
When I start the zwavejs container I have continuous spikes to my CPU from 10-60% which can be seen on my dockerd process.
The actual container is 0%.
The dockerd starts like this
container-station/dockerd -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock --bridge=lxcbr0 --tlsverify --tlscacert=/etc/docker/tls/ca.pem --tlscert=/etc/docker/tls/server.pem --tlskey=/etc/docker/tls/server-key.pem --storage-driver=overlay2 --dns 10.0.3.1 --data-root=/var/lib/docker --exec-root=/var/run/docker --pidfile=/var/run/docker.pid -D --userland-proxy=false --config-file /share/CACHEDEV2_DATA/.qpkg/container-station/etc/docker.json
and the zvavejs docker-compose.yaml file is the following
Also
This think is driving me nuts.
Your help will be appreciated.
To Reproduce
Start zwavejs container
Expected behavior
Low CPU
Additional context
No response
The text was updated successfully, but these errors were encountered: