LWN.net Logo

Enabling barriers

Enabling barriers

Posted May 21, 2008 20:13 UTC (Wed) by pr1268 (subscriber, #24648)
In reply to: Enabling barriers by corbet
Parent article: Barriers and journaling filesystems

Since which Kernel release has -o barrier=1 been an available option for mount(8)? Although I'm certain the kernel I'm running now (vanilla 2.6.25.4) would support barriers, I'm just a little curious how long this has been available. Thanks!


(Log in to post comments)

Enabling barriers

Posted May 21, 2008 20:17 UTC (Wed) by corbet (editor, #1) [Link]

Some quick grepping on my kernel tree disk suggests that ext3 got the barrier option in 2.6.9.

Enabling barriers since 2.6.9 and hdparm question

Posted May 21, 2008 20:36 UTC (Wed) by pr1268 (subscriber, #24648) [Link]

Ahhh. The "big" one (kernel release, that is). Thank you for the swift reply (gee, that was quick!). :-)

Now another question for anyone: What is the effect of toggling the disk drive's write-caching feature with hdparm -W {0,1} /dev/devicename? The man page for hdparm(8) doesn't say anything about that, and just now querying my four disks (two IDEs and two SATAs) shows this enabled for all four. I've never fiddled with this setting, but I'm convinced it runs automatically based on vendor/drive/capability (all four are late-model Seagate drives FWIW). Thanks again!

Enabling barriers since 2.6.9 and hdparm question

Posted May 22, 2008 11:33 UTC (Thu) by zmi (subscriber, #4829) [Link]

> What is the effect of toggling the disk drive's write-caching feature

Turning off write caches of disks and the RAID controller slows writing 
badly. Examples of a recent HP ML350 server with 3x 146GB 10k SAS disks:
- disk cache and RAID write cache OFF: 65MB/s
- disk cache and RAID write cache ON: 145MB/s
and that is on _sequential_ writes. We didn't measure _random_ writes, but 
the system felt like an old 386 then. Really unusable.

Enabling barriers since 2.6.9 and hdparm question

Posted May 22, 2008 13:40 UTC (Thu) by NAR (subscriber, #1313) [Link]

Interestingly we've had different experience - turning off the write cache actually improved
performance. I'm not sure why, but the whole system was somewhat complicated and we had data
loss. Turning off the write cache solved the data loss problem and had this surprising
side-effect too.

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds