Motion - Bug Report 2006x 02x 07x 135058

BUG: CPU usage at 99.99% if all network cameras are PAUSED

I have six network cameras (DCS-900) and a cron job that will pause or start certain cameras based upon time/day. There are certain periods of time when all cameras are to be paused and the only thing that I want to occur is the snapshots that occur every minute (snapshot_interval 60).

It seems that in this circumstance when ALL six cameras are paused because of: wget http://10.4.0.45:8399/${x}/detection/pause -O - the main motion program uses 99.99% of cpu and also the top program reports load average increasing from the normal 2 to 5 up to over 40 ( ! ! ! ) Seems to me that if motion detection is off on all network cameras and only snapshots every minute are performed, that the cpu usage should drop significantly, it should not increase 10x .

I can submit additional information, config settings or debug trace if you tell me what you need. If you need a kernel debug trace then tell me how.

Thank you for an otherwise excellent program.

Test case

Environment

Motion version: 3.2.4 snap5
ffmpeg version: unused
Shared libraries: ffmpeg, mysql, postgresql
Server OS: Fedora Core 4 kernel 2.6.11

-- GregSwift - 07 Feb 2006

Follow up

UPDATE -- upon further investigation, I find that I was a bit wrong. CPU utilization does not spring up to 99%. It is, however, strangely high when the only thing running on this box is motion with 6 network cameras. Here is a cut-and-paste from running top, you can see motion is on what would be a very idle system, yet with all 6 cameras paused, only snapshots every 1 minute, it still is very busy ...

top - 19:08:23 up 2 days, 13:39,  3 users,  load average: 2.15, 2.24, 2.20
Tasks:  64 total,   1 running,  63 sleeping,   0 stopped,   0 zombie
Cpu(s): 63.6% us,  4.0% sy,  0.9% ni, 30.6% id,  0.7% wa,  0.2% hi,  0.0% si
Mem:    223436k total,   214652k used,     8784k free,    37880k buffers
Swap:   513668k total,    12936k used,   500732k free,   109352k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
21088 root      16   0  169m  30m  864 S 86.2 14.1   1295:53 motiond
17011 root      15   0  1952  816  652 R  1.9  0.4   0:00.03 top
    1 root      16   0  1688  396  368 S  0.0  0.2   0:03.45 init

Why is CPU usage so high when there is so little going on ???

Fix record

I cannot reproduce this one.

I have tried to pause all my 9 cameras at once and I do not see cpu load increase.

Try a latest daily. Maybe it was 3.2.4_snap5 that had a temporary issue.

-- KennethLavrsen - 22 Feb 2006

BugReportForm edit

TopicTitle CPU usage at 99.99% if all network cameras are PAUSED
BugStatus Released
AssignedBugTo KennethLavrsen
SubmittedBy GregSwift
Topic revision: r5 - 20 Oct 2006, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.