Solved Should You Run System File Checker (SFC) Periodically?


I would trim manually weekly if Windows doesn't do it automatically. As for defragging the SSD Windows will partially defrag it if needed.

"
2 – Does Windows 10 / 11 Defrag SSD’s Automatically?
Mostly no. Windows 10 and Windows 11 still have a defragment utility built in but it is now smart enough to flag SSD’s and disable defrag.

However, once a month Windows automatically considers partially defragmenting an SSD if there is exceptional fragmentation that is approaching the ‘maximum fragmentation threshold’. After that threshold is reached the “meta data” for the file fragments exceeds what the SSD can handle causing the SSD to stop reading and writing. This is a bad thing so Microsoft will carefully defrag the rare potentially problematic files."

From:


Thank you for your detailed explanation. Scheduled optimization, then, almost always retrims and, on rare occasion, partially defragments, if I understood your message properly. When I manually run Optimization, my machine literally says "Retrimming."
 

My Computer

System One

  • OS
    Microsoft Windows 11 Professional High End
    Computer type
    PC/Desktop
    Manufacturer/Model
    Boxx Technologies
    CPU
    13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
Running scannow frequently enlarges the CBS text log file so that it can be large when troubleshooting.

Other than that it is useful to run scannow, restorehealth, and chkdsk regularly as they check the status of each:
operating system
component store
drive file system

Thank you for responding. I plan on following @Ghot's advice he provided earlier in this thread. Please see here – link. So all three of us are in agreement that running SFC regularly.
 

My Computer

System One

  • OS
    Microsoft Windows 11 Professional High End
    Computer type
    PC/Desktop
    Manufacturer/Model
    Boxx Technologies
    CPU
    13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
I did not say that Windows would retrim if scheduled optimization is disabled. The default is enabled.

On my brand-new computer, I had to engage Scheduled optimization. It was off when I booted up for the first time and then computer initialized all its drivers and so on. Recall our discussion about the 31 days. Again, maybe my computer is anomaly—it's definitely possible.

That said, if I deliberately set a Schedule optimization period or it has been preset before the user signs on for the first time, then I would expect Windows to complete the optimization process as scheduled.

Regardless, we seem to agree that running optimization periodically is a good thing. And, in the end, that's all that matters.

Thank you for your comment, @BruceR.
 

My Computer

System One

  • OS
    Microsoft Windows 11 Professional High End
    Computer type
    PC/Desktop
    Manufacturer/Model
    Boxx Technologies
    CPU
    13th Gen Intel(R) Core(TM) i9-13900K 3.00 GHz
For clarification, a TRIM operation should happen anytime a block is erased. For example, if you delete a file, any blocks that file occupied should get TRIMed right then and there (or more accurately as soon as the system is not busy). So, in a perfect world, performing a TRIM at a scheduled interval should not ever be needed.

However, in the real world, things happen to prevent a TRIM from completing. Maybe you deleted a large amount of data, and the system is shut down before all TRIM operations finish, or an unexpected shutdown occurs.

So, when the optimization takes place, all it is really doing is sending "hints" to the SSD telling the SSD "these are all the blocks that I, as the OS, know about that should be free". The SSD then compares these hints to its own information. Anything that has not been TRIMed, but should have been TRIMed, will then be TRIMed.

Remember, it is only the OS that can say for sure what blocks are not considered to be in use. The SSD relies upon the OS to get that info because it doesn't understand or translate the underlying data stored on it. For all it knows, you might be running Bob's excellent super file system. As a result, it has to depend upon the OS for that info.
 

My Computers

System One System Two

  • OS
    Win11 Pro 23H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Built
    CPU
    Intel i7-11700K
    Motherboard
    ASUS Prime Z590-A
    Memory
    128GB Crucial Ballistix 3200MHz DRAM
    Graphics Card(s)
    No GPU - CPU graphics only (for now)
    Sound Card
    Realtek (on motherboard)
    Monitor(s) Displays
    HP Envy 32
    Screen Resolution
    2560 x 1440
    Hard Drives
    1 x 1TB NVMe Gen 4 x 4 SSD
    1 x 2TB NVMe Gen 3 x 4 SSD
    2 x 512GB 2.5" SSDs
    2 x 8TB HD
    PSU
    Corsair HX850i
    Case
    Corsair iCue 5000X RGB
    Cooling
    Noctua NH-D15 chromax.black cooler + 10 case fans
    Keyboard
    CODE backlit mechanical keyboard
    Mouse
    Logitech MX Master 3
    Internet Speed
    1Gb Up / 1 Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    Additional options installed:
    WiFi 6E PCIe adapter
    ASUS ThunderboltEX 4 PCIe adapter
  • Operating System
    Win11 Pro 23H2
    Computer type
    Laptop
    Manufacturer/Model
    Lenovo ThinkBook 13x Gen 2
    CPU
    Intel i7-1255U
    Memory
    16 GB
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek® ALC3306-CG codec
    Monitor(s) Displays
    13.3-inch IPS Display
    Screen Resolution
    WQXGA (2560 x 1600)
    Hard Drives
    2 TB 4 x 4 NVMe SSD
    PSU
    USB-C / Thunderbolt 4 Power / Charging
    Mouse
    Buttonless Glass Precision Touchpad
    Keyboard
    Backlit, spill resistant keyboard
    Internet Speed
    1Gb Up / 1Gb Down
    Browser
    Edge
    Antivirus
    Windows Defender
    Other Info
    WiFi 6e / Bluetooth 5.1 / Facial Recognition / Fingerprint Sensor / ToF (Time of Flight) Human Presence Sensor
