From: Peter S. <pet...@ut...> - 2006-06-21 21:31:34
|
aaron barrus wrote: >Hello motion list, > >I have a server watching about 200 cameras, and it sits at 100% CPU all the time. It's watching >.jpg files that are updated by netcams once every 30 seconds-ish. I want to slow motion down >further than just 1 frame per second. Is there any possible way to do that? > >Second question: the box has two gig of RAM and 2 gig of Swap. According to TOP, motion is using >3051m of VIRT memory (which is resident + swap, right?). See: > > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND >21317 root 26 10 3051m 199m 1032 S 88.5 9.8 46:50.94 motion > >But I don't see that it's actually using any of the swapfile: > >[root@linux ~]# free > total used free shared buffers cached >Mem: 2074908 1100324 974584 0 224416 421684 >-/+ buffers/cache: 454224 1620684 >Swap: 2088416 0 2088416 > >So where is this memory being allocated? I'm wondering because: if I add more cameras, will it >hit a maximum of some kind and die? > >Any thoughts on these two questions are appreciated. Thank you! > >Aaron > > That is an interesting problem. I'm really not that much of a developer of Motion, but I can say that to have Motion look at a camera with timing in terms of seconds-per-frame rather than frames-per-second would ultimately require some coding. Are you recording motion movies, images, or just timelapse images (image every X seconds etc?) Also, which specific version of Motion are you using, and did you compile it yourself? It is weird that your "VIRT" is 3.051GB with only 1.1GB RAM being used in the system. You might try adding a few extra columns to TOP if you can (SWAP, CODE, DATA.) Here is how my system looks (~18 webcams, ~2-5fps.) PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ SWAP CODE DATA COMMAND 27024 root 16 0 564m 153m 1304 S 67.9 3.8 1023:28 410m 140 558m motion [root@linux ~]# free total used free shared buffers cached Mem: 4151308 4127980 23328 0 40392 3722068 -/+ buffers/cache: 365520 3785788 Swap: 140287572 160 140287412 It may be that it *is* using CPU while it is busy getting camera images, but the overall memory footprint is small since it probably doesn't have to keep many images around to make movies with. It has many threads running, so that probably ramps up your LOAD, but as far as memory use, it may be minimal. Thanks, Peter |