Serious Slowdown

Support and queries relating to all previous versions of ZoneMinder
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

ok then i think i am getting somewhere on this i can have all 16 of the composite cams working lovely
load is about 2 (with a 16 way remote view of zm4ms on site)

as soon as i add 1 ip cam (axis 206) load goes up a little and another 5% processor used all is fine if i add another i get huge jumps in load

could this be a network card issue??
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

Hi James,

You aren't by any chance throttling the fps on the network cams at the zm end are you? Instead of in the cgi string passed to the cam?
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

well i was using mjpeg streams from the cams limited to 2 fps and unlimited at the zm end.

Whilst clutching for straws i have changed all the paths to jpg and set the limit on the zm end (which i assume is correct for jpeg i understand why the limit needs to be at the cam for mjpeg)
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

following on on my theory this is network related i am using the built in network card, could this be my issue if i put a decent pci network card in would this help?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

this definetly something to do with the netwrok cams
so i suppose its either
a the network card in the mobo
b the fact thats its decoding the jpgs before analysis is just to much for it
c something else network related
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Network cameras are definately more CPU intensive than regular ones, the process of decoding jpeg images really is a hog and can end up being what is using the majority of the CPU.

Phil
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I should add that 1.22.0 will have some experimental jpeg optimisations that might speed things up but to what degree I don't know.

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

thing is id understand that if i was at 0% idle and each zmc/zmc for that monitor taking all the cpu but they take between 3 and 6%. and i end up with a 25-35% idle on the processor. But a load of 22

Im assuming these built in mobo network cards make the processor do all the work.

I also have zm4ms on this site but zms is taking 0.4% cpu thats all.
But obviously networlk bandwidth is high and im assuming this is th eproblem but i dont know.

16 composite cams load 1.2-1.4
5 network cams load 23

I cant see thats right

James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

ooohhh experimental optimisations
mmx?
Cant wait (well i normally cant why should this be any different lol)
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Your load does seem high but don't underestimate the proportion of time jpeg handling does take! This is one of the reasons I am so keen to push raw images to your app when it's on the same network segment.

The optimisations aren't mmx I'm afriad (that's much too platform specific to put in a general release) but more to do with caching quantisation tables and such like. Don't get too excited! There are also many changes to the zone handling, for instance they can be any shape now and not just quadrilateral, and I've optimised the motion detection a little bit around that as well.

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

i was a bit scared of this raw format but i think you may be right, but zms takes less than 2% of the proc streaming 36 images so where does the load show up. I would haved thought that zms would be taking tonnes of proc time if its that heavy?
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I've never really been able to get 'top' to add up, though it is useful for relative ordering. I suspect perhaps we need some more sophisticated profiling and performance tools to really figure this out.

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

do you think i may be close with the network card or am not even in the right forest
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

No idea mate, I'm afraid :lol: but it sounds possible. Is it 100Mbs or 1Gbps?

Phil
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

100Meg but i cant seem to find anyway of checking the status of the network card ie its throughput etc. I assume its like a disk to the kernel and will wait for stuff. I was wondering if i could tell it to priortise ceratain traffic. Assuming it is the netwirk card. Im ganno do some tests with another machine and a 3com pci card to see if im close. Its all part of this huge learning curve, im hoping in about 10 years it will be a little less steep lol
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Locked