uses more CPU than expected?

Forum for questions and support relating to the 1.24.x releases only.
Locked
rogerdpack
Posts: 2
Joined: Wed Oct 13, 2010 7:43 pm

uses more CPU than expected?

Post by rogerdpack »

Hello all.
I noticed some comments of zoneminder, like:

http://ask.slashdot.org/comments.pl?sid ... d=30446182
http://ask.slashdot.org/comments.pl?sid ... d=30451890
http://ask.slashdot.org/comments.pl?sid ... d=30448240

They insinuate that zoneminder needs a some beefy cpu's.

Anybody know why zoneminder might be viewed as cpu expensive, or what's going on here?
Thanks!
-r
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

Motion detection requires that every frame is compared to the previous one(s) according to one or more user defined zones and rules.

When you have streams doing 20-30 frames per second, colour high quality image sizes of 1280x1024 and multiple cameras - then yes, zoneminder does need some grunt to get its job done.

It does not follow that there is anything from with the design or programming of Zoneminder.
Storm
Posts: 4
Joined: Fri Oct 30, 2009 9:58 pm

Post by Storm »

It is not about the motion detection you are asking but you can try to lower the cpu usage of the zm system with the use of libjpeg-turbo library (replacing the default one in linux). There is a big difference with and without the library. There is an info in the zm forum.
http://sourceforge.net/projects/libjpeg-turbo/
rogerdpack
Posts: 2
Joined: Wed Oct 13, 2010 7:43 pm

Post by rogerdpack »

Flash_ wrote:Motion detection requires that every frame is compared to the previous one(s) according to one or more user defined zones and rules.

When you have streams doing 20-30 frames per second, colour high quality image sizes of 1280x1024 and multiple cameras - then yes, zoneminder does need some grunt to get its job done.

It does not follow that there is anything from with the design or programming of Zoneminder.
Has anybody done any comparisons of ZM versus motion cpu usage? (that turbo jpg looks awesome, BTW).

-r
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

Fedora 14 will ship with libjpeg-turbo incorporated

http://fedoraproject.org/wiki/Releases/14/FeatureList
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

I forgot about the turbolib, thanks storm. Indeed, makes a bit difference and good to see it's getting into at least one distro.
jondecker76
Posts: 35
Joined: Wed Sep 29, 2010 12:48 am

Post by jondecker76 »

I also suffer from extremely high CPU usage (> 2.0 with 2 cameras@320x240 - and it increases by more than 1 for each camera I add)
This is on a fresh Ubuntu Server 10.10 install

I have used motion for years, and the same setup could handle 8 cameras under Motion with no real noticable CPU load. I have a co-worker with the exact same results as me.

Other than the turbo jpg library, does anyone have any other suggestions?
DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Post by DREMA »

Yeah, check the load on your harddrives, with iotop or something, they tend to slow down the system and increase the load.

Also, already said, but really give a try to libjpeg-turbo.
bctb107
Posts: 1
Joined: Fri Jan 14, 2011 10:10 am

Post by bctb107 »

Ok I have made great progress. It turns out that from the ubuntu zoneminder package, after the install it doesn't set all the permission appropriately and found out that the www-data user wasn't added to the video group so apache or zoneminder didnt have access to /dev/video. Even sifting through the /var/log/messages or /etc/apache2/error.log, it had slipped by. The issue that I am having now is when I setup the cameras using /dev/video0-3 and using all the channels 0 and 1, I am getting duplicates on half the screens. I have swapped many channels and cant get all seven cameras on different screen
bctb107
Flash_
Posts: 441
Joined: Wed Jan 11, 2006 12:19 pm

Post by Flash_ »

jondecker76 wrote:I also suffer from extremely high CPU usage (> 2.0 with 2 cameras@320x240 - and it increases by more than 1 for each camera I add)
This is on a fresh Ubuntu Server 10.10 install

I have used motion for years, and the same setup could handle 8 cameras under Motion with no real noticable CPU load. I have a co-worker with the exact same results as me.

Other than the turbo jpg library, does anyone have any other suggestions?
Debian.

I massively reduced system load when going from Ubuntu to debian with just zoneminder running, exact same config.
junior
Posts: 15
Joined: Thu Dec 09, 2010 11:52 pm
Location: Austria

Post by junior »

I massively reduced system load when going from Ubuntu to debian with just zoneminder running, exact same config.
I also have had perfomance troubles by using Ubunut 10.04. The process Xorg was very cpu intensive. CPU usage about 80%! I found out that there are problems by using Intel graphic cards like i845/i855 Now I usea a nVida graphic card and the cpu usage is about 20% :)

Maby it's the same with Ubunut 10.10
Locked