[Solved] Blue Iris PC high disk activity when idle

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,149
Reaction score
1,253
Location
SF Bay Area
TLDR: Make sure this task is not enabled in Task Scheduler - it may ignore your disk optimization settings:
Task Scheduler > Task Scheduler Library > Microsoft > Windows > Defrag > "ScheduledDefrag" task
~~~~~
I've had this problem for awhile now and it has been driving me crazy.
I believe I just solved it today and at the end of this post I share the solution.
I've searched the forum and so far have failed to find any posts that mention this solution, so perhaps it will be news to you as well.

But first I'll describe my system...
1. My Blue Iris PC is a headless I7-4770, 16BG, 8TB Purple, with an HDMI dummy plug.
2. I direct connected to a monitor off and on while assessing this issue - it did not make a difference.

And my my observations...
1. Shortly after I stopped interacting with my Blue Iris PC for a time - whether using it directly, or via Remote Desktop - I could hear the disk activity change.
2. I'd return to using the PC and the disk activity would immediately cease. Here's what I'd see in the Task Manager.... (Drive D is my Purple disk).
1629747809330.png
3. The sound was much like you hear when using a disk defragmentation utility.
So I made sure the disk defragmenter was turned off (This PC > right-click hard drive > Properties > Tools > Optimize) .
Result? no joy!
1629748085266.png
4. I disabled every power savings measure in my Power Plan settings.
Result? no joy!
2021-08-09 15_52_24-Power Options - Advanced #1.png 2021-08-09 15_52_24-Power Options - Advanced #2.png 2021-08-09 15_52_24-Power Options - Advanced #3.png 2021-08-09 15_52_24-Power Options - Advanced #4.png 2021-08-09 15_52_24-Power Options - Advanced #5.png
5. If I rebooted the PC and never interacted with it, the disk activity was always normal.
The problem seemed to occur only while I was logged on.
So for weeks now I've been rebooting the PC after I was done working on it.

Apparent solution...
While doing more googling I found mention of a Window's created Task Scheduler task that I was unaware of <link>.
Task Scheduler > Task Scheduler Library > Microsoft > Windows > Defrag > "ScheduledDefrag" task.

When this task is enabled & executes, it apparently can ignore the disk optimization settings
(i.e., This PC > right-click hard drive > Properties > Tools > Optimize).

Disabling the Windows Scheduled Task "ScheduledDefrag" has cured my problem.

Here are the details for the ScheduledDefrag task...
Note in the final image (History tab) that it was still executing this morning before I disabled it.
2021-08-23 TS-SchedDefrag-1.General.png 2021-08-23 TS-SchedDefrag-2.Triggers.png 2021-08-23 TS-SchedDefrag-3.Actions.png 2021-08-23 TS-SchedDefrag-4.Conditions.png 2021-08-23 TS-SchedDefrag-5.Settings.png 2021-08-23 TS-SchedDefrag-6.History.png
 
Last edited:

SouthernYankee

IPCT Contributor
Joined
Feb 15, 2018
Messages
5,170
Reaction score
5,320
Location
Houston Tx
====================================
My Standard allocation post.

1) Do not use time (limit clip age)to determine when BI video files are moved or deleted, only use space. Using time wastes disk space.
2) If New and stored are on the same disk drive do not used stored, set the stored size to zero, set the new folder to delete, not move. All it does is waste CPU time and increase the number of disk writes. You can leave the stored folder on the drive just do not use it.
3) Never allocate over 90% of the total disk drive to BI.
4) if using continuous recording on the BI camera settings, record tab, set the combine and cut video to 1 hour or 3 GB. Really big files are difficult to transfer.
5) it is recommend to NOT store video on an SSD (the C: drive).
6) Do not run the disk defragmenter on the video storage disk drives.
7) Do not run virus scanners on BI folders
8) an alternate way to allocate space on multiple drives is to assign different cameras to different drives, so there is no file movement between new and stored.
9) Never use an External USB drive for the NEW folder. Never use a network drive for the NEW folder.
10) for performance do not put more than about 10,000 files in a folder, the search and adding files will eat CPU and disk performance. Look at using a sub folder per camera (see &CAM in bi help)


Advanced storage:
If you are using a complete disk for large video file storage (BVR) continuous recording, I recommend formatting the disk, with a windows cluster size of 1024K (1 Megabyte). This is a increase from the 4K default. This will reduce the physical number of disk write, decrease the disk fragmentation, speed up access.
Hint:
On the Blue iris status (lighting bolt graph) clip storage tab, if there is any red on the bars you have a allocation problem. If there is no Green, you have no free space, this is bad.
======================================
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,149
Reaction score
1,253
Location
SF Bay Area
Just to be clear... the OP is about the fact that on my Blue Iris server Windows was performing disk defragmentation on my video storage disk drive DESPITE the fact that I had disabled it using the standard method, i.e., This PC > right-click hard drive > Properties > Tools > Optimize.

Perhaps additional guidance should be added to the Disk Defragmenter section of 'Optimizing Blue Iris's CPU Usage' Wiki...
Check Task Scheduler > Task Scheduler Library > Microsoft > Windows > Defrag, and disable the "ScheduledDefrag" task if it exists and has active history.
 
Last edited:

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,149
Reaction score
1,253
Location
SF Bay Area
I thought I'd give a quick update since solving this really annoying problem.

I disabled the Task Scheduler's shadow ScheduledDefrag" task on August 23 ~8:30 am.
The following chart shows my system's CPU usage, spanning before and after this event. I record my CPU usage every 10 minutes
1630435243038.png

Observations:
  1. The number of 'high' CPU usage events has been mostly eliminated.

  2. The magnitude of the 'high' CPU usage events has been sharply reduced.

Aside:
I migrated to DeepStack GPU on 8/18 (details <here>). I expected to see a CPU usage benefit from this (I know I was only going to catch a minor of DeepStack events because I am only logging CPU usage only every 10 minutes), Unfortunately, what ever impact I was hoping to see is obscured and overwhelmed by the 'drag' caused by the shadow 'defrag' task activity.
 
Last edited:

Corvus85

Getting the hang of it
Joined
Aug 18, 2021
Messages
498
Reaction score
79
Location
Australia
I've deleted the task from task scheduler, and I'm still seeing 100% disk utilization on my BI video drive.
Did you need to restart for the changes to take effect?
This is driving me crazy. I've done literally everything else that everyone mentioned above.
 

jaydeel

BIT Beta Team
Joined
Nov 9, 2016
Messages
1,149
Reaction score
1,253
Location
SF Bay Area
I would try rebooting the server.

Tip: instead of deleting Task Scheduler tasks, you can right-click disable them. Or before deleting, export them for later importing in case you want to undo the action.
 
Last edited:

Flintstone61

Known around here
Joined
Feb 4, 2020
Messages
6,664
Reaction score
11,035
Location
Minnesota USA
I can't say that it's related, but one night I installed BLue iris Tools, later that night instead of the normal noises, the disk got super active.
when I wiggled the mouse it stopped. then after a couple minutes idle, it started again. So i uninstalled BI Tools. and that stopped it.
I was just trying it out. Not sure what that was about.
 
Top