04-27-06 12:57 PM
Damian Menscher wrote:
> I'm curious how to select a reasonable block size for tape backups.
> I have discovered that the default of 10K is incredibly slow (1M/s)
> and that increasing it to 1024K goes much faster (8M/s). My
> question is why they don't make the default larger? I can imagine
> two possibilities:
> - compatibility with older tape drives or operating systems
> - each file takes a minimum of 1 block
> But as I understand it, dump(1) savves each filesystem as a single
> tape "file", so the larger blocksize shouldn't hurt. I guess I can
> test this by creating a filesystem with a million 1-byte files, and
> see how many copies of it fit on a tape.
> If it matters, I'm using Linux with a 2.6 kernel (RHEL4) and a
> TAIT-2 tape drive on a remote machine (connecting via ssh).
Historically, the tape/archive block sizes were rather small - e.g. as
small as 512 bytes, and sometimes the maximum was only 10 KiB (20 512
byte "blocks"). In some cases, this might matter for backwards
compatibility.
With much more modern (current, non-ancient) hardware, generally
larger tape block sizes are faster and more efficient. Typically
using the largest tape block size supported by the hardware (or driver
dependencies, etc.) usually works out to be fastest and most efficient
- at least provided one can stream the data to the tape drive fast
enough to avoid underruns. Also, larger block sizes on most modern
tape drives generally don't end up wasting more space - even if the
data to be written is a quite small bit. Most notably, most all
modern tape drives include hardware compression, and backup utilities
typically pad any remaining space to a block boundary with nulls -
which compresses exceedingly well. And in most cases, where multiple
blocks are being written, less space is required on tape, as there is
a reduced need for space for start/end of block (typically tape
record marks) markers.
[ Post a follow-up to this message ]
|