Increase in CPU load

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
moorsey
Posts: 51
Joined: Sun Jan 03, 2010 8:56 am

Increase in CPU load

Post by moorsey » Fri Sep 21, 2018 1:16 pm

Just checking what others are seeing CPU wise after upgrading to 1.32.

Have seen a significant jump here, is this to do with the MP4 recording changes? Is an overall increase in load expected?

Image

This shows CPU in the past week, previous load on 1.31, a bit of downtime and then past few days on 1.32

Curious what others are seeing!

User avatar
iconnor
Posts: 788
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Increase in CPU load

Post by iconnor » Sat Sep 22, 2018 12:30 am

Do you have zmaudit turned on? I recommend turning it off and just running it occasionally like on weekends via cron.

Isaac

moorsey
Posts: 51
Joined: Sun Jan 03, 2010 8:56 am

Re: Increase in CPU load

Post by moorsey » Sat Sep 22, 2018 8:06 am

Isaac,

Yes I have, but then again, I always have, so this is comparable to previous version

Cheers

sadams54
Posts: 21
Joined: Thu Sep 27, 2018 1:09 am

Re: Increase in CPU load

Post by sadams54 » Thu Oct 18, 2018 9:41 pm

I am seeing massive increase. I have an I7 processor on the system and it is dedicated to zoneminder. normal load is around 1. Some connections on the web interface or more than one at a time seems to spike the load to around 14 (on my I7 8 is taxing it). This behavior keeps going even if I disconnect the offending system from viewing. I have to restart the zoneminder service to fix it. The web interface for 1.32.x is pretty bad and barely working. Most features are nonfunctional such as fast forward. This whole 1.32 version is trouble. The writers have helped me some and I shared info here but yes the CPU load is a problem for me too. 7 cameras.

mgranger
Posts: 8
Joined: Thu Jun 29, 2017 9:30 pm

Re: Increase in CPU load

Post by mgranger » Thu Oct 18, 2018 11:00 pm

I saw a massive jump and I only use 4 cameras. It is so bad my images won't come in correctly anymore.

evolotion
Posts: 44
Joined: Mon Aug 01, 2016 9:03 pm

Re: Increase in CPU load

Post by evolotion » Mon Oct 22, 2018 9:09 am

Just to play the devils advocate, my system has shown no extra load atall, this has been rolling-upgraded since the storageareas branch was first created, haven't had need to do a fresh install as its just been solid.

at the time of upgrade had 4 1080p streams coming in and two smaller CIF streams for motion detection, celeron J1900 cpu, load average of about 1.8, with a viewer playing back and scopping thro a 1080p stream load average would jump up to 3.5 and things could get a bit laggy but thats how it was on 3.1 and 3.2 and is just down to my little cpu.

the 1080p streams are only 8fps though the point im making is I saw no difference from 3.1 to 3.2

gabrielnn77
Posts: 3
Joined: Thu Oct 18, 2018 5:03 pm

Re: Increase in CPU load

Post by gabrielnn77 » Mon Oct 22, 2018 11:25 am

in my AMD FX(tm)-6100 Six-Core, with GeForce 7300 LE, same problem
the charge of cpu doubled the zmc and nph-zms processes
zmaudit is turned off

User avatar
iconnor
Posts: 788
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Increase in CPU load

Post by iconnor » Mon Oct 22, 2018 2:48 pm

Which monitor type?

CPU Use really should have gone down. I could see mysql cpu use going up a bit but not zmc/zms. Especially zms, there really hasn't been much changed in there.

gabrielnn77
Posts: 3
Joined: Thu Oct 18, 2018 5:03 pm

Re: Increase in CPU load

Post by gabrielnn77 » Tue Oct 23, 2018 10:19 am

Source Type ffmpeg
Function monitor
Maximum FPS 10 (native in the cam)
Capture Width (pixels) 1280 (native in the cam)
Capture Height (pixels) 720 (native in the cam)
Target colorspace 24 bits (native in the cam)
Source Path rtsp://....

i have 21 cams, with diferent resolution (1280, 640, etc), but all with same FPS
to record I use another separate process ( less than 1% each)

gabrielnn77
Posts: 3
Joined: Thu Oct 18, 2018 5:03 pm

Re: Increase in CPU load

Post by gabrielnn77 » Tue Oct 23, 2018 10:28 am

with 2 users viewing in montage mode, varies from 30% to 0% idle (with 1, from 50% to 24%)
output from top :

%Cpu(s): 58.3 us, 9.5 sy, 0.0 ni, 30.4 id, 0.1 wa, 0.0 hi, 1.7 si, 0.0 st
KiB Mem : 16194036 total, 291076 free, 1829692 used, 14073268 buff/cache
KiB Swap: 4095996 total, 4094708 free, 1288 used. 11669388 avail Mem

6157 apache 20 0 628204 151296 142820 S 15.9 0.9 0:02.55 nph-zms
6146 apache 20 0 628204 148588 140120 S 14.9 0.9 0:02.51 nph-zms
6177 apache 20 0 628204 151304 142820 S 14.9 0.9 0:02.57 nph-zms
6159 apache 20 0 628208 148608 140124 R 14.6 0.9 0:02.44 nph-zms
6160 apache 20 0 628208 148580 140124 R 13.9 0.9 0:02.40 nph-zms
6173 apache 20 0 628204 151276 142820 S 13.6 0.9 0:02.35 nph-zms
6155 apache 20 0 628204 151260 142820 S 13.2 0.9 0:02.31 nph-zms
6134 apache 20 0 628204 151260 142820 S 12.6 0.9 0:02.40 nph-zms
6132 apache 20 0 628204 151260 142820 S 12.3 0.9 0:02.27 nph-zms
6123 apache 20 0 628204 151260 142820 S 11.9 0.9 0:02.25 nph-zms
6122 apache 20 0 628204 151256 142820 S 11.6 0.9 0:02.23 nph-zms
6127 apache 20 0 628204 151244 142820 S 11.6 0.9 0:02.20 nph-zms
30845 apache 20 0 1029192 191568 144360 S 7.9 1.2 4:48.02 zmc
30682 apache 20 0 1029088 184712 144356 S 7.3 1.1 4:15.04 zmc
30743 apache 20 0 1029256 183096 144356 S 7.3 1.1 4:23.78 zmc
30738 apache 20 0 1029344 186768 144356 S 7.0 1.2 4:17.55 zmc
30670 apache 20 0 1028896 184820 144356 S 6.6 1.1 4:13.54 zmc
6125 apache 20 0 536568 62008 52820 S 5.3 0.4 0:01.04 nph-zms
15385 apache 20 0 1028284 183064 144344 S 5.3 1.1 1:20.59 zmc
24620 apache 20 0 1028232 180184 144340 S 5.3 1.1 0:44.05 zmc
30856 apache 20 0 1028368 187944 144312 S 5.3 1.2 3:23.08 zmc
2969 apache 20 0 1028460 174076 144320 S 5.0 1.1 0:02.72 zmc
6126 apache 20 0 532948 58380 52820 S 5.0 0.4 0:00.96 nph-zms
19740 apache 20 0 1028256 180208 144340 S 5.0 1.1 1:11.71 zmc
30790 apache 20 0 1028800 182808 144356 S 5.0 1.1 3:50.61 zmc
6130 apache 20 0 532948 58384 52820 S 4.6 0.4 0:00.96 nph-zms
6131 apache 20 0 532952 58388 52820 R 4.6 0.4 0:01.00 nph-zms
6133 apache 20 0 532948 58380 52820 S 4.6 0.4 0:00.92 nph-zms
6150 apache 20 0 532948 58388 52820 S 4.6 0.4 0:00.94 nph-zms
6203 apache 20 0 532948 58384 52816 R 4.6 0.4 0:00.96 nph-zms
30818 apache 20 0 1028380 186116 144312 S 4.6 1.1 3:48.47 zmc
6124 apache 20 0 532948 58384 52820 S 4.3 0.4 0:00.93 nph-zms
1871 mysql 20 0 4052080 220488 5948 S 2.6 1.4 33:58.81 mysqld
30336 apache 20 0 934788 75132 54104 R 2.3 0.5 1:21.23 zmc
30402 apache 20 0 934584 76032 54048 S 2.3 0.5 1:23.85 zmc
30446 apache 20 0 934844 72320 54096 S 2.3 0.4 1:34.02 zmc
30486 apache 20 0 934808 74304 54096 S 2.3 0.5 1:30.20 zmc

User avatar
iconnor
Posts: 788
Joined: Fri Oct 29, 2010 1:43 am
Location: Toronto
Contact:

Re: Increase in CPU load

Post by iconnor » Tue Oct 23, 2018 10:49 pm

Ok, someone else had a similar problem and on a whim I had them change Stream Replay Image Buffer from the default of 1000 to 0.

When viewing a live stream, ZM by default writes out jpeg's to disk so that we can offer pause/rewind etc on the live stream. Setting Stream Replay Image Buffer basically turns this off.

I think in 1.30 we defaulted to /tmp/zm for these files which is typically a ram disk, but we might have switched to /var/tmp/zm which generally is NOT a ram disk... so that may be the problem.

sadams54
Posts: 21
Joined: Thu Sep 27, 2018 1:09 am

Re: Increase in CPU load

Post by sadams54 » Wed Nov 21, 2018 10:59 pm

that was me you suggested changing the value to 0. I worked for the live montage view great. I do see CPU load spike horribly now when I pull up a list of events, usually around 100 or more events. seems it is the thumbnails causing the increase but I have no idea how to fix that.

geraldbrandt
Posts: 65
Joined: Tue Dec 09, 2014 10:20 pm

Re: Increase in CPU load

Post by geraldbrandt » Fri Dec 14, 2018 8:37 pm

Where is the stream replay buffer setting? I can't seem to find it.

Pedulla
Posts: 133
Joined: Thu Nov 27, 2014 11:16 am
Location: Portland, Or

Re: Increase in CPU load

Post by Pedulla » Sat Dec 15, 2018 12:50 am

Where is the stream replay buffer setting? I can't seem to find it.
Its on the Buffers tab of each monitor.

DerGraf
Posts: 29
Joined: Fri Aug 17, 2018 7:33 pm

Re: Increase in CPU load

Post by DerGraf » Sun Dec 16, 2018 5:01 pm

I´m testing ZM 1.32.3 too.

CPU load is ~20% more than ZM 1.30.4 by mostly same settings. The only changing things was using storageareas, x264 bypassing, enabled audio recording and switch my Reolink from rtsp to rtmp against smearing in 1.31 and above.

I´m using 3x 1080P and 1x 1440P all on 8 fps. On VM with 4GB and 2 CPUs 1.30.4 used 35-40% CPU. On duplicated VM with 1.32.3 it used 43-48% CPU. :shock:

Stream Replay Image Buffer was 0 by default.

More ideas?

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests