5

In last week after doing more research on subject matter, I have been wondering about what I have been neglecting all those years to understand write-caching policy, always leaving it on default setting. Write-caching policy improves writing performance and consists of write-back caching and write-cache buffer flushing.

This is how I understand all the above, but correct me if I erred somewhere:

Write-through cache / Write-through caching itself is not a part of write caching policy per se and it's when data is written to both cache and storage device so if Windows will need that data later again, it is retrieved from cache and not from storage device which means only improved read performance as there is no need for waiting for storage device to read required data again. Since data is still written to storage device, write performance isn't improved and represents no risk of data loss or corruption in case of power failure or system crash while only data in cache gets lost. This option seems to be enabled by default and is recommended for removable devices with no need to use function of "Safely Remove Hardware" on user's part.

Write-back caching is similar to above but without writing data to storage device, periodically releasing data from cache and writing to storage device when it is idle. In my opinion this option improves both read and write performance but represents risk if power failure or system crash occurs with the outcome of not only losing data eventually to be written to storage device, but causing file inconsistencies or corrupted file system. Write-back caching cannot be enabled together with write-through caching and it is not recommended to be enabled if no backup power supply is availabe.

Write-cache buffer flushing I reckon is similar to write-back caching but enables immediate release and writing of data from cache to storage device right before power outage occurs but I don't know if it applies also to occasional system crash. This option seem to be complementary to write-back cache reducing or potentially eliminating risk of data loss or corruption of file system.

I have questions about relevance of last 2 options to today's modern SSDs in order to get best performance and with less wear on SSDs:

I know that traditional hard drives come with onboard cache (I wonder what type of cache that is), but do SSDs also come with cache? Assuming they do, is this cache faster than their NAND flash and system RAM and worth taking the risk of utilizing it by enabling write-back cache? I read somewhere that generally storage device's cache is faster than RAM, but I want to be sure. Additionally I read that write-caching should be enabled since current data that is to be written later to NAND flash is kept for a while in cache and provided there is data that gets modified a lot before finally being written, holding of this data and its periodic release reduces its write times to SSD thereby reducing its wearing.

Now regarding to write-cache buffer flushing, I heard that SSD controllers are so fast by themselves that enabling this option is not required, because they manage flushing. However, once again, I don't know if SSDs have their own onboard cache and whether or not it is faster than their NAND flash and system RAM because if it is, keeping this option enabled would make sense.

Recently I have posted question about issue with my Intel 330 SSD 120GB which was main reason to do deeper research having suspicion of write-caching policy being the culprit of SSD's freezing issue assuming data being released is what causes freezes. Currently I have write-cache enabled and write-cache buffer flushing disabled because I believe SSD controller's management of write-cache flushing and Windows write-cache buffer flushing are conflicting with each other:

enter image description here

Since I want to troubleshoot in small steps to finally determine the source of issue, I have decided to start with write-caching policy and the move to drivers, switching to AHCI later on and finally disabling DIPM (device initiated power management) through registry modification thanks to @TomWijsman

1 Answer 1

0

This was such a great question 10 years ago, and is all the more relevant today so I am not sure why I cannot see any replies.

  • I am new to https://superuser.com so please advise me on any links on how to get threaded into sujects / topics like this. My 5 eggs worth is just good old common sence in that ;
  1. GO FOR IT ! on the Enable the Write-Cache option - JUST DO IT ! For little to NO risk to stored date one can risk lossing cache data for any reason by Enabling (check the box) the Write-Cache option with the huge bonus of extending the life of HDD u SSD, plus, oh yeah, a very very tidy performance gain.
  2. HOLD YOUR HORSES ! on the DIS-Enable the Write-Cache Buffer Flush option - WHOOA ms does such a lousy job of defineing what is " a seperate PS " that it is impossible to determine if the likelyhood/ risk of data loss is even significant.
  3. Can one assume that if the PC is a laptop (integral defacto built in UPS) graceful shutdown process or PC with actual UPS, that the debate goes away in that ms warnings are useless with exception as a defacto CYA clause ??
  4. I do want to congratulate ms on the cryptic ambiguity of this set of warnings / instructions as I have never seen such little real disclosure (without examples !) about an issue so important.
  5. An explanation of the significance or a "power outage" vs "seperate PS" with a couple of simple examples would be super helpful...
  6. Differentiation between BSOD or other nasty crash versus just the cryptic "power failure" would be highly enlightning.
  7. Who / Where or When might it be safe or advantagous to actually implement " Write-cache buffer flushing " so the rest of us PC (non Server types) can finally move on. Included PC versus Laptop nuance and Internal versus External hdd / ssd storage devices... Thanks in advance for any enlightment that gets to the actual nitty-gritty rather than the same-ol-same-ol.
2
  • PS is uninterruptible power source like UPS or lithium-ion battery in laptop's case.
    – Boris_yo
    Apr 22, 2023 at 16:32
  • My guess is in case of BSOD or other nasty crash the OS can still flush the buffer safely without data loss in case there is power outage with external power source as a backup.
    – Boris_yo
    Apr 22, 2023 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .