write cache on hard drive

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read how to get help
Post Reply
brothergc
Level 1
Level 1
Posts: 16
Joined: Wed Apr 08, 2009 9:32 am

write cache on hard drive

Post by brothergc »

I have a question about write cache on a SSD , should it be off or on ? I stumbled across this option playing around with in Linux mint and found it to be disabled by default . My drive is a samsung 860 evo m.2 drive
I did some googling and see that in windows it should be on , but being a new linux user not sure if this applys to Linux
Thanks ! :D

fungus
Level 4
Level 4
Posts: 385
Joined: Mon Sep 07, 2015 6:09 am

Re: write cache on hard drive

Post by fungus »

The functionality of the write cache is to store disk writes in memory from where they are flushed to disk, and this feature may increase the performance of slow disk drives by quite a lot in certain work loads. The down side is that the data written to memory may be lost if the system looses power or (seriously) freezes up. IMHO the write cache does not make sense on fast drives like SSD's, personally I have disabled write cache on all my drives due to the (albeit minimal) risk of data loss.
Linux Mint 17.3 64bit KDE @ Asus B150M-A, i3 6100, Crucial 16GB DDR4, Crucial BX100
One bit says: YES, the other answers: NO.. Guess who's he and who's she..! ;)

brothergc
Level 1
Level 1
Posts: 16
Joined: Wed Apr 08, 2009 9:32 am

Re: write cache on hard drive

Post by brothergc »

Thank You for the reply .
From the above answer / post then it looks like their is no difference on write cache between the two operating systems ( windows vs Linux ) so with that in mind I will enable this seeing that I am on a desktop environment the risk is slim to none . I have had this option enabled in windows for years with no issues .
I find it noteworthy to anyone reading this IMO it is worth it . I have noticed improved performance even on a newer SSD drive as the 860 evo .
If someone wants to set this it is very easy , go to Your menu and search for " Disk " and open it . In the upper right hand corner their is 3 slash marks , click on that and select " drive settings " Their You will find the option.
:mrgreen:

gm10
Level 20
Level 20
Posts: 11000
Joined: Thu Jun 21, 2018 5:11 pm

Re: write cache on hard drive

Post by gm10 »

I enable write caching on everything. RAM is still faster than the SSD, so no reason not to use it.

I'm always surprised it's not enabled by default. That power loss scenario is real but pretty random. The risk of power loss induced data loss is mostly with unsaved data at the time the power goes out, not data being written at just that same instant.

brothergc
Level 1
Level 1
Posts: 16
Joined: Wed Apr 08, 2009 9:32 am

Re: write cache on hard drive

Post by brothergc »

gm10 wrote:
Wed Oct 24, 2018 11:11 am
I enable write caching on everything. RAM is still faster than the SSD, so no reason not to use it.

I'm always surprised it's not enabled by default. That power loss scenario is real but pretty random. The risk of power loss induced data loss is mostly with unsaved data at the time the power goes out, not data being written at just that same instant.
I agree ! :) I thought it strange that is is not enabled by default either , thus the post . Figured maybe their is a difference between windows and Linux but no I know that their is none , full steam ahead !
:mrgreen:
And Your right , it does help seeing that ram is way faster then any SSD

User avatar
trytip
Level 12
Level 12
Posts: 4272
Joined: Tue Jul 05, 2016 1:20 pm

Re: write cache on hard drive

Post by trytip »

write cache is enabled by default check to see:

Code: Select all

sudo hdparm -i /dev/sd[a-e] | grep WriteCache
you can turn it OFF with:

Code: Select all

sudo hdparm -W0 /dev/sda
turn it ON with:

Code: Select all

sudo hdparm -W /dev/sda
Image

brothergc
Level 1
Level 1
Posts: 16
Joined: Wed Apr 08, 2009 9:32 am

Re: write cache on hard drive

Post by brothergc »

trytip wrote:
Wed Oct 24, 2018 12:15 pm
write cache is enabled by default check to see:

Code: Select all

sudo hdparm -i /dev/sd[a-e] | grep WriteCache
you can turn it OFF with:

Code: Select all

sudo hdparm -W0 /dev/sda
turn it ON with:

Code: Select all

sudo hdparm -W /dev/sda
interesting , now a slightly different spin , what would be the command to disable power saving on a SSD ?

geekkyyy
Level 1
Level 1
Posts: 1
Joined: Thu May 09, 2019 9:57 pm
Location: phoenix, az

Re: write cache on hard drive

Post by geekkyyy »

brothergc

hi...are u the same guy that was at amdmb.com...i think u are....welcome to mint...i dont think u are on amdmb.com much anymore

Post Reply

Return to “Hardware Support”