The manual for the 'barrier' mount option is:
barrier=0 / barrier=1
This disables / enables the use of write barriers in the jbd code.barrier=0 disables, barrier=1 enables (default). This also requires an IO stack which can support barriers, and if jbd gets an error on a barrier write, it will disable barriers again with a warning. Write barriers enforce proper on-disk ordering of journal commits, making volatile disk write caches safe to use, at some performance penalty. If your disks are battery-backed in one way or another, disabling barriers may safely improve performance.
But I do not know what the sentence "proper on-disk ordering of journal commits" means.
Suppose normal order -- journal 1,data 1; journal 2, data 2.
Which of the following ordering results will happen if I set barrier=0
?
- journal 2, data 2; journal 1, data 1;
- data 1, journal 1; data 2, journal 2.
barrier=1
, and it runs fast enough for me. Unless you are doing real heavy duty stuff I would leave it on. You have ram buffers so stuff will be written out when it can, with no slowdown to applications. And very little delay in writing to disk. If you with to see how much the ram buffers speed things up then add sync=1 to your home directory, and try to use your system for a day or two.