Internal AI Causing Massive CPU/Memory Usage?

btreinders

n3wb
May 17, 2017
27
3
I was seeing 25 GB plus usage of memory on 6.0.2.2 (could have started on an earlier version) with internal AI enabled. Went back to CodeProject and back down to about 2 GB for BI and another 2 for CP. Anyone else seeing the same?

I have an i9-14900k, 32GB DDR5 RAM running on an SSD with 8TB SATA for storage and with W11 and 7 4k cameras. With internal AI enabled I turned off hardware encoding and the CPU spiked to near 100% and the GPU didn't really drop. CPU was in the 50% with hardware encoding enabled, normally it is less than 10% without internal AI. All Direct to disk and using sub-streams. Could hardly use the PC. Had issues with all cameras not staying at 15FPS/1.00 key frame too. They would fluctuate all over the place and miss things in recordings that were in the preview clips.

Thanks,
Brent
 
I don't use AI with Blue Iris (yet..) but I recall there was an issue where Blue Iris had a way-too-high default for the number of AI instances it was running. I think this is "max connects" in Blue Iris Settings > AI tab. It should be set to something like 4 or less.
 
The built in AI is going to use at least 2Gb of additional RAM depending on the number of connections you allow the AI to use!
I am running 6.0.2.2 with the built in AI (max connects 32) and I am beginning to suspect that there may be a memory leak, I was showing over 6GB of RAM allocated, I just restarted the BI service and it is currently at 2.61GB, I am going to keep an eye on it and see if it keeps climbing, before I can confirm if it is a problem!

Edit it is now 4:46 pm and the RAM is at 3.23 GB
Edit it is now 9:32 pm and the RAM is at 3.87 GB, so it is not climbing rapidly at least, will see what it is like in the morning
Edit it is now 12:32 AM and the RAM is at 3.96 GB
Edit it is now 7:44 am and the RAM is still only 3.96 GB - not really going up that I can see!
Edit it is now 1:24 pm and the RAM is now up to 5.32 GB, will keep monitoring it!
Installing the new 6.0.2.4 update reset my memory usage!
 
Last edited:
The built in AI is going to use at least 2Gb of additional RAM depending on the number of connections you allow the AI to use!
I am running 6.0.2.2 with the built in AI (max connects 32) and I am beginning to suspect that there may be a memory leak, I was showing over 6GB of RAM allocated, I just restarted the BI service and it is currently at 2.61GB, I am going to keep an eye on it and see if it keeps climbing, before I can confirm if it is a problem!

Edit it is now 4:46 pm and the RAM is at 3.23GB

Mine would go right to 20+ GB when I would restart BI and then settle out at around 15-20. Max connects set to 32.
 
ver. 6.0.1.30 . Max connects set to 8 for last several weeks. Not experiencing any resource consumption creep/overrun.
1771205906518.png
 
Last edited:
I am beginning to suspect that there may be a memory leak,
I'm running 6.0.2.2 and it has been up for over 3 days now and the ram use has been hovering around 2.3GB. I have an Intel Core i7-14700 w/32GB RAM running AI on 15 cameras with the max connects at 4.

Screen Shot 2026-02-15 at 6.34.15 PM.png
 
It was definitely the max connects, I changed to 4 and am now seeing much better numbers. Not sure what that value really affects though. Am I now only able to use AI on 4 cameras at a time?
 
Using "periodic scans" on your cameras will also greatly increase the amount of resources being used - especially at the default setting which scans way too often IMHO. By limiting the number of max connects, this helps spread the load out better, but it is really just fixing a symptom instead of fixing the root problem.

Most cameras probably don't need periodic scanning. If they do, they probably don't need to scan as often as the default setting (which I think is set at less than 1 second which means every camera is scanning multiple times each second). For example, if I want to know if a car is parked/not moving, I can determine that with a much slower periodic scan rate than what the default setting is. Once a minute (or even slower) would work fine and really cut down on the processing demands.
 
  • Like
Reactions: Flintstone61