[net.unix-wizards] dump/restor SLOW -- why?

miorelli (01/28/83)

Does anyone know why dump/restor are so SLOW ??  Any way to speed
them up a bit??  It can really be painful doing full backups
and a restor (we've had several disk problems recently).
I am running 4.1 on a 780 and have a TU77 tape (125 ips) and
don't feel I'm fully utilizing its speed capabilities.

Please respond by mail, and as usual, thanks in advance.

-->BoB Miorelli, Pratt & Whitney Aircraft
decvax!harpo!utah-cs!utah-gr!pwa-b!miorelli

dyer (01/31/83)

At BBNCC, we were concerned about the speed of "restor" (V7), mainly because
we were in the midst of recovering from a operator-induced file-system
crash.  Full restor's were taking about 30-40 minutes, most of it in
the CPU-intensive phase BEFORE the tape starts moving.

After compiling a profiling version of restor, it turned out that a large
amount of its time was spent in two routines, copy and clearblk,
(guess what they do?).  On the C/70, by replacing them with microcode
routines having the same semantics, the time to perform a "restor" dropped
to roughly to 5-10 minutes.

It might be interesting to construct a version of "restor" for the VAX,
using an appropriately configured "asm.sed" to replace calls to copy()
and clearblk() with equvalent VAX block-move and block-copy single
instructions.

Steve Dyer
sdyer@bbn-unix
decvax!wivax!dyer
dyer.Wang-Inst@udel-relay

dmmartindale (02/01/83)

There is no need to build something like "asm.sed" simply to get a fast
memory copy routine.  Simply replace the code for "copy" in restor with:

#ifdef vax
copy(f, t, s)
char *f, *t;
{
	asm("movc3 12(ap),*4(ap),*8(ap)");
}
#else vax
copy(f, t, s)
register char *f, *t;
{
	register i;

	i = s;
	do
		*t++ = *f++;
	while (--i);
}
#endif vax

Something similar could be done with the code that clears a buffer, but
not nearly as much time is spent in it as in copy().  A better solution,
though, would be to rewrite restor so that the routines which want to
look at the tape a block at a time are simply given a pointer to the
block, rather than requiring the data to be copied from the tape buffer
to some other internal buffer.