ITPub博客

首页 > 数据库 > Oracle > rman备份遇到的设置rman导致数据库变慢的原因

rman备份遇到的设置rman导致数据库变慢的原因

原创 Oracle 作者:ls1073 时间:2016-09-04 22:53:54 0 删除 编辑

OS:  aix 5.3

DB: Oracle 10..2.0.1 RAC数据库相关情况

目前情况:2016年8月23日在********部署rman备份脚本,部署时间是凌晨3点到4点,部署完成之后发现定时脚本执行期间数据库变慢,造成业务无法处理的情况的发生。情况发生后,暂停数据库rman备份脚本,结果当晚未发生数据库变慢的情况。通过取执行脚本的时间段awr报告发现数据库rman消耗性能极大,现需找出原因并且继续部署rman备份。

 

凌晨3点至4点的awr报告


由此可以发现当时的数据库情况是极其卡顿的。查看当时的alert日志


由此发现alert日志无报错。


查看当时的rman部署脚本无错误。据此可以推测是操作系统的内存参数设置可能不合理以及cup不足的情况导致。
查看操作系统的相关参数:
#lsps -a
Page Space      Physical Volume   Volume Group    Size %Used Active  Auto  Type
hd6             hdisk0            rootvg       32768MB     5   yes   yes    lv
# lsattr -El sys0 -a realmem
realmem 16318464 Amount of usable physical memory in Kbytes False
# svmon -G
               size      inuse       free        pin    virtual
memory      4079616    4064819      14797     655830    2596673
pg space    8388608     370020


               work       pers       clnt
pin          654394          0       1436
in use      2424189          0    1640630


PageSize   PoolSize      inuse       pgsp        pin    virtual
s   4 KB          -    3974259     369284     599862    2505665
m  64 KB          -       5660         46       3498       5688
# 
# prtconf
System Model: IBM,9133-55A
Machine Serial Number: 0652EEH
Processor Type: PowerPC_POWER5
Number Of Processors: 8
Processor Clock Speed: 1648 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 1 06-52EEH
Memory Size: 15936 MB
Good Memory Size: 15936 MB
Platform Firmware level: SF240_320
Firmware Version: IBM,SF240_320
Console Login: enable
Auto Restart: true
Full Core: false
 
Network Information
        Host Name: qdcercdb1
        IP Address: 110.10.1.2
        Sub Netmask: 255.255.255.0
        Gateway: 110.10.1.1
        Name Server: 
        Domain Name: 
 
Paging Space Information
        Total Paging Space: 32768MB
        Percent Used: 5%
 
Volume Groups Information
============================================================================== 
rootvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk0            active            546         7           00..00..00..00..07
hdisk1            active            546         23          00..00..00..00..23
============================================================================== 
 
ora1vg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk2            active            399         3           00..00..00..00..03
============================================================================== 
 
datavg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk3            active            3662        396         00..00..00..00..396
============================================================================== 
 
backupvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk4            active            557         56          00..00..00..00..56
============================================================================== 
 
INSTALLED RESOURCE LIST


The following resources are installed on the machine.
+/- = Added or deleted from Resource List.
*   = Diagnostic support not available.
        
  Model Architecture: chrp
  Model Implementation: Multiple Processor, PCI bus
        
+ sys0                                                                          System Object
+ sysplanar0                                                                    System Planar
* vio0                                                                          Virtual I/O Bus
* vsa1             U787B.001.DNWFZT3-P1-T2                                      LPAR Virtual Serial Adapter
* vty1             U787B.001.DNWFZT3-P1-T2-L0                                   Asynchronous Terminal
* vsa0             U787B.001.DNWFZT3-P1-T1                                      LPAR Virtual Serial Adapter
* vty0             U787B.001.DNWFZT3-P1-T1-L0                                   Asynchronous Terminal
* pci2             U787B.001.DNWFZT3-P1                                         PCI Bus
* pci7             U787B.001.DNWFZT3-P1                                         PCI Bus
+ ent0             U787B.001.DNWFZT3-P1-T9                                      2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
+ ent1             U787B.001.DNWFZT3-P1-T10                                     2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
* pci8             U787B.001.DNWFZT3-P1                                         PCI Bus
+ usbhc0           U787B.001.DNWFZT3-P1                                         USB Host Controller (33103500)
+ usbhc1           U787B.001.DNWFZT3-P1                                         USB Host Controller (33103500)
* pci9             U787B.001.DNWFZT3-P1                                         PCI Bus
+ ent2             U787B.001.DNWFZT3-P1-C1-T1                                   10/100/1000 Base-TX PCI-X Adapter (14106902)
* pci10            U787B.001.DNWFZT3-P1                                         PCI Bus
* pci11            U787B.001.DNWFZT3-P1-C2                                      PCI Bus
+ lai0             U787B.001.DNWFZT3-P1-C2-T1                                   GXT135P Graphics Adapter
* pci1             U787B.001.DNWFZT3-P1                                         PCI Bus
* pci3             U787B.001.DNWFZT3-P1                                         PCI Bus
+ sisscsia0        U787B.001.DNWFZT3-P1                                         PCI-X Dual Channel Ultra320 SCSI Adapter
+ scsi0            U787B.001.DNWFZT3-P1-T14                                     PCI-X Dual Channel Ultra320 SCSI Adapter bus
+ hdisk0           U787B.001.DNWFZT3-P1-T14-L5-L0                               16 Bit LVD SCSI Disk Drive (73400 MB)
+ hdisk1           U787B.001.DNWFZT3-P1-T14-L8-L0                               16 Bit LVD SCSI Disk Drive (73400 MB)
+ ses0             U787B.001.DNWFZT3-P1-T14-L15-L0                              SCSI Enclosure Services Device
+ scsi1            U787B.001.DNWFZT3-P1-T15                                     PCI-X Dual Channel Ultra320 SCSI Adapter bus
* pci5             U787B.001.DNWFZT3-P1                                         PCI Bus
+ fcs1             U787B.001.DNWFZT3-P1-C4-T1                                   FC Adapter
* fcnet1           U787B.001.DNWFZT3-P1-C4-T1                                   Fibre Channel Network Protocol Device
* fscsi1           U787B.001.DNWFZT3-P1-C4-T1                                   FC SCSI I/O Controller Protocol Device
* dac1             U787B.001.DNWFZT3-P1-C4-T1-W201400A0B82967C0                 1814     DS4700 Disk Array Controller
* rmt0             U787B.001.DNWFZT3-P1-C4-T1-W2002000E111057D4-L0              Other FC SCSI Tape Drive
* pci4             U787B.001.DNWFZT3-P1                                         PCI Bus
* ide0             U787B.001.DNWFZT3-P1-T16                                     ATA/IDE Controller Device
+ cd0              U787B.001.DNWFZT3-P4-D2                                      IDE DVD-ROM Drive
* pci6             U787B.001.DNWFZT3-P1                                         PCI Bus
+ sa0              U787B.001.DNWFZT3-P1-C5-T1                                   IBM 8-Port EIA-232/RS-422A (PCI) Adapter
+ tty0             U787B.001.DNWFZT3-P1-C5-T1-L0                                Asynchronous Terminal
* pci0             U787B.001.DNWFZT3-P1                                         PCI Bus
+ fcs0             U787B.001.DNWFZT3-P1-C3-T1                                   FC Adapter
* fcnet0           U787B.001.DNWFZT3-P1-C3-T1                                   Fibre Channel Network Protocol Device
* fscsi0           U787B.001.DNWFZT3-P1-C3-T1                                   FC SCSI I/O Controller Protocol Device
* dac0             U787B.001.DNWFZT3-P1-C3-T1-W201500A0B82967C0                 1814     DS4700 Disk Array Controller
+ L2cache0                                                                      L2 Cache
+ mem0                                                                          Memory
+ proc0                                                                         Processor
+ proc2                                                                         Processor
+ proc4                                                                         Processor
+ proc6                                                                         Processor
+ proc8                                                                         Processor
+ proc10                                                                        Processor
+ proc12                                                                        Processor
+ proc14                                                                        Processor
* mouse0           U787B.001.DNWFZT3-P1-T8-L1                                   USB mouse
* kbd0             U787B.001.DNWFZT3-P1-T8-L1                                   USB keyboard
+ hdisk2           U787B.001.DNWFZT3-P1-C3-T1-W201500A0B82967C0-L0              1814     DS4700 Disk Array Device
+ hdisk4           U787B.001.DNWFZT3-P1-C3-T1-W201500A0B82967C0-L2000000000000  1814     DS4700 Disk Array Device
+ hdisk3           U787B.001.DNWFZT3-P1-C3-T1-W201500A0B82967C0-L1000000000000  1814     DS4700 Disk Array Device
# 


# lspv
hdisk0          00048905ad7d08cb                    rootvg          active
hdisk1          00048905df1cec46                    rootvg          active
hdisk2          00048905e9e32252                    ora1vg          active
hdisk3          00048905e9e5b340                    datavg          concurrent
hdisk4          00048905b52b66bb                    backupvg        active
# lsvg backupvg
VOLUME GROUP:       backupvg                 VG IDENTIFIER:  000489050000d60000000156b52c3550
VG STATE:           active                   PP SIZE:        1024 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      557 (570368 megabytes)
MAX LVs:            256                      FREE PPs:       56 (57344 megabytes)
LVs:                2                        USED PPs:       501 (513024 megabytes)
OPEN LVs:           2                        QUORUM:         2
TOTAL PVs:          1                        VG DESCRIPTORS: 2
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         1                        AUTO ON:        yes
MAX PPs per VG:     32512                                     
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 1024 kilobyte(s)         AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable 
# 


Topas Monitor for host:    qdcercdb1            EVENTS/QUEUES    FILE/TTY
Tue Aug 30 17:00:07 2016   Interval:  2         Cswitch    3309  Readch   703.4K
                                                Syscall    9788  Writech   17641
Kernel    0.9   |#                           |  Reads       469  Rawin         0
User     14.7   |#####                       |  Writes      164  Ttyout      333
Wait      0.1   |#                           |  Forks        26  Igets         0
Idle     84.3   |########################    |  Execs        26  Namei      1114
                                                Runqueue    1.0  Dirblk        0
Network  KBPS   I-Pack  O-Pack   KB-In  KB-Out  Waitqueue   0.0
en2      82.6    140.4   147.8    34.2    48.4
lo0      33.7      8.4     8.4    16.9    16.9  PAGING           MEMORY
en0      12.1     42.2    34.7     5.4     6.7  Faults     4166  Real,MB   15936
en1       0.2      1.5     1.0     0.1     0.1  Steals        0  % Comp     60.4
                                                PgspIn        0  % Noncomp  40.1
Disk    Busy%     KBPS     TPS KB-Read KB-Writ  PgspOut       0  % Client   40.1
hdisk3    5.4     65.0     9.4    33.7    31.3  PageIn        0
dac1      0.0     65.0     9.4    33.7    31.3  PageOut       0  PAGING SPACE
cd0       0.0      0.0     0.0     0.0     0.0  Sios          0  Size,MB   32768
dac0      0.0      0.0     0.0     0.0     0.0                   % Used      4.9
dac0utm   0.0      0.0     0.0     0.0     0.0  NFS (calls/sec)  % Free     95.0
hdisk1    0.0      0.0     0.0     0.0     0.0  ServerV2       0
hdisk0    0.0      0.0     0.0     0.0     0.0  ClientV2       0   Press:
hdisk4    0.0      0.0     0.0     0.0     0.0  ServerV3       0   "h" for help
hdisk2    0.0      0.0     0.0     0.0     0.0  ClientV3       0   "q" to quit
dac1utm   0.0      0.0     0.0     0.0     0.0


Name            PID  CPU%  PgSp Owner
oracle       479480  13.3   5.7 oracle
oracle       594296   0.3   5.7 oracle
oracle       508364   0.3   3.9 oracle
gsclvmd      377090   0.2   1.1 root  
oracle       491536   0.2   4.7 oracle
crsd.bin      94260   0.1  86.7 root  
oracle       364624   0.1   6.0 oracle
oracle       286910   0.1  18.4 oracle
hagsd        278862   0.0  16.3 root  
ocssd.bi     213460   0.0  26.7 oracle
sh           172226   0.0   0.6 root  
oracle       581746   0.0   5.9 oracle
oracle       516566   0.0   5.9 oracle


# df -g    
Filesystem    GB blocks      Free %Used    Iused %Iused Mounted on
/dev/hd4           1.00      0.64   37%     2583     2% /
/dev/hd2           3.00      1.41   53%    38123    11% /usr
/dev/hd9var        2.00      1.65   18%      949     1% /var
/dev/hd3           3.00      2.06   32%      592     1% /tmp
/dev/fwdump        0.12      0.12    1%        4     1% /var/adm/ras/platform
/dev/hd1           1.00      0.99    1%       94     1% /home
/proc                 -         -    -         -     -  /proc
/dev/hd10opt       3.00      2.92    3%     2591     1% /opt
/dev/fslv00       20.00      3.09   85%   344498    33% /oracle
/dev/fslv01       98.75     13.30   87%      559     1% /arch
/dev/fslv02      500.00    429.76   15%        9     1% /backup
# ls -lrt /arch
total 807848
-rw-r--r--   1 oracle   oinstall  413562880 Oct 31 2007  backup02.tar
drwxrwxrwx   3 oracle   oinstall       4096 Aug 26 04:03 backup
drwxr-xr-x   2 oracle   oinstall      40960 Aug 30 14:43 qdcerco
# ls -lrt /backup
total 147152240
drwxr-xr-x   2 oracle   oinstall        256 Aug 23 10:14 lost+found
-rw-r-----   1 oracle   oinstall 74748534784 Aug 24 00:13 orcl_inc_2kre0ofk_1_1
-rw-r-----   1 oracle   oinstall  321904640 Aug 25 04:03 orcl_inc_2mre3qtk_1_1
-rw-r-----   1 oracle   oinstall  113664000 Aug 26 04:03 orcl_inc_2pre6f9m_1_1
-rw-r-----   1 oracle   oinstall  106930176 Aug 26 04:03 orcl_inc_2qre6f9m_1_1
-rw-r-----   1 oracle   oinstall   50880512 Aug 26 04:03 orcl_inc_2ore6f9m_1_1
# 
# smtctl


This system is SMT capable.


SMT is currently enabled.


SMT boot mode is not set.
SMT threads are bound to the same physical processor.


proc0 has 2 SMT threads.
Bind processor 0 is bound with proc0
Bind processor 1 is bound with proc0




proc2 has 2 SMT threads.
Bind processor 2 is bound with proc2
Bind processor 3 is bound with proc2




proc4 has 2 SMT threads.
Bind processor 4 is bound with proc4
Bind processor 5 is bound with proc4




proc6 has 2 SMT threads.
Bind processor 6 is bound with proc6
Bind processor 7 is bound with proc6




proc8 has 2 SMT threads.
Bind processor 8 is bound with proc8
Bind processor 9 is bound with proc8




proc10 has 2 SMT threads.
Bind processor 10 is bound with proc10
Bind processor 11 is bound with proc10




proc12 has 2 SMT threads.
Bind processor 12 is bound with proc12
Bind processor 13 is bound with proc12




proc14 has 2 SMT threads.
Bind processor 14 is bound with proc14
Bind processor 15 is bound with proc14


# 
# bindprocessor -q
The available processors are:  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15----可用逻辑cpu个数
# 
# bindprocessor -q
The available processors are:  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# pmcycles -m
CPU 0 runs at 1648 MHz
CPU 1 runs at 1648 MHz
CPU 2 runs at 1648 MHz
CPU 3 runs at 1648 MHz
CPU 4 runs at 1648 MHz
CPU 5 runs at 1648 MHz
CPU 6 runs at 1648 MHz
CPU 7 runs at 1648 MHz
CPU 8 runs at 1648 MHz
CPU 9 runs at 1648 MHz
CPU 10 runs at 1648 MHz
CPU 11 runs at 1648 MHz
CPU 12 runs at 1648 MHz
CPU 13 runs at 1648 MHz
CPU 14 runs at 1648 MHz
CPU 15 runs at 1648 MHz
# prtconf|grep Processors
Number Of Processors: 8-------物理cpu


经上面参数的查看可以发现cpu的逻辑与物理cpu,接下来继续查看数据库方面的设置参数。
#vmo -a
        cpu_scale_memp = 8
 data_stagger_interval = 161
                 defps = 1
   force_relalias_lite = 0
             framesets = 2
             htabscale = n/a
     kernel_heap_psize = 4096
          kernel_psize = 16777216
  large_page_heap_size = 0
          lgpg_regions = 0
             lgpg_size = 0
       low_ps_handling = 1
       lru_file_repage = 1
     lru_poll_interval = 10
             lrubucket = 131072
            maxclient% = 80
               maxfree = 1088
               maxperm = 3096448
              maxperm% = 80
                maxpin = 3291373
               maxpin% = 80
       mbuf_heap_psize = 65536
       memory_affinity = 1
         memory_frames = 4079616
         memplace_data = 2
  memplace_mapped_file = 2
memplace_shm_anonymous = 2
    memplace_shm_named = 2
        memplace_stack = 2
         memplace_text = 2
memplace_unmapped_file = 2
              mempools = 2
               minfree = 960
               minperm = 774111
              minperm% = 20
             nokilluid = 0
               npskill = 65536
             npsrpgmax = 524288
             npsrpgmin = 393216
           npsscrubmax = 524288
           npsscrubmin = 393216
               npswarn = 262144
      num_spec_dataseg = 0
             numpsblks = 8388608
     page_steal_method = 0
          pagecoloring = n/a
       pinnable_frames = 3423668
 pta_balance_threshold = n/a
   relalias_percentage = 0
              rpgclean = 0
            rpgcontrol = 2
                 scrub = 0
            scrubclean = 0
 soft_min_lgpgs_vmpool = 0
      spec_dataseg_int = 512
      strict_maxclient = 1
        strict_maxperm = 0
              v_pinshm = 0
  vm_modlist_threshold = -1
       vmm_fork_policy = 1
    vmm_mpsize_support = 1
# aioo -a
               minservers = 1
               maxservers = 10
                  maxreqs = 4096
               fsfastpath = 0


经过上面的参数查看,发现maxperm% = 80这个参数设置过大,导致文件系统占用大量内存。
修改这个参数之前需要先把minperm% = 20 这个参数调小。
解决方式:
#vmo -p -o minperm%=5
#vmo -p -o maxperm%=20
#vmo -p -o maxclient%=20
调整完成之后重新部署rman备份,问题解决。




来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30134661/viewspace-2124461/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-02-10

  • 博文量
    7
  • 访问量
    6783