What does Windows 10 write to my drive before going to sleep?
I noticed that my Windows 10 laptop takes around 6 seconds to go to sleep, and during these six seconds the SSD's activity LED is on. I imagine that Windows is writing something on the SSD before going to sleep.
I remember my Linux systems going to sleep instantly when I pressed the sleep button, which makes me wonder if I can do the same on Windows.
Given that Hybrid Sleep is disabled, what does Windows do with my drive before sleeping, and is it necessary ?
I imagine that Windows is writing something on the SSD before going to sleep.
That is correct. If there is any data waiting in the disk's write cache, it must be written to the disk before the disk is powered off.
Note that disk caching can be disabled so that everything is written to the disk immediately. This ensures that data is not lost as a result of a power failure, but it does reduce performance.
Turn Disk Write Caching On or Off:
- Right-click My Computer, and then click Properties.
- Click the Hardware tab, and then click Device Manager.
- Expand Disk Drives.
- Right-click the drive on which you want to turn disk write caching on or off, and then click Properties.
- Click the Policies tab.
- Click to select or clear the Enable write caching on the disk check box as appropriate.
- Click OK.
Source HOW TO: Manually Turn Disk Write Caching On or Off
To see what Windows is doing during sleep, install the Windows Performance Toolkit which is part of the Windows 10 SDK.
Now capture the activity during sleep, by running WPRUI.exe, select First Level, DiskIO, FileIO and under Performance Scenario select Standby/Resume. Number of iteration can be set to 1 and click to start. This suspends/resumes Windows and captures all activity.
After the resume, double click on the generated ETL file to open it with the Windows Performace Analyzer, load the debug symbols, click on "Profile"-> Apply
, browse catalog
and select the file standby.wpaprofile
.
Drag & Drop the File I/O
graph from Graph Explorer
-> Storage to the analysis pane.
Select the part from the start before you see "Tracing off", do a rightclick, select zoom
.
Now put the Column File Path
to the first position and here you can see which files/folders are accessed before Windows sleeps.