Re: (reiserfs) Re: dedicated logging devices

From: Xuan Baldauf (xuan--reiserfs@baldauf.org)
Date: Sun Jun 11 2000 - 16:50:44 EST


Chris Mason wrote:

> On Sat, 10 Jun 2000, David Gould wrote:
>
> > On Fri, Jun 09, 2000 at 12:44:19PM +0100, Stephen C. Tweedie wrote:
> > > Hi,
> > >
> > > On Fri, Jun 09, 2000 at 12:45:51PM +0200, Xuan Baldauf wrote:
> > > >
> > > > Is it reasonable to use the 50 bytes of /dev/nvram for logging or is it just
> > > > too small?
> > >
> > > Far, far, far, far, far too small. You need tens of kB minimum to record
> > > a single filesystem transaction for a complex operation such as a file
> > > delete.
> >
> > Interesting. Or even surprising. I suppose I could just go read the code,
> > but for instant gratification of my curiousity, I will ask here first.
> >
> > What exactly is being logged for a file deletion that takes so much space?
> >
> > Is this for the general case, or only for files with a lot of indirect
> > blocks?
> >
>
> It is the same with reiserfs, we log blocks, and each block is 4k.
> Deleting a large file (>2GB) could touch thousands of blocks. These can
> be broken up into multiple transcations, but even then it could touch 15
> or 16 blocks at a time.

Was it ever considered to log diffs rather than full blocks? Most block operations
need to know the previous data and therefore are loaded. If you just change one bit or
two in a bitmap, the full block does not need to be changed. I think this would
dramatically reduce the size of the journal traffic, and it may significantly increase
the log performance. On replay, you'd have to unpack the changes which might be
somewhat slower, but wether it takes 1 or 2 seconds longer on restart does not really
matter.

>
> But, the other reason you don't want a tiny log is the log limits how long
> you can go without flushing the metadata to its real location on disk. If
> your log fills in 1 second and you have to start flushing, performance
> will suffer badly.

When you log only diffs, you also need to start flushing too fast.

>
>
> -chris

Xuân. :o)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Jun 15 2000 - 21:00:24 EST