Pular para o conteúdo

Qual o melhor nível de compressão no RMAN? Descubra aqui !

Qual o melhor nível de compressão no RMAN ?

O RMAN possui quatro tipos de compressão:

Tipo da compressão

Algoritmo

LOW

LZO

MEDIUM

ZLIB

HIGH

BZIP2

BASIC

BZIP

Um ponto de atenção é que todos os tipos de compressão, exceto o BASIC que é o valor default, precisam da option Advanced Compression que só está disponível na Enterprise Edition com um custo inicial de $11.500 (valor atualizado Oct/2015).

Como eu sei qual é o algoritmo que o meu banco de dados está usando?

[oracle@marte dbhome_1 ORCLP]$rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Fri Nov 20 10:17:09 2015
Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORCLP (DBID=3673457665)

RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCLP are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 4 BACKUP TYPE TO BACKUPSET;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;
CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/12.1.0.2/dbhome_1/dbs/snapcf_ORCLP.f'; # default

Ok, agora você sabe verificar qual o tipo de compressão o seu banco está usando, qual o melhor tipo de compressão? Bom, vamos aos testes:

RMAN> backup as compressed backupset database;

Starting backup at 20-NOV-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=57 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=59 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=52 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=77 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCLP/users01.dbf
channel ORA_DISK_1: starting piece 1 at 20-NOV-15
channel ORA_DISK_2: starting compressed full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/ORCLP/soe01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/ORCLP/users02.dbf
channel ORA_DISK_2: starting piece 1 at 20-NOV-15
channel ORA_DISK_3: starting compressed full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCLP/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCLP/teste01.dbf
channel ORA_DISK_3: starting piece 1 at 20-NOV-15
channel ORA_DISK_4: starting compressed full datafile backup set
channel ORA_DISK_4: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORCLP/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/ORCLP/sysaux01.dbf
channel ORA_DISK_4: starting piece 1 at 20-NOV-15
channel ORA_DISK_3: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T102014_c4y400vr_.bkp tag=TAG20151120T102014 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:26
channel ORA_DISK_4: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T102014_c4y400nd_.bkp tag=TAG20151120T102014 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:03:06
channel ORA_DISK_1: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T102014_c4y3zzrd_.bkp tag=TAG20151120T102014 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:47
channel ORA_DISK_2: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T102014_c4y3zzx9_.bkp tag=TAG20151120T102014 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:04:07
Finished backup at 20-NOV-15

Starting Control File and SPFILE Autobackup at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/autobackup/2015_11_20/o1_mf_s_896264662_c4y47q9k_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 20-NOV-15

Para alterar o tipo da compressão basta executar:

RMAN> CONFIGURE COMPRESSION ALGORITHM 'MEDIUM' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

old RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM 'MEDIUM' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters are successfully stored

RMAN> backup as compressed backupset database;

Starting backup at 20-NOV-15
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCLP/users01.dbf
channel ORA_DISK_1: starting piece 1 at 20-NOV-15
channel ORA_DISK_2: starting compressed full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/ORCLP/soe01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/ORCLP/users02.dbf
channel ORA_DISK_2: starting piece 1 at 20-NOV-15
channel ORA_DISK_3: starting compressed full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCLP/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCLP/teste01.dbf
channel ORA_DISK_3: starting piece 1 at 20-NOV-15
channel ORA_DISK_4: starting compressed full datafile backup set
channel ORA_DISK_4: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORCLP/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/ORCLP/sysaux01.dbf
channel ORA_DISK_4: starting piece 1 at 20-NOV-15
channel ORA_DISK_3: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T102849_c4y4jdqo_.bkp tag=TAG20151120T102849 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:36
channel ORA_DISK_4: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T102849_c4y4j7vj_.bkp tag=TAG20151120T102849 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:02:46
channel ORA_DISK_1: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T102849_c4y4j1o2_.bkp tag=TAG20151120T102849 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:04:17
channel ORA_DISK_2: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T102849_c4y4j1rz_.bkp tag=TAG20151120T102849 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:04:47
Finished backup at 20-NOV-15
Starting Control File and SPFILE Autobackup at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/autobackup/2015_11_20/o1_mf_s_896265216_c4y4s10p_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 20-NOV-15
RMAN> CONFIGURE COMPRESSION ALGORITHM 'HIGH' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

old RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM 'MEDIUM' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM 'HIGH' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters are successfully stored

RMAN> backup as compressed backupset database;

