* cache+barriers vs cache+nobarriers vs disabled cache+barriers vs disabled cache+nobarriers
@ 2007-03-15 9:16 Leon Kolchinsky
2007-03-15 12:39 ` Martin Steigerwald
0 siblings, 1 reply; 5+ messages in thread
From: Leon Kolchinsky @ 2007-03-15 9:16 UTC (permalink / raw)
To: xfs
Hello All,
After reading http://oss.sgi.com/projects/xfs/faq.html#wcache
and some posts on the list I've got the following question:
If I have disabled write cache on the disk (hdparm -W0 /dev/hda) and by
default FS is mounted with "barrier" enabled, Is there any taste in enabling
"barrier"(by default) because write cache is disabled anyway or may be it's
a good idea to mount with "nobarriers" in this case?
Or may be I'm wrong here and write cache has nothing to do with "barrier"
option?
I thought that "barrier" is on by default to somewhat minimize potential
dangers of enabled write cache? But if write cache is disabled, would
"barrier" option just slow down the FS performance (which is already slowed
down by "hdparm -W0 /dev/had" anyway)?
Any inside wisdom on the subject of this mail would be much appreciated :)
Best Regards,
Leon Kolchinsky
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cache+barriers vs cache+nobarriers vs disabled cache+barriers vs disabled cache+nobarriers
2007-03-15 9:16 cache+barriers vs cache+nobarriers vs disabled cache+barriers vs disabled cache+nobarriers Leon Kolchinsky
@ 2007-03-15 12:39 ` Martin Steigerwald
2007-03-15 13:07 ` Martin Steigerwald
2007-03-18 10:07 ` Leon Kolchinsky
0 siblings, 2 replies; 5+ messages in thread
From: Martin Steigerwald @ 2007-03-15 12:39 UTC (permalink / raw)
To: linux-xfs
[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]
Am Donnerstag 15 März 2007 schrieb Leon Kolchinsky:
> Hello All,
>
>
> After reading http://oss.sgi.com/projects/xfs/faq.html#wcache
> and some posts on the list I've got the following question:
>
> If I have disabled write cache on the disk (hdparm -W0 /dev/hda) and by
> default FS is mounted with "barrier" enabled, Is there any taste in
> enabling "barrier"(by default) because write cache is disabled anyway
> or may be it's a good idea to mount with "nobarriers" in this case?
Hello Leon!
It is not needed to enable barriers when write cache is disabled. Enabling
barriers in this case shouldn't have any visible effect I think.
> I thought that "barrier" is on by default to somewhat minimize
> potential dangers of enabled write cache? But if write cache is
> disabled, would "barrier" option just slow down the FS performance
> (which is already slowed down by "hdparm -W0 /dev/had" anyway)?
I think it wouldn't slow down any more, except maybe a minimal slow down
due to a little bit more of code executed inside XFS.
But why do you want to disable write cache in the first case? As long as
you are using 2.6.17.7 or later you can safely enable barriers and and
write cache. At least that is my experience upto 2.6.20.1 with old IDE
drivers and now since some hours on my ThinkPad T42 2.6.20.3 with libata
drivers.
With write barriers XFS and enabled write cache, XFS will not be as fast
as without write barriers and with enabled write cache - which is the
unsafe combination -, but it will still be faster than with disabled
write cache.
Regards,
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cache+barriers vs cache+nobarriers vs disabled cache+barriers vs disabled cache+nobarriers
2007-03-15 12:39 ` Martin Steigerwald
@ 2007-03-15 13:07 ` Martin Steigerwald
2007-03-18 10:07 ` Leon Kolchinsky
1 sibling, 0 replies; 5+ messages in thread
From: Martin Steigerwald @ 2007-03-15 13:07 UTC (permalink / raw)
To: linux-xfs
Am Donnerstag 15 März 2007 schrieb Martin Steigerwald:
> But why do you want to disable write cache in the first case? As long
> as you are using 2.6.17.7 or later you can safely enable barriers and
> and write cache.
Hello again, Leon,
of couse using write barriers is only possible if the hardware
requirements (cache flushes or similar mechanisms) are met. XFS complains
if it can't use barriers. See dmesg or log for details.
It seems that the mailinglist software broke my GPG signature. It was
correct as I sent out the mail.
Regards,
--
Martin 'Helios' Steigerwald - http://www.Lichtvoll.de
GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: cache+barriers vs cache+nobarriers vs disabled cache+barriers vs disabled cache+nobarriers
2007-03-15 12:39 ` Martin Steigerwald
2007-03-15 13:07 ` Martin Steigerwald
@ 2007-03-18 10:07 ` Leon Kolchinsky
2007-03-18 21:33 ` Chris Wedgwood
1 sibling, 1 reply; 5+ messages in thread
From: Leon Kolchinsky @ 2007-03-18 10:07 UTC (permalink / raw)
To: 'Martin Steigerwald', linux-xfs
> > Hello All,
> >
> >
> > After reading http://oss.sgi.com/projects/xfs/faq.html#wcache
> > and some posts on the list I've got the following question:
> >
> > If I have disabled write cache on the disk (hdparm -W0 /dev/hda) and by
> > default FS is mounted with "barrier" enabled, Is there any taste in
> > enabling "barrier"(by default) because write cache is disabled anyway
> > or may be it's a good idea to mount with "nobarriers" in this case?
>
> Hello Leon!
>
> It is not needed to enable barriers when write cache is disabled. Enabling
> barriers in this case shouldn't have any visible effect I think.
>
Thanks for your reply Martin,
My goal is to avoid filesystem corruption at any cost (while trying to use
fastest FS for linux) and according to the FAQ disabling write cache is the
right way to do it.
Power/Hardware failure may occur in-between the flushes (with write barrier
enabled) so the safe way (I think) is to disable write cache.
It's interesting if there is a significant drop in the performance with
disabled disk "write cache" and XFS filesystem comparing to ext3+enabled
"write cache".
Has anyone some statistics or tests comparing ext3+enabled write cache vs.
xfs+disabled write cache?
Best Regards,
Leon Kolchinsky
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: cache+barriers vs cache+nobarriers vs disabled cache+barriers vs disabled cache+nobarriers
2007-03-18 10:07 ` Leon Kolchinsky
@ 2007-03-18 21:33 ` Chris Wedgwood
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wedgwood @ 2007-03-18 21:33 UTC (permalink / raw)
To: Leon Kolchinsky; +Cc: 'Martin Steigerwald', linux-xfs
On Sun, Mar 18, 2007 at 12:07:11PM +0200, Leon Kolchinsky wrote:
> My goal is to avoid filesystem corruption at any cost
doing what? applications can still lose data if they're not careful
> (while trying to use fastest FS for linux) and according to the FAQ
> disabling write cache is the right way to do it.
unless you applications are care, it's typical that reliability is
going to cost in terms of performance
> Power/Hardware failure may occur in-between the flushes (with write
> barrier enabled) so the safe way (I think) is to disable write
> cache.
i've heard (but nobody has been able to give conrete details on this)
that disabling the write-cache on modern drives will lessen their
lifespan, often considerably
with write barriers sane applications should be just as safe as when
you disable the write cache
> It's interesting if there is a significant drop in the performance
> with disabled disk "write cache" and XFS filesystem comparing to
> ext3+enabled "write cache".
that's expected, w/o the write-cache drives are typically a lot slower
for many loads (why else would they put a write cache in disks afetr
all)
> Has anyone some statistics or tests comparing ext3+enabled write
> cache vs. xfs+disabled write cache?
why would you compare those two? why ext3 w/ caches enabled and xfs
w/ caches disabled?
anyhow, it depends on your load, for some loads ext3 is faster and
others xfs is faster
what access patterns are you expecting?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-03-18 21:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-15 9:16 cache+barriers vs cache+nobarriers vs disabled cache+barriers vs disabled cache+nobarriers Leon Kolchinsky
2007-03-15 12:39 ` Martin Steigerwald
2007-03-15 13:07 ` Martin Steigerwald
2007-03-18 10:07 ` Leon Kolchinsky
2007-03-18 21:33 ` Chris Wedgwood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox