Nvme Write Cache Disabling?

Hello,
also sorry maybe i didnt file into proper place because didnt able to find any.
i recently migrated from windows
as the title suggests i need to disable write caching with sandisk nvme drive
also i have 24 gb ram
and if you could explain like a how i can do relatively easy i’m still getting my bearings on manjaro linux
thank you for all your help.

May I ask why?

There was a topic not too long ago here about doing this for USB thumb drives.
search and find it

asking Google about:

linux disable write cache

got me many results - two of them are:

[How To] Disable write-cache for USB storage - Community contributions - EndeavourOS

How to Disable or Enable Disk Write Caching in Linux - F1-CONSULT

There is alreday an [How To] Tutorial for USB storage devices:

But before you proceed - as asked by @Nachlese - explain, why you believe you need it.

Firstly, Sorry For the late Reply
i’m still gathering my bearings well learning around manjaro linux is a bit of adventure
secondly i’m going to disable writing cache for ssds for speeding up purposes to extend a lifespan a bit secondly i’m going to change write cache to hdd i have i already formatted it
also it kind of a habit when i was formatted my windows installation on occasion you know nand flash technology and nand drives thereof
also i been learning linux by screwing around re-installing and tinkering a lot
basicly screw around and find out
this is turned out to be lovely adventure

I do not know how to achieve what you want, but i will write 3 relevant offtopics:

  1. Please use normal sentences, it will be easier for us to understand and help you, not to mention some of the regulars will be so pissed off by that writing style they will not bother to answer…or you will directly get axed by a mod.
  2. Placing the cache of a nvme on a hdd is really exotic and counterproductive idea.
  3. Why don’t you just check the health of the nvme first?
sudo smartctl --all /dev/nvme0

Paste the output within a code tag - the button </>

Thanks,
i will try to be more clearer next time or at least write more clearly least autistic

It somehow makes no sense. A NVME does not have a built-in write cache like a HDD and switching off the global write cache in RAM would mean switching from async to sync, so in Windows terminology: switch off “Better performance” and switch on “Quick Removal”. Why? Why should a write cache decrease lifespan? Actually, the opposite is true.

3 Likes

Exactly my thought. Quack, just post the output from the command above an we will tell you if you have to worry at all about that drive.