Starting backup at 20-NOV-15
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCLP/users01.dbf
channel ORA_DISK_1: starting piece 1 at 20-NOV-15
channel ORA_DISK_2: starting compressed full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/ORCLP/soe01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/ORCLP/users02.dbf
channel ORA_DISK_2: starting piece 1 at 20-NOV-15
channel ORA_DISK_3: starting compressed full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCLP/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCLP/teste01.dbf
channel ORA_DISK_3: starting piece 1 at 20-NOV-15
channel ORA_DISK_4: starting compressed full datafile backup set
channel ORA_DISK_4: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORCLP/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/ORCLP/sysaux01.dbf
channel ORA_DISK_4: starting piece 1 at 20-NOV-15
channel ORA_DISK_3: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T103434_c4y4tvv7_.bkp tag=TAG20151120T103434 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_4: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T103434_c4y4ty1t_.bkp tag=TAG20151120T103434 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:08:28
channel ORA_DISK_2: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T103434_c4y4tvg1_.bkp tag=TAG20151120T103434 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:12:18
channel ORA_DISK_1: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T103434_c4y4tv6r_.bkp tag=TAG20151120T103434 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:15:38
Finished backup at 20-NOV-15
Starting Control File and SPFILE Autobackup at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/autobackup/2015_11_20/o1_mf_s_896266213_c4y5r669_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 20-NOV-15

RMAN> CONFIGURE COMPRESSION ALGORITHM 'LOW' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

using target database control file instead of recovery catalog

old RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM 'HIGH' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters:

CONFIGURE COMPRESSION ALGORITHM 'LOW' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

new RMAN configuration parameters are successfully stored

RMAN> backup as compressed backupset database;

Starting backup at 20-NOV-15
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=38 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=36 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=57 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=52 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCLP/users01.dbf
channel ORA_DISK_1: starting piece 1 at 20-NOV-15
channel ORA_DISK_2: starting compressed full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/ORCLP/soe01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/ORCLP/users02.dbf
channel ORA_DISK_2: starting piece 1 at 20-NOV-15
channel ORA_DISK_3: starting compressed full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCLP/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCLP/teste01.dbf
channel ORA_DISK_3: starting piece 1 at 20-NOV-15
channel ORA_DISK_4: starting compressed full datafile backup set
channel ORA_DISK_4: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORCLP/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/ORCLP/sysaux01.dbf
channel ORA_DISK_4: starting piece 1 at 20-NOV-15
channel ORA_DISK_3: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T113505_c4y8dc3s_.bkp tag=TAG20151120T113505 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:16
channel ORA_DISK_4: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T113505_c4y8door_.bkp tag=TAG20151120T113505 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:02:26
channel ORA_DISK_1: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T113505_c4y8dbbc_.bkp tag=TAG20151120T113505 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:06
channel ORA_DISK_2: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T113505_c4y8dbgq_.bkp tag=TAG20151120T113505 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:03:26
Finished backup at 20-NOV-15
Starting Control File and SPFILE Autobackup at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/autobackup/2015_11_20/o1_mf_s_896269112_c4y8lrz3_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 20-NOV-15

Vou fazer um backup sem compressão e depois compacta-lo com o gzip -9.

RMAN> backup database;

Starting backup at 20-NOV-15
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCLP/users01.dbf
channel ORA_DISK_1: starting piece 1 at 20-NOV-15
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/ORCLP/soe01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/ORCLP/users02.dbf
channel ORA_DISK_2: starting piece 1 at 20-NOV-15
channel ORA_DISK_3: starting full datafile backup set
channel ORA_DISK_3: specifying datafile(s) in backup set
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCLP/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCLP/teste01.dbf
channel ORA_DISK_3: starting piece 1 at 20-NOV-15
channel ORA_DISK_4: starting full datafile backup set
channel ORA_DISK_4: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORCLP/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/ORCLP/sysaux01.dbf
channel ORA_DISK_4: starting piece 1 at 20-NOV-15
channel ORA_DISK_3: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T110827_c4y6tfs9_.bkp tag=TAG20151120T110827 comment=NONE
channel ORA_DISK_3: backup set complete, elapsed time: 00:00:26
channel ORA_DISK_4: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T110827_c4y6tg0c_.bkp tag=TAG20151120T110827 comment=NONE
channel ORA_DISK_4: backup set complete, elapsed time: 00:03:26
channel ORA_DISK_1: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T110827_c4y6td8h_.bkp tag=TAG20151120T110827 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:04:47
channel ORA_DISK_2: finished piece 1 at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/backupset/2015_11_20/o1_mf_nnndf_TAG20151120T110827_c4y6tdh1_.bkp tag=TAG20151120T110827 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:05:07
Finished backup at 20-NOV-15
Starting Control File and SPFILE Autobackup at 20-NOV-15
piece handle=/u01/app/oracle/fast_recovery_area/ORCLP/autobackup/2015_11_20/o1_mf_s_896267615_c4y73zjw_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 20-NOV-15
[oracle@marte 2015_11_20 ORCLP]$ls -ltrh

total 6.5G

-rw-r-----. 1 oracle oinstall  16M Nov 20 11:08 o1_mf_nnndf_TAG20151120T110827_c4y6tfs9_.bkp
-rw-r-----. 1 oracle oinstall 1.5G Nov 20 11:11 o1_mf_nnndf_TAG20151120T110827_c4y6tg0c_.bkp
-rw-r-----. 1 oracle oinstall 3.0G Nov 20 11:13 o1_mf_nnndf_TAG20151120T110827_c4y6td8h_.bkp
-rw-r-----. 1 oracle oinstall 2.2G Nov 20 11:13 o1_mf_nnndf_TAG20151120T110827_c4y6tdh1_.bkp

[oracle@marte 2015_11_20 ORCLP]$gzip -9 *.bkp
[oracle@marte 2015_11_20 ORCLP]$ls -ltrh

total 1.3G

-rw-r-----. 1 oracle oinstall 2.8M Nov 20 11:08 o1_mf_nnndf_TAG20151120T110827_c4y6tfs9_.bkp.gz
-rw-r-----. 1 oracle oinstall 325M Nov 20 11:11 o1_mf_nnndf_TAG20151120T110827_c4y6tg0c_.bkp.gz
-rw-r-----. 1 oracle oinstall 381M Nov 20 11:13 o1_mf_nnndf_TAG20151120T110827_c4y6td8h_.bkp.gz
-rw-r-----. 1 oracle oinstall 561M Nov 20 11:13 o1_mf_nnndf_TAG20151120T110827_c4y6tdh1_.bkp.gz

Resultados:

Tipo de compressão

Tempo

Tamanho

NONE

08:49

1.3 GB

LOW

09:40

1.8 GB

BASIC

11:36

1.2 GB

MEDIUM

12:26

1.5 GB

HIGH

36:59

993 MB

Conclusões

Os melhores tipos de compressão visando o custo x benefício de maior compressão em menor tempo foram o BASIC e o MEDIUM. O HIGH comprimiu muito, mas demorou horrores. Já o LOW demorou menos que os demais, porém foi o que menos comprimiu.

O NONE (sem compressão) x BASIC: O NONE possui um tempo menor e maior compressão (gzip -9), mas esse tempo é apenas do backup, não inclui o tempo de compactação. O problema é que durante um restore/recover você precisa primeiro descompactar o backup e depois efetuar o procedimento, corre o risco até de não existir espaço suficiente para a descompactação nem tempo hábil, portanto deve ser descartado, use o BASIC nesse caso, ele é grátis.

Minhas indicações:

NONE: Não use, prefira o BASIC.

LOW: Não use, ele gasta menos CPU que os demais, mas se você está usando compressão você quer ganhar espaço e não CPU. Esse tipo de compressão é usado em cenários que você quer gastar menos CPU nos seus backups.

BASIC: É o default, se você não fez nada ele será usado.

MEDIUM: Possui um ótimo custo entre CPU x Tempo x Compressão.

HIGH: É indicado para ambientes que tenham latência de rede muita alta. Diminui o máximo possível o tamanho do arquivo sem se importar com a CPU e tempo depois transporta o arquivo para o local desejado via rede.

Entretanto, se você fizer a mesma comparação no seu ambiente você terá resultados diferentes. Por que? Por conta de alguns fatores como esses:

SQL> @dbsize.sql

DADOS      UNDO         REDO         TEMP         LIVRE        TOTAL
---------- ------------ ------------ ------------ ------------ ------------
8,279      4,096        2,198        4,096        4,820        18,669

1 row selected.
nível de compressão no RMAN

Os meus dados não são os mesmos que os seus. Eu possuo uma quantidade N de Y objetos e você possui N+10 do mesmo tipo de objetos, a compactação de objetos é diferente. Compactar 100 tabelas é diferente de compactar 100 LOBS, por isso o melhor algoritmo não é o MEDIUM ou o HIGH, o melhor algoritmo de compressão vai de acordo com o seu ambiente, você precisa testar todos eles e decidir o que é melhor para o seu banco de dados. Também vale lembrar que o seu hardware impacta nisso, o meu disco é um SATA e meu processador um i7 o que faz uma diferença enorme se comparado com outros tipos de discos e CPU.

Espero ter ajudado, até logo!

Gabriel Comenale

Gabriel Comenale

Gabriel Comenale, formado em banco de dados pela FIAP possui 6 anos de experiência na área de técnologia trabalhando com ambientes de pequeno, médio e grande porte nas plataformas Linux e Windows de segmentos variados de clientes como Odebrecht, Livraria Cultura, AES Eletropaulo, Renner, Sindicato dos Comerciários, Tigre – Tubos e Conexões, Unimed Seguros, Fidelity Investments, Alelo entre outros. Possui as certificações OCA 11g e ITIL V3 além de já ter estudado no Canadá e ministrado treinamentos em banco de dados Oracle. Atualmente trabalha como DBA Oracle na TIVIT.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

plugins premium WordPress