Re: star tape I/O suggestion
[email protected] Fri, 4 Mar 2011 11:03:01 -0000
| Newsgroups | gmane.comp.archivers.star.user |
|---|---|
| Message-ID | <e29cebdf03f7a7382da11c2d44bcc196.squirrel@ssl-webmail-vh.clara.net> |
Hi, "Joerg Schilling" wrote: > Star is able to write any blosk size sou like in case your OS suppoorts > this. > > Just specify the block size you need. Note that writing blocks that are > larger > than 63 kB may cause you top become unable to read in tapes on some OS or > hardware. Yes, that was the point of my suggestion. Instead of writing one tape block at a time, if you set the tape drive to fixed-block mode by doing e.g. mt -f /dev/nst0 setblk 32768 you can then tell star to write in larger chunks, say bs=524288. In that case, each 512KB that star writes should (subject to the tape driver) get written to tape using one WRITE command of sixteen 32KB blocks. So there will be no interchange problems due to large tape block size, and no inefficiency from writing one small tape block at a time. However, the disadvantage is that star pads the written data to a multiple of 512KB, when it only needs to be padded to the tape block size (32KB here). That's not a huge amount of wasted data, but if someone is using much larger transfers on a modern tape drive, the amount wasted could be larger. E.g. writing 256KB blocks 32MB at a time. And if the user later copies the tar archive from tape to a file on disk, the extra padding will waste disk space. So ideally, star would be told two things: - the tape block size (bs= or blocks=) - the maximum number of blocks in each I/O operation (or alternatively, the maximum I/O size) Then star would perform I/O in maxblocks*bs byte chunks, except the last write which could be a lower multiple of bs. Mark