tape utility and documentation released

Tony Cooper tony at tui.marcam.dsir.govt.nz
Tue May 28 22:57:45 AEST 1991


This is about the zillionth message I have posted tonight to this group. I'll
soon pass the record (held by that jagubox dude) if I don't watch out.

Speaking of jagubox, I have released tbb, my double buffering file copy
program, and a tutorial on the use of tape drives under Unix. These can
be fetched by anonymous FTP from jagubox.gsfc.nasa.gov in the directory
/pub/tape.utilities.

Tbb is good for copying files from disk to tape. Think about it - if you
use tar or cpio to do it the program reads a buffer from disk then writes
the buffer to tape. Ie read then write, read then write - just one thing
at a time. But Unix and the SCSI bus can do two transfers at (almost) the
same time. So it is possible to read from disk (almost) at the same time
as writing to tape. Tbb does this. It overlaps reads and writes to a far
greater extent than a straight copy does. This can dramatically speed up
copies to tape. The read-then-write method makes it difficult to keep
a tape drive streaming since the tape drive is not receiving data while
the disk is being read. So the drive has to wait. While waiting it stops.
This means the overhead of stopping and starting all the time. 

But if you use tbb you can give the drive a chance to be fed data continuously
and give it a chance to stream. Streaming vs not streaming can dramatically
speed up a tape drive. I did one example where using tbb did the copy to
tape in one sixth of the time that not using tbb took. Such examples are
easy to create.

Tbb is written to replace dd(1) and tcb(1) if you use them. Note: the way
to overlap reads and writes is to use double buffers. Since tape drives
already have buffers and the backup program has one then you already have
two buffers and can overlap reads and writes to some extent. So I cannot
guarantee that tbb will even help you at all. But usually it will.

The tutorial contains everything I know (plus some things I don't know) about
using tape drives under Unix. It refers specifically to A/UX and my st
tape driver but is general enough to be useful for Unix in general. It
covers some things like special files, mt commands, backup utilities,
streaming etc. It assumes some knowledge about using Unix so is not for
weanies. You are welcome to contribute to it, make comments, ask questions,
and (since I place it in the public domain) sell it for profit. If you
fetch a word processor version rather than the text version you will find
some bits in small print. You don't have to read these bits unless you
are really keen on tape drives.

Have fun,
Tony Cooper
sramtrc at albert.dsir.govt.nz



More information about the Comp.unix.aux mailing list