Amanda-Users

Re: Compression usage

2006-07-04 12:10:14
Subject: Re: Compression usage
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Tue, 4 Jul 2006 12:04:45 -0400
On Tue, Jul 04, 2006 at 04:17:46AM -0700, Joe Donner (sent by Nabble.com) wrote:
> 
> Dear all,
> 
> I just want to clarify something about compression:
> 
> My understanding is that you can use either software or hardware
> compression, or can switch between the two if needed.

You can also use no compression.

Switching between HW and SW compression would not be on a DLE
by DLE basis.  It would be on a config by config or by editing
your config on a daily basis.  A procedure not recommended.

No SW compression or SW compression by client or server, high
compression or low compression, is selectable on a DLE by DLE
basis.  It is part of the dumptype you choose for the DLE.


> What is generally, in your experience, the best of the two to use?
> 
> To switch off hardware compression, I believe I should use:
> mt -f /dev/nst0 compression 0 
> 

There are mt commands and then there are mt commands.
My OS' mt doesn't do anything at all about compression,
it is not even mentioned on the man page.

> Does this command switch it off permanently until you use the following?:
> mt -f /dev/nst0 compression 1
> 
> or will hardware compression switch back on, say, after a reboot?

>From what I've read here, the common linux mt's vary in their options
and behaviors.

But I'm pretty confident that the change is <sarcasm> permanent unless
you issue another mt compression command, read a compressed tape,
run a program the uses the tape drive, turn off the drive, change tapes, 
reboot, or post a message to the amanda mailing list </sarcasm>.

The most recent linux mechanism I've seen for dealing with tape drive
properties is "stinit".  If your distribution supports it, I'd recommend
setting up an stinit command at boot.  That will create several additional
device names for the same drive.  Each will automatically set whichever
properties you want every time that device name is opened.  So you can
have separate devices for with and without compression.

> I've set up Amanda to use compression as follows, and it seems to work quite
> well:
> 
> define dumptype comp-tar {
>       program "GNUTAR"
>       compress fast
>       index yes
>       record yes
> }
> 
> 
> But it just dawned on me that I haven't taken into account that our HP SDLT
> 320 tape drive is probably using hardware compression, so now I'm wondering
> what's best to do.
> 

If you are using HW and SW compresion,
your nice 160GB tape drive is now a 130GB drive.

The HW compressor of DLT drives (and all others I know about
except LTO drives) expand, rather than compress, data that
is basically random.  Compressed data is basically random.

Don't use SW and HW compression with your DLT drive.

It is not wrong to use HW compression only.  Lots of amanda sites
use HW compression.  It saves cpu cycles on both dump and recovery.

The average compression level will probably be about the same as you
see with compress fast, though less than compress best.  And if some
of your DLEs contain lots of data that is random (compressed iso images,
mp3 files, images, zip archives, ...) they will expand when taped.

You should adjust your tape size so amanda know it can feed more
uncompressed data to the tape drive.  How much will be an approximation
you will have to make.  Somewhere between 200 and 320 GB for your drive.

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

<Prev in Thread] Current Thread [Next in Thread>