I might be causing my own problem here by insisting on running Windows Server 2016 as my OS for Blue Iris, but alas that is what I have set up. I have been dealing with poor BI performance on my old hardware which was a very old i7-3770K (Ivy Bridge), and I assumed that was the problem. So this week I finally gave it "new" hardware, an i7-7700 (non-K) and 12GB of DDR4. Well, the performance is actually far worse now! BI records video (direct-to-disk with substreams enabled) just fine, but playback of a saved clip is laggy and averages 1fps. (If I download the clip and play it offline, it's properly 30fps so the camera source and recording is fine.) Background: I'm running six 2MP cameras in H.265, all with H.264 substreams. I have done all the other optimization I can find (FPS = keyframe interval, etc.).
I debugged some and found that the Power Options have a HUGE effect. Clicking "High Performance" instantly boosts playback to 30fps through UI3. Click "Balanced" and it drops to 1fps again. I can see in Task Manager while just recording (no viewing/playback) the CPU utilization is 6% and the CPU idles at 0.76GHz. Seems ok. Opening UI3 and viewing live cameras or the "all camera" thumbnail works fine. The trouble is, when I play a saved clip in UI3, the CPU usage (task manager) rises only to 9-10% and the CPU frequency only comes up to 0.86GHz, and the playback is 1-2fps as mentioned. Setting the High Performance power plan causes the CPU to permanently run at the full speed of 4.0GHz and playback is perfectly fine at 30fps.
So, that's the "fix" -- leave it in High Performance mode. Or that's a workaround at least. However, I dug further as I didn't like that. Some experiments:
I tried setting "EPP" to 0 and it didn't help. Commands, for reference:
powercfg -setacvalueindex scheme_current sub_processor PERFEPP 0
powercfg -setactive scheme_current
I wondered if the CPU or GPU frequency was the limiting factor. In Balanced mode the GPU runs at 350MHz and in High Performance it's pegged at 1150MHz. So I modified the Balanced power mode by setting Minimum processor frequency to 50/75% (I tried both). This modifies ONLY the CPU frequency and GPU stays at 350MHz. It resolves the 1fps issue, proving that the CPU frequency is the problem not GPU.
I'm still stumped though, why is the CPU usage so low in Task Manager if it is bottlenecking the video playback so badly? Why won't the CPU hardware and/or Windows kernel increase the CPU frequency on demand as needed? I feel like trying Blue Iris on Windows 10/11 on the same hardware to see if that fixes it. Windows Server 2016 is pretty old now and is showing its age. But that's a big annoying process just as an experiment, so I'm looking for other things to try first.
I debugged some and found that the Power Options have a HUGE effect. Clicking "High Performance" instantly boosts playback to 30fps through UI3. Click "Balanced" and it drops to 1fps again. I can see in Task Manager while just recording (no viewing/playback) the CPU utilization is 6% and the CPU idles at 0.76GHz. Seems ok. Opening UI3 and viewing live cameras or the "all camera" thumbnail works fine. The trouble is, when I play a saved clip in UI3, the CPU usage (task manager) rises only to 9-10% and the CPU frequency only comes up to 0.86GHz, and the playback is 1-2fps as mentioned. Setting the High Performance power plan causes the CPU to permanently run at the full speed of 4.0GHz and playback is perfectly fine at 30fps.
So, that's the "fix" -- leave it in High Performance mode. Or that's a workaround at least. However, I dug further as I didn't like that. Some experiments:
I tried setting "EPP" to 0 and it didn't help. Commands, for reference:
powercfg -setacvalueindex scheme_current sub_processor PERFEPP 0
powercfg -setactive scheme_current
I wondered if the CPU or GPU frequency was the limiting factor. In Balanced mode the GPU runs at 350MHz and in High Performance it's pegged at 1150MHz. So I modified the Balanced power mode by setting Minimum processor frequency to 50/75% (I tried both). This modifies ONLY the CPU frequency and GPU stays at 350MHz. It resolves the 1fps issue, proving that the CPU frequency is the problem not GPU.
I'm still stumped though, why is the CPU usage so low in Task Manager if it is bottlenecking the video playback so badly? Why won't the CPU hardware and/or Windows kernel increase the CPU frequency on demand as needed? I feel like trying Blue Iris on Windows 10/11 on the same hardware to see if that fixes it. Windows Server 2016 is pretty old now and is showing its age. But that's a big annoying process just as an experiment, so I'm looking for other things to try first.