Do you enable "write caching" for SSD's?

chanchan

Limp Gawd
Joined
Sep 14, 2005
Messages
482
Hi,

I haven't been able to find any definite answers on whether or not write caching should be enabled for SSD drives under Windows 7. I'm running the SSD's in RAID 0 if that means anything.

Thanks,
Chan
 

SicKlown42012

2[H]4U
Joined
Jul 6, 2008
Messages
3,319
There have been people who have said that they perform better with it off, but I found out the opposite is true. The SSDs come with quite a bit of onboard RAM, so why not make use of it?
 

ryan_975

[H]F Junkie
Joined
Feb 6, 2006
Messages
14,378
There have been people who have said that they perform better with it off, but I found out the opposite is true. The SSDs come with quite a bit of onboard RAM, so why not make use of it?
All modern hard drives, have a substantial amount of onboard ram for caching. It has nothing to do with Windows write cache, which is set up in main memory and used as a buffer to avoid having to straight to the hard drive.
 

polonyc2

Fully [H]
Joined
Oct 25, 2004
Messages
17,349
I always leave write caching enabled...but what about the write-cache buffer flushing setting underneath the write caching option...do I put a check mark next to that or not?

 

ryan_975

[H]F Junkie
Joined
Feb 6, 2006
Messages
14,378
where do you disable write caching?...in the BIOS?
no, in device manager once you've booted to windows. But why would you want to disable unless you're trying to use something as a removeable drive.
 

SicKlown42012

2[H]4U
Joined
Jul 6, 2008
Messages
3,319
All modern hard drives, have a substantial amount of onboard ram for caching. It has nothing to do with Windows write cache, which is set up in main memory and used as a buffer to avoid having to straight to the hard drive.
Hmm, always learn something new. Microsoft's description isn't really clear on the subject. My opinion still stands, leave it on.

For the second write caching option, I tried it both on and off, and I didn't notice a difference in real usage or benchmarks. I went ahead and kept it on. This is Microsoft's description"
Cache flushing

By default, Windows employs cache flushing. This means that the system will periodically instruct the storage device to transfer all data waiting in the cache to the principal storage media. When you select Enable write caching on this device, you turn off these periodic commands to transfer the data. Not all devices support all of these features.
If high data transfer performance is your paramount concern, you should enable both settings: in the Removal Policy section, select the Better Performance option and in the Write-caching policy section, select Enable write caching on the device (if the system hardware and storage device support these features).
 

chanchan

Limp Gawd
Joined
Sep 14, 2005
Messages
482
Thanks for the replies, I guess I'll just use the default setup, which is Write Caching enabled, and the flushing thing disabled.
 

larrymoencurly

[H]ard|Gawd
Joined
Jul 18, 2002
Messages
1,634
Does Windows' write caching hold the data in the RAM cache until shutdown, or does it automatically write to disk after a certain amount of time, like the 1-2 seconds used for the floppy drives?

How long does an SSD keep the data in its own RAM cache before writing to flash? Is it longer than the 1/120 second limit that hard disks use for their RAM caches?
 

Synomenon

Supreme [H]ardness
Joined
Feb 10, 2007
Messages
7,649
I always leave write caching enabled...but what about the write-cache buffer flushing setting underneath the write caching option...do I put a check mark next to that or not?

Anyone have a recommendation regarding this question?
 

sub.mesa

2[H]4U
Joined
Feb 16, 2010
Messages
2,508
Disabling write flushing will mean you can lose the entire filesystem in case of a crash, power failure, cable problem or otherwise. It should not be used unless you really know what you're doing and the data being stored is not really important.

For example, write flushing can be disabled on a high-performance volume not storing important information; such as the system disk in some cases. This would make it more likely that a crash would have disastrous results, but if that is no issue (i.e. you can pull a backup easily) it can add to your performance experience.

Disabling the flush means that applications can keep writing to RAM when they write to disk; meaning 2-10GB/s performance instead of the performance of the drive itself.

The danger is not that part of the data becomes lost, the danger is that _metadata_ will get written out-of-order with data; which can destroy entire directories and large parts of the filesystem; even destroying files never touched/updated for months.

So this option really is dangerous and implies that you trust your RAM completely. Any RAM bit error would translate in on-disk corruption. If this is in meta-data you're screwed as well. ;-)
 

Cyant

Gawd
Joined
Apr 2, 2007
Messages
833
I turn both on because a use a UPS. I would not if you don't have a battery backup. I lost data that way often before I got myself a UPS.
 

sub.mesa

2[H]4U
Joined
Feb 16, 2010
Messages
2,508
A UPS does not protect you against OS crashes or problems with your PC power supply; those still put a filesystem without write flushing at risk.
 

Old Hippie

Supreme [H]ardness
Joined
Oct 31, 2005
Messages
6,013
Disabling write flushing will mean you can lose the entire filesystem in case of a crash, power failure, cable problem or otherwise.
Well now, I didn't realize there could be such dire consequences disabling that service.

As with Cyant, I thought my UPS would protect my data. :eek:

I'm pretty anal about back-ups so I'm gonna take my chances and keep it disabled.
 

sub.mesa

2[H]4U
Joined
Feb 16, 2010
Messages
2,508
Yes that would be a sensible precaution. :)

Note that you don't have to disable write caching completely, just do not disable the "buffer flushing" (bottom most checkbox).
 

Old Hippie

Supreme [H]ardness
Joined
Oct 31, 2005
Messages
6,013
Note that you don't have to disable write caching completely, just do not disable the "buffer flushing" (bottom most checkbox).
Now, what fun would that be? :D

In for a penny, in for a pound! :)
 

Blue Fox

[H]F Junkie
Joined
Jun 9, 2004
Messages
11,727
The bottom option is for when you have a controller card that has a separate battery.
 

OFaceSIG

2[H]4U
Joined
Aug 31, 2009
Messages
2,238
The bottom option is for when you have a controller card that has a separate battery.
It makes sense now. Server RAID controllers have cache batteries... My SB850 controller on my motherboard does not :(
 

XeoNoX

n00b
Joined
Dec 22, 2011
Messages
10
here is a quick breakdown without going into details

DRIVE CACHING

"write caching" is good to have enabled on single drives that are not in a RAID array.

"write caching" is good to have enabled on "battery-backed cached" RAID arrays

"write caching" is NOT GOOD to have enabled on RAID arrays that are NOT on a "battery-backed cached" controller .

BUFFER CACHING

drive write cache buffer flushing should always be enabled under all circumstances UNLESS u are on a "battery-backed cached" controller. If you are on a "battery-backed cached" controller it can be disabled or enabled but i would still recommend enable the flushing.
 

Mike_Hawk

Weaksauce
Joined
Jan 2, 2015
Messages
82
Sorry to dredge up an old post, but I noticed mine is disabled by default on my Win7 rig. Both systems, both options.
 

Nenu

[H]ardened
Joined
Apr 28, 2007
Messages
19,175
Seeing as this has been dredged up, thought I'd add something.
Why shouldn't you enable it?
If you are overclocking anything that can cause an OS lockup, its sensible to disable write caching until you are sure you have it stable.
Failing to do so can cause corruption when the machine crashes.
It happened a lot with hard drives, not so much now with SSDs but I have seen it.
 
Top