Page 1 of 1

Excess logging

Posted: Thu Sep 29, 2022 6:00 am
by pprocacci
Fresh Install ....

"You have set the max video packets in the queue to 101. The queue is full. Either Analysis is not keeping up or your camera\'s keyframe interval is larger than this setting."

Firstly, this log entry is being made at a rate of approximately ~60/sec into mysql. It would be double if it weren't for syslog eating the other 50% of the disks time. There's no need for this. This message should be clamped to at most once per minute. Conceivably, the inability to empty ones' buffer is self impose because the logging apparatus of zoneminder doesn't pay any attention to the last time it logged this given message and just blasts mysql and syslog with extremely redundant data.

The following disk "busy-ness" is all due to zoneminder logging not only to syslog, but also to mysql.
%busy Name
80.0| ada3
85.3| ada5

IO as a percent per process:
PID USERNAME VCSW IVCSW READ WRITE FAULT TOTAL PERCENT COMMAND
7772 mysql 292 31 1 69 0 70 53.44% mysqld
40273 root 78 5 0 58 0 58 44.27% syslogd

Secondly, and simply for the record, I have Analysis turned off AND my keyframe setting on the camera is set to 10. My zoneminder setting is 10 times (+1) the purported value. I'd argue that the error message is flat out wrong.

My settings are simply two monitors:

Record
Analysis Enabled: unchecked
Decoding enabled: checked
Image Buffer Size: 3
Maximum Image Buffer Size: 101
Passthrough
No JPG's.

Everything else as is.

I'm less concerned about the second part because I'm ditching 1.36 and rolling back to a working 1.34 or finding different software entirely. I haven't decided yet.

Thanks for reading my suggestion.

Re: Excess logging

Posted: Thu Sep 29, 2022 7:38 am
by Magic919
If you are not on 1.36.26 it would be worth trying. There have been a couple of fixes for that keyframe error (error).

I don't log anything to DB or even much to files, so I don't get hit in the same way.

Re: Excess logging

Posted: Thu Sep 29, 2022 12:17 pm
by iconnor
You could also consider increasing the maximagebuffer count a little bit. Only recently have we added the ability to actually report what keyframe interval we are actually seeing.

Also... if your db can't keep up, then the queues will fill up no matter how high you set maximagebuffer. So yeah, adjust the logging.
I like to do warn and up to syslog so that logcheck can report probiems. Warn and up for DB because logging to db sucks. Debug to file because I do a lot of debugging.

Another thing to remember is that with systemd, logs are also going to journald... so for each log line, it goes to disk maybe 4 times!

Also look at mysql tuning using mysqltuner.