Huge CPU usage ! (stuck on "MOTION_A (nothing found)")

Moderators: HeneryH, TimG

User avatar
jeremypsl
Posts: 40
Joined: Wed Oct 05, 2022 7:42 pm

Huge CPU usage ! (stuck on "MOTION_A (nothing found)")

Post by jeremypsl » Sat Oct 22, 2022 10:52 am

Hello,

I experience a new problem i didn't have before, live view and recording become laggy after a few hours of BI run.
But when i restart BI and look a the same recording that was laggy before, it is not anymore.
My server has i7-10700, 64go of ram, rtx3070.
I followed every advices i could find in documentations to keep cpu cool and it is : less than 10% use with 13 3MP cameras.
I noticed when the lag start, cpu usage double ?!
I'm actually trying to disabled the SWAP but after that, i'm out of ideas...

Thanks.
Last edited by jeremypsl on Mon Nov 14, 2022 4:57 pm, edited 3 times in total.
User avatar
TimG
Posts: 2467
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Live views and records lags !

Post by TimG » Sat Oct 22, 2022 11:42 am

Hi,

Start with the basics - Go to Status/Cameras, and have a look at FPS/Key. Can you post an image here ? Key should be around 1 for each camera.
Forum Moderator.
User avatar
jeremypsl
Posts: 40
Joined: Wed Oct 05, 2022 7:42 pm

Re: Live views and records lags !

Post by jeremypsl » Sat Oct 22, 2022 5:18 pm

Thanks for your answer.

Here is my screenshot :

Image

My cameras are Tapo C310 and C110 with no fps settings.

Thanks.
MikeBwca
Posts: 1156
Joined: Thu Jun 20, 2019 5:39 am

Re: Live views and records lags !

Post by MikeBwca » Sat Oct 22, 2022 5:34 pm

Your system is looks awesome!

Are you using AI?
If so...
- What AI? DP or CP? And, what version.
- You could try stopping/exiting the AI to see if the lag anf increased cpu is resolved.


Can you provide a few performance captures before & after?

1. Start Task Manager.
2. Click the 'Performance tab.
3. Click 'CPU' in the left vertical pane.
4. Restart BI.
5. Wait for the graphs to fill, then take a capture of the Task Manager Performance window. This will be the 'Normal' performance.
6. Wait until BI starts lagging and using double the Cpu...
7. Let the graphs fill to about half, then take a capture of the Task Manager Performance window and post it here. This will be the 'Isuue' performance
8. Take a capture of the BI/Status/Cameras windows, and post it here.

The Task Manager Performance will tell us a lot about what's happening, before and after.
User avatar
jeremypsl
Posts: 40
Joined: Wed Oct 05, 2022 7:42 pm

Re: Live views and records lags !

Post by jeremypsl » Sun Oct 23, 2022 4:07 pm

I tried without CP.AI and it is the same.
When BI start to lag, even if i restart BI or the entire PC, lags stays.
I need to change the hardware accelerated decode selection and restart BI to stop lags.
But it come back everytime, i tried Intel, Intel VVP, Intel Beta, nVidia...

Image

If i record during in a lagging period, the record appear laggy too.
But if i change the decode selection and view the same record in BI, no lag anymore ?! The same record that lagged before... Crazy ?!
User avatar
TimG
Posts: 2467
Joined: Tue Jun 18, 2019 10:45 am
Location: Nottinghamshire, UK.

Re: Live views and records lags !

Post by TimG » Sun Oct 23, 2022 7:08 pm

Since it looks to be due to hardware acceleration, have you tried it with it disabled ? I found with sub-streams that my intel i7-8700k gpu wasn't doing much (It was before sub-streams). I turned it off on all cameras, and cpu loading was unchanged. It doesn't tell you what the problem is, but maybe it doesn't matter. Time for a test.
Forum Moderator.
User avatar
jeremypsl
Posts: 40
Joined: Wed Oct 05, 2022 7:42 pm

Re: Live views and records lags !

Post by jeremypsl » Mon Oct 24, 2022 7:53 pm

Same with hardware acceleration disabled.
I tried to enabled BI service and if i don't run UI, it seem to be working (24h without lags).
User avatar
jeremypsl
Posts: 40
Joined: Wed Oct 05, 2022 7:42 pm

Re: Live views and records lags !

Post by jeremypsl » Tue Oct 25, 2022 3:57 pm

Well, lags again...

Image
Image
Image
Image
User avatar
jeremypsl
Posts: 40
Joined: Wed Oct 05, 2022 7:42 pm

Re: Live views and records lags !

Post by jeremypsl » Tue Oct 25, 2022 5:03 pm

After restarting cameras one by one (no possibility to restart all by one click ?) :

Image

I don't understand, i tried to reboot bi service and ui : no change.
I restart all cameras : no lags anymore.

I scheduled a restart of all cameras every days to see.

What could cause a cpu usage increase by time ? And be canceled by a camera restart ?
Tommyt57
Posts: 21
Joined: Tue Sep 21, 2021 10:59 pm

Re: Live views and records lags !

Post by Tommyt57 » Mon Nov 07, 2022 2:44 am

I'm a little new at this too. But have been using BI for about 3 years and put up with some lag issues too. After making a ton of changes, the final fix was moving my cameras to a private network (my cameras have no internet access now.) I added a second nic card to my computer and ALL my lag issues are gone!

I also found that setting my cameras to 15fps is just fine. Your cameras and BI fps should match. If you restart your cameras and the problem goes away, it seems the camera settings or network are the issue. Don't give BI admin rights to your cameras as it will change the settings. I use a view only id/pw on my cameras for BI. I give nothing admin authority unless required.

Has the mod has suggested, you may need to do a little reading and the video's are worth the time too.

Goog luck!
Post Reply