xfs
[Top] [All Lists]

Re: Flash drive suitability for XFS journals

To: Jason Parker-Burlingham <jasonp@xxxxxxxxx>
Subject: Re: Flash drive suitability for XFS journals
From: Steve Lord <lord@xxxxxxx>
Date: 01 Jul 2003 15:24:49 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <87n0fy9g8n.fsf@xxxxxxxxxxxxxxx>
References: <87n0fy9g8n.fsf@xxxxxxxxxxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Tue, 2003-07-01 at 14:52, Jason Parker-Burlingham wrote:
> While attempting to recover an unjournalled filesystem last week, it
> occurred to me that it should be possible to store the XFS log on a
> simple solid-state device.  A USB keychain or thumb drive immediately
> suggested itself, and a quick check of the XFS manual pages indicated
> this is a distinct possibility.
> 
> A little talk on a local LUG list pointed out that these things often
> have a limited number of write cycles, typically in the millions.  One
> poster suggested that write levelling could reduce the impact of this
> limitation, by increasing the amount of data which can be written to
> the device before it starts to fail.

Well, the log is written as a circular buffer, take a look at a system
which has been up for a while and use the xfs_stats.pl script which is
in the cmd/xfsmisc directory,  xs_log_blocks is the number of 512 byte
log blocks written since boot up. This will give you an idea of the
frequency of log wrapping. Divide it by the size of your log to get 
the number of times it has wrapped.

> 
> If I can find a system to sacrifice I may be tempted to give this a
> try---small drives are fairly cheap and have write cycles large enough
> to make a test worthwhile.  My XFS-related questions are:
> 
> 0) Will this really be useful?  My hope is that storing the log on a
>    device which doesn't use the IDE bus will save the log from
>    becoming corrupted when the IDE disks start to fail.  (The restore
>    I alluded to above would probably have been recoverable if the
>    disk's superblock and bad block list had remained intact.)
> 

Well, there may be a few more recoverable cases, but I doubt it will be
a huge gain.

> 1) How much space will I need, relative to the space required for the
>    filesystem itself?  My home system has an XFS filesystem on /home
>    which is 1.7GB, and the internal log is about 5MB.  Can I expect
>    this to scale?  On a similar note, will acting as an XFS journal
>    simply exhaust the drive in a matter of months, instead of having a
>    lifetime comparable to the drives themselves?
> 

If you want to minimize reuse of the space, make the log as big as
possible.

> 2) What sort of performance penalty can I expect to contend with?  I
>    would probably use a USB2.0 drive---fortunately the small ones are
>    still remarkably inexpensive.
>

Most log writes are async, if you are doing metadata intensive ops
then you can end up waiting for a log buffer to complete I/O. Doing
things like deleting large directory trees, we can become I/O bound
on the log, so performance can matter.
 
> 3) Is there some other technology suitable for the small office
>    situation which might fill this need?

There are battery backed ram cards which can be made to look like a
block device. The cost more though.

Steve




<Prev in Thread] Current Thread [Next in Thread>