2013-05-13 07:54:51

by Sidorov, Andrei

[permalink] [raw]
Subject: Barriers

Hi,

I'm curious if anyone ever tried fua-only jbd? If done with fua's, there
will be no cache flushes at all, thus no occasional spikes. NCQ fua
journalling is potentially more efficient than cache flush.
I know, stale data will be unavoidable (however unlikely) in fua-based
implementation. It is a compromise between ordered,nobarrier (fs
corruption is likely to happen upon power loss) and ordered,barrier (no
fs corruption).
Any advise on what kind of workload to test?

What about having single journal per device as opposed to partition/fs?
What I've found of quick look at jbd2 code, it doesn't seem to be a
problem to set up single journal for several filesystems on the same device.
This will give an advantage of single commit per commit interval as
opposed to several commits per likely to be same interval.

--
Regards,
Andrei.



2013-05-14 21:42:01

by Jan Kara

[permalink] [raw]
Subject: Re: Barriers

Hi,

On Mon 13-05-13 07:54:48, Sidorov, Andrei wrote:
> I'm curious if anyone ever tried fua-only jbd? If done with fua's, there
> will be no cache flushes at all, thus no occasional spikes. NCQ fua
> journalling is potentially more efficient than cache flush.
If you have such HW, it may be an interesting thing to try.

> I know, stale data will be unavoidable (however unlikely) in fua-based
> implementation. It is a compromise between ordered,nobarrier (fs
> corruption is likely to happen upon power loss) and ordered,barrier (no
> fs corruption).
Well, it will achieve guarantees of barrier,data=writeback mode.

> Any advise on what kind of workload to test?
Not really...

> What about having single journal per device as opposed to partition/fs?
> What I've found of quick look at jbd2 code, it doesn't seem to be a
> problem to set up single journal for several filesystems on the same device.
> This will give an advantage of single commit per commit interval as
> opposed to several commits per likely to be same interval.
Yes, that should be relatively easily possible and might be interesting
for other usecases as well (e.g. when you want to utilize one fast device
for the journal and use it for several slow disks).

Honza
--
Jan Kara <[email protected]>
SUSE Labs, CR

2013-05-15 05:43:58

by Dave Chinner

[permalink] [raw]
Subject: Re: Barriers

On Tue, May 14, 2013 at 11:41:58PM +0200, Jan Kara wrote:
> Hi,
>
> On Mon 13-05-13 07:54:48, Sidorov, Andrei wrote:
> > I'm curious if anyone ever tried fua-only jbd? If done with fua's, there
> > will be no cache flushes at all, thus no occasional spikes. NCQ fua
> > journalling is potentially more efficient than cache flush.
> If you have such HW, it may be an interesting thing to try.

Be careful there - you still need to guarantee all metadata that is
being overwritten in the log has been flushed to stable storage, so
even when you are using FUA for the journal writes you still need a
pre-write flush to occur.

Another tricky case here is that if you are using an external log,
the flush needs to occur on the metadata device, not the log device,
and it needs to complete before you submit the FUA journal write.

Cheers,

Dave.
--
Dave Chinner
[email protected]