What is normal cpu usage?

D0T-C0M

Getting the hang of it
Joined
Feb 21, 2021
Messages
103
Reaction score
28
Location
NB, Canada
I have a old gaming computer with an i5-2500k and a nvidia 1060 gpu. I am using 2 RasPi setup as ip cameras streaming rtsp udp to Blue Iris. One stream at 720p at 30fps and the other at 1080p at 30fps. Both encoded using h264 and no audio and motion detection on but with no object detection. I am writing directly to disk and tried both the intel and nvidia hardware acceleration with no visible cpu decrease. If i disable both cameras i get 6% cpu load and each feed uses 35% and hover consistently around 75%-80% with both streams enabled. Is this normal? It seems high to me but maybe that normal. Both RasPi boards are running about 12%-15% each. I turned off motion detection on both streams and i save maybe 10%. I know I could reduce the fps and resolution of the streams but are there other ways to reduce the cpu load. Hardware acceleration doesn't seem to help. One thing i did notice is when I disable one feed the load drops to about 38% and when I enable the stream the cpu load doesnt immediately shoot up, it goes up to about 50% and then over the course of 30 seconds or so it creeps up to reach 75%-80%.
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,902
Reaction score
21,274
I have a old gaming computer with an i5-2500k and a nvidia 1060 gpu. I am using 2 RasPi setup as ip cameras streaming rtsp udp to Blue Iris. One stream at 720p at 30fps and the other at 1080p at 30fps. Both encoded using h264 and no audio and motion detection on but with no object detection. I am writing directly to disk and tried both the intel and nvidia hardware acceleration with no visible cpu decrease. If i disable both cameras i get 6% cpu load and each feed uses 35% and hover consistently around 75%-80% with both streams enabled. Is this normal? It seems high to me but maybe that normal. Both RasPi boards are running about 12%-15% each. I turned off motion detection on both streams and i save maybe 10%. I know I could reduce the fps and resolution of the streams but are there other ways to reduce the cpu load. Hardware acceleration doesn't seem to help. One thing i did notice is when I disable one feed the load drops to about 38% and when I enable the stream the cpu load doesnt immediately shoot up, it goes up to about 50% and then over the course of 30 seconds or so it creeps up to reach 75%-80%.
That is not normal. Are you running the demo?
Is the pi sending an h.264 stream?
You would be at at about 10 percent or less for that load - even without substreams..
 

D0T-C0M

Getting the hang of it
Joined
Feb 21, 2021
Messages
103
Reaction score
28
Location
NB, Canada
I'm using this command
raspivid -o - -t 0 -w 1920 -h 1080 -fps 30 -n -b 2000000 -g 30 | cvlc -vvv stream://dev/stdin --sout '#rtp{sdp=rtsp:/:8555/stream}' :demux=h264

so I'm assuming its properly encoding in h264. Is there an easy way to tell if the stream is using h264?
 

VirtualCam

Young grasshopper
Joined
Sep 25, 2015
Messages
49
Reaction score
11
30FPS is actually pretty high....Do you need it that high? I'm running 20 cameras at 2 FPS each camera. 18 of those cameras are 4K, 2 are 1080P. With 6 processors cores roughly equiv to the 4 in your I5-2500K, I'm around 40% CPU load.

Have you looked at the various Blue Iris tuning guides? Are you using any overlays that are causing a decode/re-encode such as adding a timestamp or title to the image? If you are writing direct to disk, your GPU hardware acceleration shouldn't be getting used at all. What does your task manager show for GPU usage? If it's high, then you are likely using overlays and I'd start there.

Even simple math shows, if I doubled my frame rate to 4FPS on every camera, I'd go close to 80% CPU and my system would become unusable.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,984
Reaction score
48,722
Location
USA
Yep...movies for the big screen are shot in 24FPS, yet people feel the need to shoot 30FPS or 60FPS for surveillance cameras to watch on their tiny phone LOL
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,902
Reaction score
21,274
The frame rate is not the issue here. Are you running the demo??
 

D0T-C0M

Getting the hang of it
Joined
Feb 21, 2021
Messages
103
Reaction score
28
Location
NB, Canada
no I bought a licence for blue iris. I confirmed the rtsp streams are properly encoded with h264 using VLC client. I did notice in blue iris stats that both streams are running at 30FPS but the keyframes were only 0.5 , I added the command -g 30 to increase the key frames so that I could turn on "Limit recording unless required" and that saved about 10% so now I'm in the 55%-60% CPU range. I lowered the FPS just for fun and I didn't see any noticeable change in CPU load maybe max 4% or 5%
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,902
Reaction score
21,274
no I bought a licence for blue iris. I confirmed the rtsp streams are properly encoded with h264 using VLC client. I did notice in blue iris stats that both streams are running at 30FPS but the keyframes were only 0.5 , I added the command -g 30 to increase the key frames so that I could turn on "Limit recording unless required" and that saved about 10% so now I'm in the 55%-60% CPU range. I lowered the FPS just for fun and I didn't see any noticeable change in CPU load maybe max 4% or 5%
Dont use limit decoding. Your cpu usage simply using direct to disk should be under 10 percent load. Your load is tiny. Your load is 90 megapixels per second, by way of example, I have an old system running an i5-2500 (non K) with about 280 megapixels per second and its at about 50 percent load simply using direct to disk, no sub no limit decoding.
Are you viewing the system on a monitor or using some remote viewing software?
 

D0T-C0M

Getting the hang of it
Joined
Feb 21, 2021
Messages
103
Reaction score
28
Location
NB, Canada
Yes I am viewing the live view on my monitor of the computer that is running BI. Even if I pause live view it only drops 5 or 6%
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,902
Reaction score
21,274
Yes I am viewing the live view on my monitor of the computer that is running BI. Even if I pause live view it only drops 5 or 6%
Test it with a proper ip camera and see if you get the same result.
 

D0T-C0M

Getting the hang of it
Joined
Feb 21, 2021
Messages
103
Reaction score
28
Location
NB, Canada
Unfortunately All I have are these 2 RasPi cameras and another RasPi spare.
 

D0T-C0M

Getting the hang of it
Joined
Feb 21, 2021
Messages
103
Reaction score
28
Location
NB, Canada
I also checked my router to monitor the bitrate and its pretty much flat line so no abnormal surges that would cause and load changes AFAIS
 

fenderman

Staff member
Joined
Mar 9, 2014
Messages
36,902
Reaction score
21,274
Did you add a network card or other device to the pc? I recall once having an issue similar to this (though I think the cpu was a high even when BI was closed). The culprit was a bad driver install on the network card. I removed it, reinstalled the driver and it worked fine.
 

D0T-C0M

Getting the hang of it
Joined
Feb 21, 2021
Messages
103
Reaction score
28
Location
NB, Canada
I just clean install of windows 10 like 6 weeks ago and it detected and installed all the drivers for my motherboard. I have not added any network cards. I'm using the onboard lan
 
Top