Re: 11gR2 rman compression algorithms

  • From: Jeremy Schneider <jeremy.schneider@xxxxxxxxxxxxxx>
  • To: Yong Huang <yong321@xxxxxxxxx>
  • Date: Fri, 5 Sep 2014 12:21:48 -0400

Great observation.  I would also add that v$rman_compression_algorithm
lists MEDIUM with a compatibility of 11.1 which suggests pretty strongly
that it's just an alias for ZLIB, since the underlying code must exist in
11gR1 to have this compatibility.

Martin Berger pointed out to me his old blog post comparing stack traces
between BASIC and HIGH.
http://berxblog.blogspot.co.at/2011/11/bzip2-twice.html

Function names suggest that BASIC was an internal implementation of bz2.

Looking at the stack and function names for HIGH, I actually think it's
very likely Oracle simply used Julian Seward's libbzip2 directly instead of
using their own implementation.  You can download the source from bzip.org
yourself, but it has an entry function called BZ2_bzCompress() which calls
a function called handle_compress() which calls a function called
BZ2_compressBlock() ... doesn't seem like just coincidence to me.  :)

lzo/zlib/bz2 is a pretty logical progression - imho it makes sense.  just
nice to have a little evidence that this is actually the case!

also, it seems that blog posts on the internet which suggest Oracle only
changed the buffer size between BASIC and HIGH are incorrect; they may have
completely switched implementations.

-J



--
http://about.me/jeremy_schneider


On Fri, Sep 5, 2014 at 11:31 AM, Yong Huang <yong321@xxxxxxxxx> wrote:

> Maybe we can guess at some algorithms from what's in
> v$rman_compression_algorithm.
>
> ALGORITHM_ ALGORITHM_DESCRIPTION
> ---------- -------------------------------------------
> BZIP2      good compression ratio
> BASIC      good compression ratio
> LOW        maximum possible compression speed
> ZLIB       balance between speed and compression ratio
> MEDIUM     balance between speed and compression ratio
> HIGH       maximum possible compression ratio
>
> It's possible Basic means BZIP2 because they have the same description,
> and Medium means ZLIB.
>
> From x$ksppi, parameter _backup_lzo_size means "specifies buffer size for
> LOW compression" so we know Low means LZO.
>
> The only remaining one we don't know is High.
>
> Of course, this is not official answer. The guess could be wrong.
>
>

Other related posts: