[comp.unix.questions] What exactly does "blocking" mean ?

exnirad@brolga.cc.uq.oz.au (Nirad Sharma) (04/08/91)

What exactly is the meaning of "blocking" with reference to dd, tar, cpio
etc ?  Does it have something to do with checksumming ?  What are the advantages
of larger blocks as opposed to smaller blocks ?

Many questions which I hope some guru can adequatly explain to me.  Thanks


Nirad Sharma  (exnirad@brolga.cc.uq.oz.au)		Phone : (61 7) 365 7575
Systems Programmer					Fax :	(61 7) 870 5080
Continuing Education Unit
The University of Queensland
AUSTRALIA
-- 
Nirad Sharma  (exnirad@brolga.cc.uq.oz.au)		Phone : (61 7) 365 7575
Systems Programmer					Fax :	(61 7) 870 5080
Continuing Education Unit
The University of Queensland

cpcahil@virtech.uucp (Conor P. Cahill) (04/08/91)

exnirad@brolga.cc.uq.oz.au (Nirad Sharma) writes:
>What exactly is the meaning of "blocking" with reference to dd, tar, cpio
>etc ?  Does it have something to do with checksumming ?  What are the advantages
>of larger blocks as opposed to smaller blocks ?

Blocking deals with the size of buffer the programs will use for io.  This
is important for two reasons.  

	1. performance.  Generally a bigger block size will have better 
	performance.  However, this varies from device to device and the only
	way to know is by experimentation.

	2. hardware.  Some hardware (especially 9-track tape drives) write 
	data to the device with the same blocking factor that is used by the
	program.  On these devices, the correct way to read the data is with
	a block size that is at least as big as that used to write the tape.

The blocking in the commands you listed has nothing to do with checksumming
since none of those utilities perform checksumming (or CRCing).
-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170