Page 1 of 2
how to reduce cpu load?
Posted: Sat Jun 11, 2022 3:28 pm
by Cramac1
Hello.
before:
CPU usage was at 50%.
Added two cameras, restarted zm. CPU became 100%
All cam func - record. Decoding Enabled - checked
how to reduce cpu usage? Need cyclic recording and online
- cpu.png (82.13 KiB) Viewed 9449 times
Re: how to reduce cpu load?
Posted: Sat Jun 11, 2022 4:07 pm
by clipo
You need to give more details if you want help....
How are you camera setup
What cameras do you have
How are they connected.
Most HD IP Camera give out H264/5 streams and if you're just recording the main stream you should switch off the decode when doing H264 Pass through
- Screenshot at 2022-06-11 17-03-11.png (191.64 KiB) Viewed 9445 times
- Screenshot at 2022-06-11 17-03-40.png (173.32 KiB) Viewed 9445 times
Re: how to reduce cpu load?
Posted: Sat Jun 11, 2022 4:34 pm
by Cramac1
stood, worked. loading was normal - 50%.
all IP cameras, part x264, part x265
Now I disabled the two added cameras, rebooted the zm, the CPU load did not fall.
All settings are identical.
- 1.png (17.84 KiB) Viewed 9440 times
- 2.png (28.77 KiB) Viewed 9440 times
- 3.png (38.54 KiB) Viewed 9440 times
why an hour ago, before rebooting the zm, the cpu was loaded by 50%, and how it rebooted the zm to 100%
Or some kind of OS update leads to this.
Re: how to reduce cpu load?
Posted: Sun Jun 12, 2022 5:16 am
by kaltertod
How much ram does your server have.... Is the swap full? Show us your buffer settings this can have an effect on cpu/ram usage....
P.S. Sanitize your images your are showing user/password/ip info
Re: how to reduce cpu load?
Posted: Sun Jun 12, 2022 12:51 pm
by Cramac1
in the first message, the swap is empty, operational 48GB
Re: how to reduce cpu load?
Posted: Mon Jun 13, 2022 7:14 am
by Cramac1
is there a debug mode? what is using the cpu at 100%
Re: how to reduce cpu load?
Posted: Mon Jun 13, 2022 8:38 am
by dougmccrary
Options->Logging
You probably want to look at top or iotop first.
Re: how to reduce cpu load?
Posted: Mon Jun 13, 2022 8:55 am
by Cramac1
- iotop.png (52.46 KiB) Viewed 9355 times
it remains only to remove the memory that installed
Re: how to reduce cpu load?
Posted: Mon Jun 13, 2022 10:43 am
by Cramac1
- chart2.png (58.38 KiB) Viewed 9344 times
CPU load before installing additional memory and after
Re: how to reduce cpu load?
Posted: Mon Jun 13, 2022 8:30 pm
by dougmccrary
What are your buffer settings?
Re: how to reduce cpu load?
Posted: Tue Jun 14, 2022 12:49 am
by kaltertod
dougmccrary wrote: ↑Mon Jun 13, 2022 8:30 pm
What are your buffer settings?
This ^. If you have very large buffers it will eat up alot of cpu cycles. Are you running this on a mechanical HDD or an SSD just switching to an SSD on my server cut the cpu usages in half over a spinner, RAM usage also went down.
What fps and resolution are your cameras this will also play into cpu usage as every frame is decoded and analyzed by zm
Re: how to reduce cpu load?
Posted: Tue Jun 14, 2022 1:07 am
by dougmccrary
Yes. I was thinking the same. If it's spinning rust, either an ssd or perhaps adding another drive to split the load might help.
Re: how to reduce cpu load?
Posted: Tue Jun 14, 2022 4:55 pm
by clipo
ZM is heavy on iotop and is mainly database access with the many writes, it's something that need looking at with future versions of ZM.
You might want to look at mysqltuner to see if that can optimise your database.
Looking at smt-mir1 you have decode enabled if this monitor is just recording and you don't need to view then turn off decode, I only decode the low resolution feeds that I run the analysis on and use those for viewing.
Reading this thread you trouble started when you added more ram?
Re: how to reduce cpu load?
Posted: Wed Jun 15, 2022 1:05 pm
by Cramac1
dougmccrary wrote: ↑Mon Jun 13, 2022 8:30 pm
What are your buffer settings?
all cam
- buff.png (16.03 KiB) Viewed 9230 times
repeat again. before rebooting the server, the load was 50%, rebooted and immediately 100% All settings before and after are the same. Already removed the added cameras. nothing changes.
the version of zm was also not updated, all the packages of the system were updated, except for zm. Base on another server.
Re: how to reduce cpu load?
Posted: Thu Jun 16, 2022 3:14 am
by dougmccrary
hmm
Was that a reset type reboot, or power-off?
If reset, I'd try power-off. Seems something went haywire with the disk(s).