Thank you for responding. I plan on following @Ghot's advice he provided earlier in this thread. Please see here – link. So all three of us are in agreement that running SFC regularly.


In the Ten Forum's BSOD forum room we had created batch scripts for troubleshooting.

Matthew Wai wrote the scripts.


These scripts typically run in the background.


The tuneup plus script runs scannow followed by restorehealth followed by scannow.

This method allows the viewer to see if there was or was not a scannow problem.


If restorehealth is run before scannow the viewer does not know if there was/were scannow problem(s).


At the end of each script run it offers a text result which also displays the duration.


This is the latest version of Tuneup plus:

 

My Computer

System One

  • OS
    Windows 10
    Computer type
    Laptop
    Manufacturer/Model
    HP
    CPU
    Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
    Motherboard
    Product : 190A Version : KBC Version 94.56
    Memory
    16 GB Total: Manufacturer : Samsung MemoryType : DDR3 FormFactor : SODIMM Capacity : 8GB Speed : 1600
    Graphics Card(s)
    NVIDIA Quadro K3100M; Intel(R) HD Graphics 4600
    Sound Card
    IDT High Definition Audio CODEC; PNP Device ID HDAUDIO\FUNC_01&VEN_111D&DEV_76E0
    Hard Drives
    Model Hitachi HTS727575A9E364
    Antivirus
    Microsoft Defender
    Other Info
    Mobile Workstation
However, in the real world, things happen to prevent a TRIM from completing. Maybe you deleted a large amount of data, and the system is shut down before all TRIM operations finish, or an unexpected shutdown occurs.
Could also be that the controller on the SSD is simply too busy during this specific period of time, i.e. trying to give you the best performance that it can offer with read/write operations so the TRIM commands get discarded from the queue, they never get processed until the OS later decides to invoke the TRIM commands once more. The controller then marks the blocks invalid that haven't already been marked invalid from previous (TRIM) commands:
The SSD then compares these hints to its own information. Anything that has not been TRIMed, but should have been TRIMed, will then be TRIMed.
As long as it doesn't get interrupted yet again, then yes, but even if it does get interrupted again (for whatever the reason might be), it just has to wait until the next round, and eventually (or hopefully) it should happen.
Remember, it is only the OS that can say for sure what blocks are not considered to be in use. The SSD relies upon the OS to get that info because it doesn't understand or translate the underlying data stored on it. For all it knows, you might be running Bob's excellent super file system. As a result, it has to depend upon the OS for that info.
When looking at it from a different kind of perspective, it's actually quite the opposite, as the OS has no detailed awareness of what the controller on the SSD might be doing behind the scenes. The firmware and the controller chip are responsible for things like Garbage Collection (GC), Over Provisioning (OP) and the effects that OP has on the wear leveling strategy that the SSD also uses. Granted, the SSD still has to rely on TRIM for GC to be able to "know" permissions of which blocks it is allowed to erase. But then, the OS has to rely on the SSD doing what it's supposed to do to keep up with performance, and to avoid causing additional wear and tear on the SSD, as much as possible, whenever it is feasible to avoid. As SSD technology keeps evolving, we now have SSDs that are capable to gather additional info behind the scenes about data use and data access patterns. By analyzing the data, clever firmware is looking ahead of the OS and trying to predict OS actions, also including TRIM actions. Before it can erase, it still has to wait for TRIM to actually occur, but it never can hurt to look ahead and optimize based on these findings─the info about likelihood.

Another example of how modern SSDs can look at the data content of the files stored is the internal data compression mechanism that these SSDs also use. How these mechanisms are optimized in the firmware of the SSD in question may part depend on some awareness level of popular filesystems, of how popular filesystems are organized/designed/used in popular OS. There is no real easy way to tell whether an SSD might be inspecting the headers of individual files to predict entropy. High entropy of the data causes data compression to not yield a high data compression factor. By taking into account the likelihood of low entropy versus high, it can be possible for the controller to prioritize its data compression workload accordingly, as part of an optimized/balanced scheduling strategy the goal of which would be to manage the internal data processing more efficiently. Samsung has already introduced its 2nd gen of SmartSSD with advanced internal processing capabilities that no longer are limited to these common/old generic/heuristic types of approach. It's the way of the future, but yeah, it will be up to the OS and specialized software/apps to make use of new functions (such as erasure coding) that are made possible with the Xilinx Versal XCVC1902 that this new piece of SSD hardware uses.
 

My Computers

System One System Two

  • OS
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Asus TUF Gaming (2024)
    CPU
    i7 13650HX
    Memory
    16GB DDR5
    Graphics Card(s)
    GeForce RTX 4060 Mobile
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    512GB SSD internal
    37TB external
    PSU
    Li-ion
    Cooling
    2× Arc Flow Fans, 4× exhaust vents, 5× heatpipes
    Keyboard
    Logitech K800
    Mouse
    Logitech G402
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF
  • Operating System
    11 Home
    Computer type
    Laptop
    Manufacturer/Model
    Medion S15450
    CPU
    i5 1135G7
    Memory
    16GB DDR4
    Graphics card(s)
    Intel Iris Xe
    Sound Card
    Eastern Electric MiniMax DAC Supreme; Emotiva UMC-200; Astell & Kern AK240
    Monitor(s) Displays
    Sony Bravia XR-55X90J
    Screen Resolution
    3840×2160
    Hard Drives
    2TB SSD internal
    37TB external
    PSU
    Li-ion
    Mouse
    Logitech G402
    Keyboard
    Logitech K800
    Internet Speed
    20Mbit/s up, 250Mbit/s down
    Browser
    FF

Latest Support Threads

Back
Top Bottom