You are not logged in.

#1 2018-04-22 19:23:10

SealsRock12
Member
Registered: 2018-04-03
Posts: 83

[SOLVED] Turn Off Write Caching

How can I turn off write caching? Is it possible?

Last edited by SealsRock12 (2018-04-24 14:37:54)


-- SealsRock12

Offline

#2 2018-04-22 19:28:49

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] Turn Off Write Caching

At what level do you want to disable write caching?  The device level,  the ioscheduler level,  the filesystem level,  the application level?

Offline

#3 2018-04-23 23:51:14

SealsRock12
Member
Registered: 2018-04-03
Posts: 83

Re: [SOLVED] Turn Off Write Caching

Is it dangerous to turn off write caching?


-- SealsRock12

Offline

#4 2018-04-24 00:17:53

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] Turn Off Write Caching

You did not answer my first question.  What are  you trying to achieve by disabling write caching?  It may be increase the risk of data corruption in the event of a hardlockup / powerloss
depending on the whole configuration of the system and what other methods are in use to preserve write ordering and general data consistency.

Offline

#5 2018-04-24 00:34:08

SealsRock12
Member
Registered: 2018-04-03
Posts: 83

Re: [SOLVED] Turn Off Write Caching

I heard that turning off write caching will write data directly to the drive. That is why I want it.


-- SealsRock12

Offline

#6 2018-04-24 00:48:11

loqs
Member
Registered: 2014-03-06
Posts: 17,196

Re: [SOLVED] Turn Off Write Caching

Have a look at the mount option sync,  the man page for hdparm for device write caching.  At the application level look for options for O_DIRECT , fsync, fdatasync.
This may lead to your system becoming less much less responsive as you are attempting to force all asynchronous data writes to become synchronous.

Offline

#7 2018-04-24 14:38:16

SealsRock12
Member
Registered: 2018-04-03
Posts: 83

Re: [SOLVED] Turn Off Write Caching

Ok, I won't turn off write caching. Thank you.


-- SealsRock12

Offline

Board footer

Powered by FluxBB