SUMMARY: speed of ufsrestore

From: McIntyre, Jennifer <J.McIntyre_at_napier.ac.uk>
Date: Mon Jan 14 2002 - 05:02:23 EST
Thanks to everyone who replied to my request.

People were correct in identifying that the system does have a large number
of small files rather than a few large files.

"The speed of restore depends heavily on the number of files being
restored, because 'ufsrestore' updates directory entries and data for
each file, which may be in different areas of the disk.  This causes
disk arm movement, which has a high latency.  'ufsdump' does not have
this problem, since it maps all file blocks in the beginning, and uses
multiple buffers in order to stream the tape"

The advice I received suggested that the time taken for the restore wasn't
much of a surprise and that to improve on this I should try the following
advice:

1)  Compile yourself a copy of Casper Dik's fastfs.
    (http://www.science.uva.nl/pub/solaris/fastfs.c.gz).

    % sudo fastfs /a1 status
    /a1 is slow.
    % sudo fastfs /a1 fast
    /a1 is now fast
    % sudo ufsrestore etc., etc.
    % sudo fastfs /a1 slow
    /a1 is now slow

    This turns off *all* synchronous file system operations, and will
    get ufsrestore time within a factor of two of ufsdump time.  You
    never leave a production file system in fast mode; a power failure
    in the middle of your ufsrestore probably requires a newfs to
    recover (but who cares, you've lost nothing).

    But it is *fast* and is how I always do my full restores.

2)  Put it in logging mode:

    #device            device              mount   FS      fsck    mount
mount
    #to mount          to fsck             point   type    pass    at boot
options
    /dev/dsk/c0t1d0s0  /dev/rdsk/c0t1d0s0  /a1     ufs     2       yes
logging

    It is totally safe (you want to make sure you're running a
    reasonably recent patch cluster for Solaris 7), it is not quite as
    fast as 'fastfs fast', but you leave it on all the time, it nearly
    eliminates fscking, it is good stuff.  A google search for solaris
    ufs logging will get you lots of background material.

    I don't have Solaris 7, but for sure on Solaris 8 you can play with
    logging on a live system without umount/mount by:

    % sudo mount -o remount,logging /a1
    % sudo mount -o remount,nologging /a1

    I think logging should be default; I run it on *all* my Solaris 8
    boxes, period.  Apparently the reason it's not default is that
    there can be pathological circumstances where logging slows the
    file system down.  I've never experienced this myself, only major
    speedups on 'tar x' and 'rm -r', and freedom from fsck.

3) You could use the options "-rsf" (non verbose mode, non interactive)
instead of "ivfs" which could probably save you some time.  

Thank you all once again for your help and reassurance that ufsdump/restore
is the correct product to use.

Jen McIntyre
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Tue Jan 22 17:57:45 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:32 EST