"Enable write caching on the device" causing SSD thrashing?

THizzle7XU

Junior Member
Mar 30, 2011
17
0
61
Hi everyone,

I've posted this in the Crucial forums, but I didn't get much help and I wanted to make a last ditch effort to figure out this issue before opening a ticket with Crucial for a possible RMA. These are some snippets from my post over there to prevent additional typing. The important takeaway is that I'm seeing this thrashing behavior in two different systems with the same SSD model. I really haven't found any other posts related to these write cache settings and a thrashing effect, so any insight is appreciated.

I own two 512 GB M4 SSDs: one for a laptop and one for a desktop. Each of them are having a thrashing problem, typically when large files are deleted or copied/moved. Basically during this time programs will stop responding, sometimes the Windows UI, mainly because the system is being held up by this drive activity. It first started on the desktop one, probably due to move activity of moving files and generally more data being on my desktop. And now the laptop is having the same effect. And at times it crops up randomly. Possibly as I browse the web and the cache is getting written to. I have a hard drive monitor running at all times and have captured the effect:

original


The pink line is the drive activity. As you can see, it alternates between 0 and 100 percent for a given time period. It would seem this is due to lack of trim or no garbage collection over time. The same pattern appears on both drives and I can force this pattern whenever TRIM runs using the Windows 8.1 optimize/defrag dialog.

Each drive started as a clean Windows 7 64-bit install and has been upgraded to Windows 8 and now 8.1. They are connected with SATA 3 6.0 Gbps interfaces. The effect was present on Windows 7 as well. I've tried different drivers (MS and Intel RST). I tried backing up the image on my desktop and secure erasing the drive, and copying back the image. That did nothing. I also tried the garbage collection route where I left each machine on for hours at the BIOS screen so the drives were idle with power and had time to perform garbage collection. HD Tune Pro reports everything as OK. The wear level on the laptop drive is 99 and 96 on the desktop. I also have the latest firmware on each 070H.

Trim is working correctly. I used that tool and checked the disabledelete flag in Windows. I did have compression enabled on both systems, and I recently turned off compression and reverted both drives to uncompress all the files present. The issue seems to happen a little less but that may be wishful thinking. Both systems use AHCI. It's not a SATA cable since the laptop doesn't have a cable involved and both systems are each having the same exact issue.

I've recently discovered that I can make the behavior go away if I go into the System Properties and open the Device Manager, open the properties of the drive, go to the Policies tab, and either uncheck the "Enable write caching on the device" OR check the "Turn off Windows write-cache buffer flushing on the device". If only "Enable write caching on the device" is checked, which is the Windows default setting, then the behavior will occur. But, even if the behavior is currently taking place, I can check "Turn off Windows write-cache buffer flushing" and immediately get rid of the behavior. Of course, either option is less than ideal as unchecking both significantly reduces write performance, and leaving both checked can risk data loss when a back up power supply is not available, really only a problem on my desktop, but still odd that I must change default Windows settings. So changing this setting and affecting the behavior of the drive could possibly raise a giant red flag as to the cause of the problem I would hope? Thanks.
 
Last edited:

Elixer

Lifer
May 7, 2002
10,371
762
126
Curious, in event viewer, you get any errors/warnings when this happens ?
 

THizzle7XU

Junior Member
Mar 30, 2011
17
0
61
Curious, in event viewer, you get any errors/warnings when this happens ?

Good call. Only one warning of significance, and it's not consistent:

wuaueng.dll (1104) SUS20ClientDataStore: A request to write to the file "C:\WINDOWS\SoftwareDistribution\DataStore\Logs\edb.log" at offset 1200128 (0x0000000000125000) for 4096 (0x00001000) bytes succeeded, but took an abnormally long time (16 seconds) to be serviced by the OS. This problem is likely due to faulty hardware. Please contact your hardware vendor for further assistance diagnosing the problem.

I can only guess Windows tried to write to this log when the behavior was taking place. The behavior also occurs when waking the PC from sleep for a period of time after the PC wakes (60 seconds or so). Both laptop and desktop exhibit this pattern.
 

ziddey

Member
Jun 15, 2002
37
0
66
Sorry for the super-necro, but did you ever find out anything further? I also have a 512gb m4, and it was essentially unusable until I found your solution (thank you!).

c6265138be.png


At its worst, the system is completely unusable, with the cursor not even responsive. During better times, loading a simple web page causes disk active time to spike to 100% for 5-10 seconds before anything happens.

After thrashing at 100% for 30+ minutes straight, I was finally able to navigate to the policies tab (that itself took a few minutes to accomplish). Disabled flushing and things settled down nearly immediately.

e08f4fcdd2.png


Can't say I have the utmost of stability, so in the long term, write caching will probably get axed.

Anyway, thanks again.
 
Last edited: