zoukankan      html  css  js  c++  java
  • RMAN性能监控

    RMAN性能调优相关视图

    视图名 说明
    v$rman_backup_job_details 备份job信息
    v$backup_async_io 当前正在运行的、最近完成的备份和restore操作的rman异步I/O性能信息
    v$backup_sync_io 当前正在运行的、最近完成的备份和restore操作的rman同步I/O性能信息
    v$process 当前活跃进程
    v$session 当前活跃会话信息
    v$session_longops 可以显示rman备份、还原和恢复进度
    v$recovery_progress rman操作进度
    v$session_wait 显示会话正在等待的事件、资源信息

    1.找出执行rman的数据库会话

    复制代码
    SQL> SELECT s.sid, s.serial#, p.spid, s.client_info
      2    FROM v$process p, v$session s
      3   WHERE p.addr = s.paddr
      4     AND s.client_info LIKE '%rman%';
    
           SID    SERIAL# SPID                     CLIENT_INFO
    ---------- ---------- ------------------------ ----------------------------------------------------------------
            69        153 13356                    rman channel=ORA_DISK_1
    
    SQL> 
    复制代码

    在执行rman操作时候,可以使用"set command id"来标识rman会话进程

    RMAN> run{
    2> allocate channel d1 type disk;
    3> set command id to 'my_session';
    4> backup database;
    5> }
    复制代码
    SQL> SELECT b.sid, b.serial#, a.spid, b.client_info
      2    FROM v$process a, v$session b
      3   WHERE a.addr = b.paddr
      4     AND b.client_info LIKE '%rman%';
    
           SID    SERIAL# SPID                     CLIENT_INFO
    ---------- ---------- ------------------------ ----------------------------------------------------------------
            69        157 13434                    id=my_session,rman channel=d1
    
    SQL>  
    复制代码

     2.查看rman job详细信息:

    复制代码
    SQL> select session_recid,
      2         input_bytes_per_sec_display,
      3         output_bytes_per_sec_display,
      4         time_taken_display,
      5         end_time
      6    from v$rman_backup_job_details
      7   order by end_time;
    
    SESSION_RECID INPUT_BYTES_PER_SEC_ OUTPUT_BYTES_PER_SEC TIME_TAKEN_DISPLAY             END_TIME
    ------------- -------------------- -------------------- ------------------------------ ------------------------------
                1     3.09M                3.12M            00:00:03                       17-JUN-15
                3   178.12K              122.60K            05:38:23                       17-JUN-15
               27   107.93M               75.97M            00:00:17                       23-JUN-15
               42    64.91M               50.01M            00:00:37                       25-JUN-15
               51   109.27M               76.85M            00:00:17                       25-JUN-15
               57   109.27M               76.85M            00:00:17                       25-JUN-15
               90    43.96M               31.23M            00:02:10                       29-JUN-15
               98    19.74M               14.03M            00:03:13                       29-JUN-15
    
    8 rows selected.
    
    SQL> 
    复制代码

     3.查看rman操作的进度

    复制代码
    select s.client_info,
           sl.opname,
           sl.message,
           sl.sid,
           sl.serial#,
           p.spid,
           sl.sofar,
           sl.totalwork,
           round(sl.sofar / sl.totalwork * 100, 2) "% Complete"
      from v$session_longops sl, v$session s, v$process p
     where p.addr = s.paddr
       and sl.sid = s.sid
       and sl.serial# = s.serial#
       and opname LIKE 'RMAN%'
       and opname NOT LIKE '%aggregate%'
       and totalwork != 0
       and sofar <> totalwork;
    复制代码

    如果没有开启I/O slaves,rman只是使用share pool。

    如果开启了I/O slaves进行rman备份(设置了dbwr_io_slaves或backup_tape_io_slaves),需要考虑large pool的大小,因为rman会使用large pool。

    Oracle官方建议: large_pool_size = num_of_allocated_channels * (16 MB + (4 * size_of_tape_buffer ))

    RMAN的media recovery默认会根据cpu_count参数的值,开启并行恢复。

  • 相关阅读:
    equals比较对象
    解决打包时出现的Failed to verify bitcode
    苹果的MDM简介
    unable to boot the simulator,无法启动模拟器已解决
    利用NSCalendar类实现日期的比较
    服务器开启https协议
    解决NSTimer存在的内存泄漏的问题
    ipad和iphone的适配
    集成shareSDK错误总结(新浪微博)
    AFN解析器里的坑
  • 原文地址:https://www.cnblogs.com/wangchaoyuana/p/7530445.html
Copyright © 2011-2022 走看看