Blue Iris & Sense AI - high memory usage

Perplexed

Getting the hang of it
Joined
Sep 5, 2022
Messages
70
Reaction score
98
Location
USA
First and foremost, I'm a newb when it comes to BI - I've been up and running for about 24 hours now.

System:
i7 - 8700
32 gigs of ram
NVME Primary, "Security Camera" Spinner disks for storage
Intel GPU doing it's job
13-4mp cameras running at 25fps (yeah, i know... I know).
Sense AI running in a docker


So far, Blue Iris is running at 15-25% CPU with how I have things configured (constant+triggered), with 1-1.5 gig of ram used.

What's concerning is "Vmmem" using 12 gig of ram constantly. From what I can tell, this is the SenseAI side of things, running within the docker.

While it's not crippling my system, it seems like it's taking up quite a bit of ram - which I didn't expect. The processor usage from the same is trivial. Docker is only reporting 2.8gb of memory usage whereas Task Manager is reporting the ~12gb.


This computer is 100% dedicated to BI/SenseAI. I'm okay with leaving it as it is, as it doesn't appear to be a problem (yet), however I wanted to ensure something wasn't "wrong" that was going to set me up for a future failure.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,448
Reaction score
47,571
Location
USA
That is way too high of CPU%.

I suspect you are not running substreams.

Have you done every optimization in the wiki?


Can't answer the issue with Docker but that does seem to be exceptionally high.
 

Perplexed

Getting the hang of it
Joined
Sep 5, 2022
Messages
70
Reaction score
98
Location
USA
Looking further, it appears my gpu isn’t doing its job; drivers appear borked and a reinstall isn’t working just yet.

I’ll have to resolve that before messing with anything else
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,448
Reaction score
47,571
Location
USA
Speaking of GPU, make sure you are not using hardware acceleration in BI at both the global level and within each individual camera settings in BI.
 

Perplexed

Getting the hang of it
Joined
Sep 5, 2022
Messages
70
Reaction score
98
Location
USA
Got the graphics driver fixed, GPU is working and the processor use has dropped a bit.

Part of my higher CPU use is that I'm running everything at 25FPS instead of 15FPS and using .265 instead of .264 - I wanted to see what this system "can do" compared to how my old NVR was setup. I can always tune it "down" if the processor use becomes an issue on this system.

After the graphics driver issue was fixed, the computer rebooted - vmmem (SenseAI) is already back up to 6 gig of ram use. Yesterday it started off around that number and then jumped at night.

I'm wondering if it's just bogging down due load at night. This time of year we have a lot of flying bugs that are attracted to the IR on the cameras. Maybe it's just working overload while processing all of the movement across it's database?
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,448
Reaction score
47,571
Location
USA
You still didn't answer if you are using substreams....which I suspect you are not. Keep in mind the NVR was using substreams...
 

Perplexed

Getting the hang of it
Joined
Sep 5, 2022
Messages
70
Reaction score
98
Location
USA
My NVR settings were recording the full 4mp/25FPS/.265. Substreams were used when streaming content to mobile devices on non-WiFi connections (LTE).

Blue iris is setup to record both substreams and primary streams.... "Continuous + Triggered".

When I've been reviewing alerts (motion confirmed/identified) I can see a definitive difference from the quality of video when the clip starts playing and initially senses motion - when it switches over to the higher quality recording.

When using the web interface; frankly the quality of video is significantly lower than when I used an NVR for the same task. It's still functional and does what I need, just the overall quality is like watching a TV from the 1990s versus a 4K HDR movie on today's TV.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,448
Reaction score
47,571
Location
USA
I am surprised it is that high using substreams. People here run more cameras than you on 4th gen at less CPU%

You can adjust the substream quality. You would be surprised how well D1 resolution at 2048 bitrate looks and doesn't impact quality that much. Or up the substream - some will do 1080 resolution. Just don't get too carried away.

In fact I did a test and a 3rd party plate reader could read D1 resolution plates.


You can adjust the web interface quality as well.
 

Perplexed

Getting the hang of it
Joined
Sep 5, 2022
Messages
70
Reaction score
98
Location
USA
I remember reading that page the other day, was really interesting.

