Send Motion-user mailing list submissions to motion-user@lists.sourceforge.net
To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/motion-user or, via email, send a message with subject or body 'help' to motion-user-requ...@lists.sourceforge.net You can reach the person managing the list at motion-user-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of Motion-user digest..." Today's Topics: 1. Re: Motion 4.2.2 vs 4.1.1 CPU usage (Tom Kennelly) ---------------------------------------------------------------------- Message: 1 Date: Fri, 19 Jul 2019 14:16:08 -0400 From: Tom Kennelly <t...@tekennelly.gotdns.com> To: Motion-user@lists.sourceforge.net Subject: Re: [Motion-user] Motion 4.2.2 vs 4.1.1 CPU usage Message-ID: <1ef875f6-7153-27bf-5658-230722459...@tekennelly.gotdns.com> Content-Type: text/plain; charset="utf-8"; Format="flowed" BTW any mismatch between the camera configuration (i.e., width and height sizes) and motion can increase CPU requirements.?? I also match the framerates as well. On 7/19/2019 2:11 PM, rmbusy wrote: > Thanks for this info.? It sounds like 4.2.2 should be less CPU usage > than 4.1.1, so I'll have to do some experimenting here to see if I can > figure out why it's gone up (the profiling link should help with > that).? I have all the notes from when I built 4.1.1. initially, and > the source zip files, so I should be able to reproduce that if need be. > > I would not expect going from Ubuntu 16.04 to 18.04 to be the cause, > but I won't rule it out either.? I have a spare drive, so I could > install 16.04 on it, and in theory, completely recreate my original > setup.? If only I had the free time to do everything I want to do > right now. > > I'll keep you posted. > > > -- > Rob. > > > > On 7/19/19 10:35 AM, tosiara wrote: >> This is my ARM board CPU usage over the previous year: >> >> image.png >> >> It is using USB webcam. In 2018 I changed pixel format from MJPEG to >> RAW and it decreased the CPU usage from ~65% to ~35%. In the middle >> on 2018 I merged NEON optimizations which saved even more CPU - to >> ~23%. I constantly update my motion to master branch, but since 2018 >> CPU usage on this ARM device has not changed >> >> So I doubt your issue is in motion's code. It could be compile flags. >> If want to be sure, try profiling motion and compare: >> http://www.lavrsen.dk/foswiki/bin/view/Motion/MotionProfiling >> >> >> >> >> On Fri, Jul 19, 2019 at 7:16 PM rmbusy <rmbusy+mot...@gmail.com >> <mailto:rmbusy%2bmot...@gmail.com>> wrote: >> >> One other thing, in an attempt to reduce CPU usage, I've disabled >> auto_tune, and added mask files to 5 of the cameras to mask out >> foliage >> and areas that could cause excess triggering, and bumped the >> threshold >> from 5,000 to 10,000 on all of the 2MP cameras.? These changes >> were not >> needed with 4.1.1. >> >> I've also noticed a lot more motion detection of changing shadows, >> compared to what I used to see. >> >> >> -- >> Rob. >> >> >> On 7/19/19 9:08 AM, rmbusy wrote: >> > OS is Linux (before, Ubuntu Xenial 16.04 LTS, now Ubuntu Bionic >> > 18.04.2 LTS).? In both cases, I built motion from source.? I >> started >> > by installing the package with apt-get install motion to get >> all the >> > dependencies, then built from source and switched to it. >> > >> > Since there are really only 3 types / configurations of cameras, I >> > only tested the 3 types.? I watched the output of 'top' for >> about a >> > minute for each test.? I also waited for the initial startup to >> settle >> > (time for camera to respond with images) before recording the >> > numbers.? I don't have 4.1.1 building yet, so these numbers are >> for >> > 4.2.2. >> > >> > For the 2MP snapshot camera, after startup, before connecting >> to the >> > web page, it hovered between 25% and 45% CPU usage. >> > After starting the web page, the numbers hovered between 78.5% >> and 81.5%. >> > >> > For the 1MP streaming camera (5 frames / sec), it hovered >> between 23% >> > and 33%. >> > After starting the web page, 33.7% to 45.9%. >> > >> > For the 2MP streaming camera (5 frames / sec), it hovered >> between 42% >> > and 53.6%. >> > After starting the web page, 63.6% and 70.3%. >> > >> > I'm a little surprised no one had usage numbers between the two >> > versions.? Considering I'm using the same configuration files >> (with >> > updates for the new parameter names in 4.2), I was expecting >> others >> > would see this problem.? It's an issue for me, because I have more >> > cameras I want to add, but at this point with 4.2.2, the CPU is >> maxed >> > out. >> > >> > >> > -- >> > Rob. >> > >> > >> > On 7/18/19 11:12 PM, tosiara wrote: >> >> Could you compare CPU numbers running only one camera? The best to >> >> make 8 separate tests with each camera. This could help to >> understand >> >> the issue better >> >> Also, which OS are were you using before and now, and which motion >> >> version - binary package or compiled yourself? >> >> >> >> On Thu, Jul 18, 2019 at 9:33 PM rmbusy >> <rmbusy+mot...@gmail.com <mailto:rmbusy%2bmot...@gmail.com>> wrote: >> >>> I upgraded my system to the latest version of Linux, and at >> the same >> >>> time, upgraded Motion from 4.1.1 to 4.2.2. >> >>> >> >>> I have 8 RTSP cameras set up, 5 cameras configured for >> snapshot mode at >> >>> 1 frame per second (all 2MP), and 3 streaming at 5 frames per >> second (2 >> >>> 2MP, 1 1MP).? All of this is running on a quad core Rock64 w/ >> 4GB DRAM, >> >>> at the default CPU frequency (1.3GHz). >> >>> >> >>> With 4.1.1, I was seeing around 150% CPU utilization (via >> top), and >> >>> when >> >>> connecting to the web page, around 300% CPU utilization. >> Since the >> >>> Rock64 is a quad core ARM processor, max is 400%. >> >>> >> >>> Now with 4.2.2 and the same camera configuration files >> (updated with >> >>> new >> >>> option names), I'm seeing CPU utilization of 250%, and when >> connecting >> >>> to the web page, the numbers are maxed out, and the web page is >> >>> basically non-responsive. >> >>> >> >>> Since I upgraded the underlying OS, I can't rule out that it's >> >>> requiring >> >>> more CPU cycles for Motion to do the same thing, but that seems >> >>> unlikely.? Running top doesn't show anything else using CPU >> cycles >> >>> (other than top). >> >>> >> >>> Can anyone confirm if 4.2.2 is using significantly more CPU >> cycles than >> >>> 4.1.1?? If I can't find a way to reduce the usage, I may have >> to go >> >>> back >> >>> to 4.1.1. >> >>> >> >>> Any suggestions would be appreciated. >> >>> >> >>> >> >>> -- >> >>> Rob. >> >>> >> >>> >> >>> >> >>> >> >>> _______________________________________________ >> >>> Motion-user mailing list >> >>> Motion-user@lists.sourceforge.net >> <mailto:Motion-user@lists.sourceforge.net> >> >>> https://lists.sourceforge.net/lists/listinfo/motion-user >> >>> https://motion-project.github.io/ >> >>> >> >>> Unsubscribe: >> https://lists.sourceforge.net/lists/options/motion-user >> >> >> >> _______________________________________________ >> >> Motion-user mailing list >> >> Motion-user@lists.sourceforge.net >> <mailto:Motion-user@lists.sourceforge.net> >> >> https://lists.sourceforge.net/lists/listinfo/motion-user >> >> https://motion-project.github.io/ >> >> >> >> Unsubscribe: >> https://lists.sourceforge.net/lists/options/motion-user >> > >> >> >> >> _______________________________________________ >> Motion-user mailing list >> Motion-user@lists.sourceforge.net >> <mailto:Motion-user@lists.sourceforge.net> >> https://lists.sourceforge.net/lists/listinfo/motion-user >> https://motion-project.github.io/ >> >> Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user >> >> >> >> _______________________________________________ >> Motion-user mailing list >> Motion-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/motion-user >> https://motion-project.github.io/ >> >> Unsubscribe:https://lists.sourceforge.net/lists/options/motion-user > > > > _______________________________________________ > Motion-user mailing list > Motion-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/motion-user > https://motion-project.github.io/ > > Unsubscribe: https://lists.sourceforge.net/lists/options/motion-user -------------- next part -------------- An HTML attachment was scrubbed... -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 17360 bytes Desc: not available ------------------------------ ------------------------------ Subject: Digest Footer _______________________________________________ Motion-user mailing list Motion-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/motion-user ------------------------------ End of Motion-user Digest, Vol 157, Issue 25 ********************************************