当前位置: 首页 > news >正文

rman compress

   级别         初始         备完    耗时
   low          1804       3572    0:10 
   High         1812       3176   2:00 

   MEDIUM  1820       3288    0:13

   BASIC      1828   3444    0:56 ---不如MEDIUM,时间还长
 
  NO COMPRESS     1820    5924  0:5

RMAN> CONFIGURE COMPRESSION ALGORITHM 'MEDIUM'; 

RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE include current controlfile plus archivelog;

SYMPTOMS

 1> Rman  COMPRESSION ALGORITHM is set to  'BASIC'  ---> Default value

   

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

两个命令都可以

RMAN> CONFIGURE COMPRESSION ALGORITHM 'basic';

old RMAN configuration parameters:
CONFIGURE COMPRESSION ALGORITHM 'MEDIUM' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;
new RMAN configuration parameters:
CONFIGURE COMPRESSION ALGORITHM 'basic' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;

 

2> Compressed backup takes more time then Uncompressed backup.

  

    BACKUP AS COMPRESSED BACKUPSET DATABASE include current controlfile plus archivelog;

    BACKUP  DATABASE include current controlfile plus archivelog;

COMPRESS:
=========

DBGIO:         Type %Comp Blocks     Tot Blocks Blksize    ElpTime(s) IO Rt(b/s) Name [17:42:22.326] (krmkqio)
DBGIO:         ---- ----- ---------- ---------- ---------- ---------- ---------- ----- [17:42:22.326] (krmkqio)
DBGIO:         IN   100.0 4192894    4194302    8192       808        42510133  <path>/<db_filename> [17:42:22.326] (krmkqio)
DBGIO:         OUT        472348                8192       808        4788953    <path>/<backup_piece_name> [17:42:22.326] (krmkqio)
DBGIO:         AGG        4192894               8192       808        42510133     [17:42:22.326] (krmkqio)
DBGMISC:       ENTERED krmzlog [17:42:22.326]

NO COMPRESS:
============

DBGIO:         Type %Comp Blocks     Tot Blocks Blksize    ElpTime(s) IO Rt(b/s) Name [17:49:38.004] (krmkqio)
DBGIO:         ---- ----- ---------- ---------- ---------- ---------- ---------- ----- [17:49:38.004] (krmkqio)
DBGIO:         IN   100.0 4192894    4194302    8192       116        296105065  <path>/<db_filename> [17:49:38.004] (krmkqio)
DBGIO:         OUT        4192900               8192       116        296105489  <path>/<backup_piece_name> [17:49:38.004] (krmkqio)
DBGIO:         AGG        4192894               8192       116        296105065    [17:49:38.004] (krmkqio)

CHANGES

CAUSE

Bug 14157581 was created on this issue

 Bug 14157581 - EXADATA: RMAN COMPRESS BASIC BACKUP EXTREMELY SLOW Bug 14157581 - EXADATA: RMAN COMPRESS BASIC BACKUP EXTREMELY SLOWBug 14157581 - EXADATA: RMAN COMPRESS BASIC BACKUP EXTREMELY SLOW> ----> Closed as duplicate of  Bug 13784430   . 

 This was closed as not a Bug and expected behavior.
 

13784430Bug 13784430Bug 13784430Bug 13784430Thi

SOLUTION

This is an expected behavior as confirmed by development.Performance slowness can be a part of basic compression.

Moreover, the default compression algorithm is optimized for best compression (not best performance).

You can try using other other type of Compression((like LOW, MEDIUM and HIGH) ,However please note you need to have License for Advanced Compression to use them.

-----

GOAL

How does RMAN compression works ?

Goal of this document is to give you a Complete Understanding of

1. Null compression

2. Unused block compression

3. Binary compression

SOLUTION

A Complete Understanding of RMAN Compression


By default RMAN has three types of compression : 

1.  Null compression

2.  Unused block compression

3.  Binary compression

Untill Oracle Version 10.1 only 'Null' compression is done by default.  In Oracle Version 10.2, and forward, 'Null' and 'unused block' compression is done by default.   The types of compression are done automatically, no special command is required. 

'Null' and 'unused block' compression are filtering which blocks are send to the backups. 'Binary' compression is an additional compression on the blocks send to the backup. 

1. Null Compression

When backing up datafiles into backup sets, RMAN does not back up the contents of data blocks that have never contained data.  This behavior is referred to as 'NULL block compression'. This means RMAN will not backup blocks that have never been used.  RMAN, through Oracle version 9i and forward has performed null compression. 

Example : You have a tablespace having one datafile of size 100MB and out of 100MB only 50 MB is used. Then RMAN will backup only 50MB. 

NOTE:  Null Compression also applies to Standard Edition and SE ONE

2. Unused Block

From Oracle version 10.2 forward, RMAN skips reading, and backing up, any database blocks that are not currently allocated to a database object. This is regardless of whether those blocks had previously been allocated.  This behavior is reffered to as 'Unused Block Compression'. RMAN now creates more compact backups of datafiles, by skipping datafile blocks that are not currently allocated to a database object.  Skipping these unallocated data blocks, i.e., for a dropped table, where possible enables RMAN to back up datafiles using less space, and can make I/O more efficient.  No extra action is required on the part of the DBA to use this feature. 

Example : You have a tablespace having one datafile of size 100MB and out of 100MB, 50MB is used by the user tables. Then user dropped a table belonging to that tablespace which was of 25MB, with the new unused block compression on 25MB of the files is backed up. In this example if null compression is used then it would have backed up 50MB because null compression will consider the blocks that are formatted/ever used.

Unused Block Compression is done, if all of the following conditions apply:

+ The COMPATIBLE initialization parameter is set to 10.2 or higher

+ There are currently no guaranteed restore points defined for the database

+ The datafile is locally managed

+ The datafile is being backed up to a backup set as part of a full backup or a level 0 incremental backup

+ The backup set is being created on DISK

+ The backup is done to TAPE using "OSB" (Oracle Secure Backup)

+ The backup is done with ZDLRA
    

  Note:
  Unused block compression is NOT used if backup done to tape using a THIRD PARTY BACKUP SOFTWARE !  
  Unused block compression is ONLY used in Enterprise Edition.  
 

3. Binary Compression

Binary Compression can be done by specifying "AS COMPRESSED" clause in backup command, this compression is called as binary compression.

RMAN can apply a binary compression algorithm as it writes data to backup sets. This compression is similar to the compression provided by many tape vendors when backing up data to tape. But we cannot give exact percentage of compression. This binary compression algorithm can greatly reduce the space required for disk backup storage. It is typically 2x to 4x, and greater for text-intensive databases.

The command to take the compressed backup :

RMAN> backup as compressed backupset database;

 + There is some CPU overhead associated with compressing backup sets. If the database being backed up is running at or near its maximum load, you may find the overhead from using AS COMPRESSED BACKUPSET unacceptable. In most other circumstances, compressing backupsets saves enough disk space to be worth the CPU overhead. ---时间太慢

+ There is no special command to restore database from the compressed backupsets, the restore command will be the same as with uncompressed backups.
+ The restore from the compressed backpuset will take more time than uncompressed backupsets. 

In addition to the existing binary compression of backup in oracle 10G, RMAN 11G executable offers a wider range of compression levels with the Advanced Compression Option (ACO). The default compression algorithm setting is BASIC and does not require the Advanced Compression Option.

If, however, you have enabled the Oracle Database 11g Release 2 Advanced Compression Option, you can choose from the following compression levels:

LOW - Least impact on backup throughput and suited for environments where CPU resources are the limiting factor.
MEDIUM - Recommended for most environments. Good combination of compression ratios and speed
HIGH - Best suited for backups over slower networks where the limiting factor is network speed

NOTE: Only BASIC compression is allowed in Standard Edition 

 Compression can be used for backupset of datafile, archive log and controlfiles.  For example: 

RMAN> backup as compressed backupset archivelog all;
RMAN> backup as compressed backupset database;
RMAN> backup as compressed backupset current controlfile;


RMAN compress the backupset contents before writing to disk. No extra decompression steps are required during recovery for rman compressed backup;

To configure the compression algorithm:

RMAN> CONFIGURE COMPRESSION ALGORITHM '<alg_name>';

4. Various Compression Types:

For various compression types you can refer to V$RMAN_COMPRESSION_ALGORITHM

SQL> select ALGORITHM_NAME, ALGORITHM_DESCRIPTION, ALGORITHM_COMPATIBILITY from V$RMAN_COMPRESSION_ALGORITHM ;

ALGORITHM_NAME  ALGORITHM_DESCRIPTION                                        ALGORITHM_COMPATIB
--------------- ------------------------------------------------------------ ------------------
BZIP2           good compression ratio                                       9.2.0.0.0
BASIC           good compression ratio                                       9.2.0.0.0
LOW             maximum possible compression speed                           11.2.0.0.0
ZLIB            balance between speed and compression ratio                  11.0.0.0.0
MEDIUM          balance between speed and compression ratio                  11.0.0.0.0
HIGH            maximum possible compression ratio                           11.2.0.0.0

6 rows selected.

 5. Undo Block Compression/Optimization

Starting 11g, RMAN performs undo block optimization.  In backup undo optimization, RMAN excludes undo not needed for recovery of a backup, that is, for transactions that have been committed.    Undo optimization is only possible if:

  • This is a backup set backup
  • Full or incremental level 0
  • Not a validate
  • Backup piece version is 11.0 or above
  • User has not disabled undo optimization with:
    _undo_block_compression = FALSE
  • Backup is going to DISK or OSB tape
  • No Guaranteed Restore Point (This check is enabled from 11.2 onwards)

相关文章:

rman compress

级别 初始 备完 耗时 low 1804 3572 0:10 High 1812 3176 2:00 MEDIUM 1820 3288 0:13 BASIC 1828 3444 0:56 ---不如MEDIUM&#xff0c;时间还长 NO COMPRESS 1820 5924 0:5 R…...

创建一个Oracle版本的JDK的Docker镜像

背景说明 OpenJDK 和Oracle JDK 一般情况下我们选择OpenJDK&#xff0c;两者针对大部分场景都可以满足&#xff0c;有些地方例如反射技术获得某些包路径下的类对象等&#xff0c;有时候选择OpenJDK会导致空指针异常。 两者在底层实现方面有部分区别。 创建镜像 这里是Linux…...

Harmony OS DevEco Studio 如何导入第三方库(以lottie为例)?-- HarmonyOS自学2

在做鸿蒙开发时&#xff0c;离不开第三方库的引入 一.有哪些支持的Harmony OS的 第三方库&#xff1f; 第三方库下载地址&#xff1a; 1 tpc_resource: 三方组件资源汇总 2 OpenHarmony三方库中心仓 二. 如何加入到DevEco Studio工程 以 lottie为例 OpenHarmony-TPC/lot…...

JAVA数据导出为Excel

目录 一、导入依赖 二、使用的相关类 1、XSSFWorkbook 构造方法 创建表 操作表 保存表 样式和格式 日期处理 密码保护 其他 2、XSSFSheet 获取属性和信息 行操作 列操作 表的属性 合并单元格 保护表 页眉和页脚 注释 其它 3、XSSFRow 获取属性和信息 单…...

【数据结构与算法 | 灵神题单 | 快慢指针(链表)篇】力扣876, 2095, 234

1. 力扣876&#xff1a;链表的中间节点 1.1 题目&#xff1a; 给你单链表的头结点 head &#xff0c;请你找出并返回链表的中间结点。 如果有两个中间结点&#xff0c;则返回第二个中间结点。 示例 1&#xff1a; 输入&#xff1a;head [1,2,3,4,5] 输出&#xff1a;[3,4,…...

第十五届蓝桥杯图形化省赛题目及解析

第十五届蓝桥杯图形化省赛题目及解析 一. 单选题 1. 运行以下程序&#xff0c;角色会说( )? A、29 B、31 C、33 D、35 正确答案&#xff1a;C 答案解析&#xff1a; 重复执行直到m>n不成立&#xff0c;即重复执行直到m<n。所有当m小于或者 等于n时&…...

linux下NTP服务器实战(chrony软件)

linux下NTP服务器实战(chrony软件) 记录linux下NTP服务器搭建及相关管理操作&#xff0c;使用chrony软件包安装部署。相比ntp服务&#xff0c;Chrony服务适用于更高精度、更高稳定性、自动化等场景。 1. 安装 chrony 在大多数Linux发行版上&#xff0c;chrony可以通过包管理…...

Java设计模式之命令模式介绍和案例示范

一、命令模式简介 命令模式&#xff08;Command Pattern&#xff09;是一种行为型设计模式&#xff0c;它将请求封装为一个对象&#xff0c;从而使你可以用不同的请求对客户端进行参数化、对请求排队或记录日志&#xff0c;以及支持可撤销的操作。命令模式的核心思想是将发出请…...

Leetcode面试经典150题-74.搜索二维矩阵

解法都在代码里&#xff0c;不懂就留言或者私信 二分查找&#xff0c;比较简单 class Solution {/**解题思路&#xff1a;每一行有序、每一列也有序&#xff0c;只是整体不是严格有序的&#xff0c;那我们需要找一个点&#xff0c;只能往两个方向走&#xff0c;往一个方向走是…...

【数字集成电路与系统设计】基本的组合逻辑电路

目录 一、简单例子引入 1.1 端口声明 1.1.2 Verilog实现 1.1.3 Chisel实现 逐行解释 1.2 内部逻辑实现 1.2.1 Verilog实现 1.2.2 Chisel实现 Chisel 关键点解释 1.3 常用的硬件原语 二、Chisel主要数据类型介绍 2.1 数据类型 2.2 数据宽度 2.3 数据转换 2.4 运算…...

11. 建立你的第一个Web3项目

11. 建立你的第一个Web3项目 在这一部分&#xff0c;我们将带你一步步地建立一个简单的Web3项目&#xff0c;从环境搭建到智能合约的创建与部署&#xff0c;再到开发一个去中心化应用&#xff08;dApp&#xff09;并与智能合约交互。这是你迈向Web3开发的第一步。 1. 环境搭建…...

衡石分析平台使用手册-容器部署

容器部署​ 本文介绍如何在容器上部署 HENGSHI SENSE&#xff0c;以及部署后如何进行版本升级和数据备份。 部署前准备工作​ 单机部署前&#xff0c;请完成如下准备工作。 1.检查 docker 的环境。需要满足 Docker 版本 > 17.09安装 docker-compose。 2.获取并导入离线…...

静态库,动态库以及makefile基础

一.静态&#xff08;链接&#xff09;库 libfun.a 静态链接进可执行程序 可执行程序偏大 运行时只需要可执行程序即可 生成静态库步骤 gcc -c fun.c -o fun.o ar rcv libfun.a fun.o //需要用.o文件生成数据库 运行 gcc main.c libfun.a 二.动态库 libfun.so 动…...

Python基础语法(1)上

常量和表达式 我们可以把 Python 当成一个计算器&#xff0c;来进行一些算术运算。 print(1 2 - 3) print(1 2 * 3) print(1 2 / 3) 这里我们可能会有疑问&#xff0c;为什么不是1.6666666666666667呢&#xff1f; 其实在编程中&#xff0c;一般没有“四舍五入”这样的规则…...

使用 Python/java/go做一个微信机器人

E云是一套完整的的第三方服务平台&#xff0c;包含微信API服务、企微API服务、SCRM系统定制、企微系统定制、服务类软件定制等模块&#xff0c;本文档主要讲述个微API服务相关&#xff0c;以下简称API&#xff0c;它能处理用户微信中的各种事件&#xff0c;提供了开发者与个微对…...

【北京迅为】iTOP-i.MX6开发板使用手册第四部分固件编译第十四章非设备树Android4.4系统编译

可根据用户需求更换&#xff0c;百变定制&#xff0c;高端产品无忧&#xff01; 迅为IMX6Q兼容四核商业级 、双核商业级、四核工业级 、更可提供i.MX6Q家族PLUS版本核心板。 核心板采用十层PCB沉金盲埋设计&#xff0c;更能保证电磁兼容与系统稳定。 公众号&#xff1a;迅为电…...

测评造假?Mistral首个多模态模型Pixtral 12B发布

测评造假&#xff1f;Mistral首个多模态模型Pixtral 12B发布&#xff01; 近日&#xff0c;法国人工智能&#xff08;AI&#xff09;初创公司Mistral于9月11日宣布推出其首款多模态AI大模型——Pixtral 12B&#xff0c;成功吸引了全球科技界的广泛关注。这款集图像与文本处理能…...

【Java-简单练习题】

1.”AABBBCCC“>>"A2B3C3" public class Test6 {public static void main(String[] args) {String ns "AABBBCCCC";String retcompress(ns);System.out.println(ret);}public static String compress(String str) {StringBuilder ret new StringB…...

Notepad++ 下载安装教程

目录 1.下教程 2.安装教程 1.下教程 Downloads | Notepad (notepad-plus-plus.org) 进入下载地址后选择最新版点击连接 点击链接后&#xff0c;向下滑动&#xff0c;下载适合自己电脑版本的安装包 这里大家没有梯子可能打不开页面&#xff0c;可以直接从本文开头下载。 2.安…...

shader 案例学习笔记之smoothstep函数

参考&#xff1a;smoothstep 用来生成0-1的平滑过渡值 smoothstep函数源码实现&#xff1a; float smoothstep(float t1, float t2, float x) {// Scale, bias and saturate x to 0..1 rangex clamp((x - t1) / (t2 - t1), 0.0, 1.0); // Evaluate polynomialreturn x * x *…...

【SRC漏洞挖掘系列】第02期:XSS与CSRF——Web世界的“偷家”艺术

上期回顾&#xff1a;我们扒光了目标的资产&#xff08;情报收集&#xff09;。本期开始&#xff0c;我们要对这些目标进行“物理超度”——哦不&#xff0c;是合法的安全测试。今天的主角是 Web 漏洞界的“哼哈二将”&#xff1a;XSS​ 和 CSRF。一、为什么这俩货这么重要&…...

构建本地化多链资产追踪器:从API聚合到数据可视化实践

1. 项目概述与核心价值最近在折腾一个挺有意思的小工具&#xff0c;起因是发现很多朋友在管理自己的数字资产时&#xff0c;尤其是那些基于区块链的Token&#xff0c;常常会陷入一种“信息孤岛”的状态。钱包地址散落在各处&#xff0c;不同链上的资产变动需要一个个去浏览器查…...

稀疏矩阵运算全解析:从基础算术到高效求解与性能调优

1. 稀疏矩阵运算操作全景解析在数值计算、机器学习、图形学乃至各类工程仿真领域&#xff0c;处理大规模数据时&#xff0c;我们总会遇到一个“熟悉的陌生人”——稀疏矩阵。它不像密集矩阵那样&#xff0c;每个元素都占据着内存空间&#xff0c;而是像一个精打细算的管家&…...

ESUM模型:统一处理多拜耳模式的去马赛克技术

1. 去马赛克技术演进与多拜耳模式挑战去马赛克&#xff08;Demosaicing&#xff09;是数字图像处理中一项基础而关键的技术&#xff0c;它负责将传感器捕获的原始马赛克数据转换为全彩色图像。传统单拜耳&#xff08;Single-Bayer&#xff09;模式采用RGGB排列&#xff0c;每个…...

Agnix:构建AI原生操作系统,实现智能体即应用新范式

1. 项目概述&#xff1a;从“智能体”到“操作系统”的范式跃迁最近在开源社区里&#xff0c;一个名为agent-sh/agnix的项目引起了我的注意。乍一看这个名字&#xff0c;很容易联想到当下火热的“AI智能体”&#xff08;Agent&#xff09;&#xff0c;但深入研究后你会发现&…...

如何使用witr快速定位占用端口的神秘进程?完整指南

如何使用witr快速定位占用端口的神秘进程&#xff1f;完整指南 【免费下载链接】witr Why is this running? 项目地址: https://gitcode.com/GitHub_Trending/wi/witr 你是否曾经遇到过端口被占用却不知道是哪个进程在捣乱的情况&#xff1f;&#x1f62b; 想要启动Web…...

XUnity Auto Translator:3分钟为Unity游戏添加多语言支持的终极方案

XUnity Auto Translator&#xff1a;3分钟为Unity游戏添加多语言支持的终极方案 【免费下载链接】XUnity.AutoTranslator 项目地址: https://gitcode.com/gh_mirrors/xu/XUnity.AutoTranslator 你是否曾经因为语言障碍而无法畅玩心爱的Unity游戏&#xff1f;或者作为游…...

2位相位可重构天线设计与波束控制技术解析

1. 2位相位可重构天线技术概述相位可重构天线作为现代无线通信系统的关键组件&#xff0c;其核心价值在于能够动态调整辐射波束的方向和形状。这种能力使其成为5G/6G通信、雷达系统和卫星通信等场景中的理想选择。2位相位可重构天线通过4种离散相位状态&#xff08;00、01、10、…...

MemoryOS:开源时序知识图谱AI记忆系统

AI的记忆困局&#xff1a;为什么需要"时序"和"知识图谱"&#xff1f;用过ChatGPT或任何AI助手的人大概都有过这样的体验&#xff1a;昨天告诉AI自己住在北京&#xff0c;今天问它"我住哪儿"&#xff0c;它可能还能答对&#xff1b;但是过了两周&…...

英雄联盟LCU自动化工具:3步打造你的专属智能游戏伴侣

英雄联盟LCU自动化工具&#xff1a;3步打造你的专属智能游戏伴侣 【免费下载链接】League-Toolkit An all-in-one toolkit for LeagueClient. Gathering power &#x1f680;. 项目地址: https://gitcode.com/gh_mirrors/le/League-Toolkit 还在为英雄联盟中重复繁琐的操…...