I’ve thought about adding LPR, however for my use case I’d have to find a free version/locally run. Frankly it’s not something I “need”; but it would be fun to play with. I’m just not too interested in a monthly subscription.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,448
Reaction score
47,571
Location
USA
My intent of linking that wasn't to get you to add LPR lol

It was to show you that upping bit rate on a substream can improve the image quite a bit without adding to CPU. If AI can read it, then it is probably good enough for streaming lol
 

Perplexed

Getting the hang of it
Joined
Sep 5, 2022
Messages
70
Reaction score
98
Location
USA
Well, my memory issues are still going on.

While fine-tuning things (went from .265 to .264, and a ton of other settings for AI/Alerts to filter down all the push notifications) I realized something. If I stop running the BI interface and just have the service running in the background, task manager is reporting my CPU at 10-15%. It's only when I'm running the interface that my CPU goes to 20-25%

With that being said, the BI client, regardless of status is using on average 2.4 gig of ram.

The SenseAI is consistently 7-12 gigs of ram... which from what I've read around here, seems a bit high.



I wasn't too worried about it, until the push notifications started taking up to an hour to actually get to my phone for the motion/AI alerts. I had a trigger last night at 2305 hours, but the alert did not hit my phone until some time shortly after midnight. Looking through the logs, it shows the push was sent at 2305:37, just for some reason it was delayed an hour before my phone actually got the alert.

I originally had SMS setup as a 'backup', however it appears my carrier has rate-limited me; it didn't get delivered at all. I guess i'll have to look into telegram or something for a backup.
 

Perplexed

Getting the hang of it
Joined
Sep 5, 2022
Messages
70
Reaction score
98
Location
USA
some more info.

Currently, 4 cameras get filtered through the AI for alerts. The other 9 cameras get filtered through the AI, however there is NO alert sent on those for motion.

I'm running the CPU version of SenseAI, and it appears to be using very little processor time. I don't see any benefit in attempting the GPU version, currently.

After reading the Blue Iris manual, I've tried "No GPU", "Intel" and "Intel VPP" without much change in it's overall processor utilization.

Screen Shot 2022-09-19 at 7.05.17 AM.png

Screen Shot 2022-09-19 at 7.06.14 AM.png

Screen Shot 2022-09-19 at 7.07.19 AM.png

Screen Shot 2022-09-19 at 7.26.38 AM.png
 
Last edited:

Perplexed

Getting the hang of it
Joined
Sep 5, 2022
Messages
70
Reaction score
98
Location
USA
I should mention that the other day I changed my cameras from .265 to .264 to see if that would change anything - nope, it did not. CPU is even about the same. CPU/GPU encoding within BI doesn't seem to make much of a change on processor/ram load either.


Please don't take that as a complaint - just observations at this point. I'm very happy with how this is running.

On .264, I seem to be averaging about 150gig of data per day. That puts my video storage time a total of about 40-45 days at the current rate/configuration.
 
Joined
Apr 13, 2021
Messages
6
Reaction score
6
Location
Norwood Massachusetts
I have the very same problem as CPU is aorund 15 to 30 % but rises when all 13 cameras motiion etc. engage . Memory is over 7 gig and network is about 90 meg
Tried the 265/264 switch also .

I DID have an issue where the cameras were out of sync with 265 and that cleared up after setting to 264 . Tried all the tricks and trades here as I still review
 

Perplexed

Getting the hang of it
Joined
Sep 5, 2022
Messages
70
Reaction score
98
Location
USA
FWIW I never did get a handle on this, but the system just humms away. It's a dedicated system that ONLY deals with BI - so I'm not too terribly concerned about it.

Everything works, just the memory usage stood out to me.

I'm no longer running Sense in a docker, but a "standard install now". That seems to work better that way.
 

looney2ns

IPCT Contributor
Joined
Sep 25, 2016
Messages
15,521
Reaction score
22,657
Location
Evansville, In. USA
Be sure that you have properly excluded BI from any Anti-virus, that includes Windows Defender, as outlined in the BI help file.

Have a look at this as well.
 
Top