Philip Sherman wrote:
Backup processes tablespaces a physical block at a time. Export
processes a row at a time. Note that export involves the use of a
SELECT statement that can have predicates to control the rows that are
exported.
Tape drives have (comparatively) long delay times to start and stop
tape movement. Gaps between physical records on the tape also can
occupy a significant amount of space on the tape. Tape performance, as
a general rule, is significantly improved by writing large physical
blocks to the drive. It's quite possible that your default for the tape
drive is to write physical records that match the size of the write
request. In this case, the export to tape will write a separate block
for each row of the table! UDB backups will write 4k blocks unless
you've altered this in the tablespace definition.
Check your operating system manuals for directions on how to set a
blocksize for tape devices. Use a large blocksize (32k/64k or larger if
supported) to optimize speed and quantity of data written to a tape.
on AIX, smit is the tool to use.
I run Red Hat Enterprise Linux, and ran other versions of Red Hat Linux in
the past. I do not know if the distribution here actually matters very much.
I have an Exabyte VXA-2 tape drive on this machine, where I am presently
running DB2 V8.1.6. Exabyte recommend writing tape block size (as seen by
the OS) of 65536 bytes for best results (probably related to the cache
size in the drive among other things; it has a 2 megabyte buffer inside).
When setting up a little shell script to backup my little database, I
simply wrote (among other things):
$DB2 BACKUP DATABASE stock TO $TAPE_DRIVE BUFFER 16 > $REPORT 2>&1
---------
to get the desired block size to transfer to the tape drive. The meanings
of the definitions of $DB2, etc., should be obvious.
Also, in Linux, I did:
mt -f /dev/st0 setblk 0 to allow DB2 to set the blocksize (4096 * 16).
As an aside, the VXA-2 is a streaming drive that does not stop between
tape blocks. If the source of the data is too slow (not likely when the
drive is on an Ultra/320 LVD scsi controller all its own, and the hard
drives containing the database are 10,000rpm Ultra/320 SCSI drives with 8
Megabyte caches on their own SCSI controller), the drive slows down to
match the incoming data rate. It does not need to stop, backspace, forward
space, and write as my old DDS-2 tape drive had to do. The large buffer in
the drive, and the technology used to read and write the tapes, can
tolerate a variable speed drive mechanism. The blocks actually written to
the tape are probably not 65536 bytes in size. They include 4 level
Reed-Solomon ECC, CRC, etc., and 24768 bytes of user data. One of the
tapes can hold 160GBytes of hardware compressed data (assuming 2:1
compressioin ratio) or 80GBytes uncompressed.
--
.~. Jean-David Beyer Registered Linux User 85642.
/V\ Registered Machine 241939.
/( )\ Shrewsbury, New Jersey
http://counter.li.org
^^-^^ 07:40:00 up 22 days, 23:17, 3 users, load average: 4.04, 4.05, 4.08