Resource usage: TOP vs. Load in ZM

Support and queries relating to all previous versions of ZoneMinder
Locked
rakhbari
Posts: 12
Joined: Thu Jul 26, 2007 6:07 pm
Location: Mountain View, CA - U.S.A.

Resource usage: TOP vs. Load in ZM

Post by rakhbari »

Hi,

I have ZM running normally with 2 cameras on the following system:

Dell Dimension E520: Intel® Core™2 Duo E4300 (1.8GHz, 800 FSB)
2Gig RAM, 200 GB SATA HD

Code: Select all

ipcs -l:
------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 131072
max total shared memory (kbytes) = 536870912
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 16
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384
2 Cameras: Both remote Toshiba IK-WB15A - One at 640x480, the other at 320x240.

ZM's console shows:

Code: Select all

Mon 30th Jul, 8:50am 	ZoneMinder Console - Running - v1.22.3 	Load: 0.85 / Disk: 10%
But when I run top, the different ZM processes consistently show to be taking up a significant chunk of processor cycles:

Code: Select all

top - 08:53:35 up 6 days, 16:26,  1 user,  load average: 0.61, 0.72, 0.66
Tasks:  91 total,   2 running,  89 sleeping,   0 stopped,   0 zombie
Cpu(s): 25.6% us,  1.2% sy,  0.0% ni, 73.2% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:   2065160k total,  1437684k used,   627476k free,    54532k buffers
Swap:  4192956k total,    88152k used,  4104804k free,  1115912k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
21658 apache    15   0  155m  41m  36m S 26.0  2.1 673:26.45 zmc
 2523 apache    15   0  154m  40m  36m S 16.3  2.0  21:43.51 zma
32314 apache    15   0  124m  11m  10m S  7.3  0.6   2:28.58 zmc
14775 apache    15   0  125m  11m  10m S  2.7  0.6   6:22.46 zma
17772 apache    15   0  153m  37m  35m S  8.3  1.9   0:02.77 nph-zms
Am I reading the top output wrong or is the system really under this much CPU load? %Memory doesn't seem to be much, but the %CPU looks alarming. :?

I'm trying to determine how much hardware I need for how many cameras. Any thoughts/guidance on this would be greatly appreciated.

Cheers,

Ramin
:)
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

In linux, "load" is more than just cpu. If you look at the top line in "top" you will see that the load average is very close to the ZM load. Also, if you have a multi threaded or duel core cpu, you can go over %100 of cpu.
rakhbari
Posts: 12
Joined: Thu Jul 26, 2007 6:07 pm
Location: Mountain View, CA - U.S.A.

Post by rakhbari »

Lee Sharp wrote:In linux, "load" is more than just cpu. If you look at the top line in "top" you will see that the load average is very close to the ZM load. Also, if you have a multi threaded or duel core cpu, you can go over %100 of cpu.
Thanks Lee, no sooner than I'd posted this I located a couple of FAQ pages explaining all the variables involved in ZM resource usage. Once again, just didn't do a thorough-enough search before I posted this. Thanks for your reply anyways.

I wonder if you, or anyone has a simple enough formula to help me try to guestimate HD storage usage for a single camera. I think I've got the CPU load variables pretty well identified, but a little hazy on the HD requirements for my system. Thanks.

Cheers,

Ramin
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

How are you recording? How big is the frame? What is the frame rate? How much motion is there? You can do a lot to change disk space. However, a 16 cam system with 10fps capture and 3 cvams on mocord and the remaining 13 cams on modetect at 320x240 color can store just over a week on a 500 gig drive.
Locked