USB Webcam boosts Load Average

Forum for questions and support relating to the 1.30.x releases only.
Locked
Markymark
Posts: 50
Joined: Fri Jan 03, 2014 7:43 am

USB Webcam boosts Load Average

Post by Markymark »

Hi,

I ran ZM with three cams attached via LAN stable and with moderate CPU load (0.5) for quite a time. I now added one USB Webcam and was quit astonished that the CPU load suddenly boosts up to > 1.7. CPU idle just increased very moderate as expected to 70 something. I (think I) know about the different meaning of CPU load and idle. So it seems that CPU is very busy only at a fracture of time while running on idle at other times. Does this has to be that way or is there anything to do about that. I am planning to connect more USB cams which will result in CPU Load >> cores.

FPS = 2, greyscale, 640 x 480

Rgrds,

Mark
Last edited by Markymark on Fri Nov 25, 2016 1:36 pm, edited 1 time in total.
bbunge
Posts: 2934
Joined: Mon Mar 26, 2012 11:40 am
Location: Pennsylvania

Re: USB Webcam boosts CPU Load

Post by bbunge »

Tell us something about your system: Linux version, processor, RAM, drive, USB camera make...
Markymark
Posts: 50
Joined: Fri Jan 03, 2014 7:43 am

Re: USB Webcam boosts CPU Load

Post by Markymark »

Hi bbunge,

I am running ZM on a Cubietruck ARM-Board with Ubuntu 14.04.5 (Cortex-A7 Dual-Core, 2GB RAM, SSD). USB camera is a Logitech Quickcam Connect. Memory usage is at 20%, idle at 75% but CPU load at 2,5 (now with 2 Logitech cams connected).

Thanks in advance.

Greetings,

Mark
Markymark
Posts: 50
Joined: Fri Jan 03, 2014 7:43 am

USB Webcam boosts Load Average

Post by Markymark »

OK, I did some digging into this issue. This is no ZM problem, but I started this post and maybe it might be helpful later.

I can still not figure out what causes the high load. CPU is 75% idle and there are no processes waiting for rescouces etc. (as far as I can see using top). I started to grab shots from the command line with ffmpeg - same issue, no hints. Next I complied some C code directly using the video4linux2 libs. First I used the mmap-method - same issue, no hints. The load ramps up very fast, no matter how fast I grap jpegs from the buffer. Then I tried the most simple approach: using the read-method via v4l2. Even if I read only 1 jpg per second the load ramps up! After stopping the capture it takes quite a while until the load slowly settles to normal. So it seems this is something like a general issue of using the usb device.

I am completely lost at this point. It is not that important to solve this, but meanwile am really curious to understand the bottleneck. Maybe somebody has an idea anyway. Otherwise I will post this to more appropiate forums later.

Greetings,

Mark

P.S.: I just skipped the read command from the code. So, now this is just an open usb-device lying around and doing nothing ... same issue, no hint. :?
Locked