`

(转)11gR2新特性:Heavy swapping observed on system in last 5 mins

阅读更多
http://www.oracledatabase12g.com/archives/11gr2-dbrm-collect-swap-info.html

在11gR2中DBRM(database resource manager,11gR2中新的后台进程,见《Learning 11g New Background Processes》)会在Alert.log告警日志中反映OS操作系统最近5分钟是否有剧烈的swap活动了, 具体的日志如下:



WARNING: Heavy swapping observed on system in last 5 mins.
pct of memory swapped in [3.07%] pct of memory swapped out [4.44%].
Please make sure there is no memory pressure and the SGA and PGA
are configured correctly. Look at DBRM trace file for more details.

进一步诊断可以观察DBRM后台进程的trace:



[oracle@vrh2 trace]$ cat VPROD2_dbrm_5466.trc
Trace file /s01/orabase/diag/rdbms/vprod/VPROD2/trace/VPROD2_dbrm_5466.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORACLE_HOME = /s01/orabase/product/11.2.0/dbhome_1
System name:    Linux
Node name:      vrh2.oracle.com
Release:        2.6.32-200.13.1.el5uek
Version:        #1 SMP Wed Jul 27 21:02:33 EDT 2011
Machine:        x86_64
Instance name: VPROD2
Redo thread mounted by this instance: 2
Oracle process number: 7
Unix process pid: 5466, image: oracle@vrh2.oracle.com (DBRM)

*** 2011-12-29 22:08:14.627
*** SESSION ID:(165.1) 2011-12-29 22:08:14.627
*** CLIENT ID:() 2011-12-29 22:08:14.627
*** SERVICE NAME:() 2011-12-29 22:08:14.627
*** MODULE NAME:() 2011-12-29 22:08:14.627
*** ACTION NAME:() 2011-12-29 22:08:14.627

kgsksysstop: blocking mode (2) timestamp: 1325214494612191
kgsksysstop: successful
kgsksysresume: successful

*** 2011-12-29 22:08:43.869
PQQ: Active Services changed
PQQ: Old service table
SvcIdx  SvcId Active ActDop
     5      5      1      0
     6      6      1      0
PQQ: New service table
SvcIdx  SvcId Active ActDop
     1      1      1      0
     2      2      1      0
     5      5      1      0
     6      6      1      0
2012-01-02 01:49:39.805820 : GSIPC:KSXPCB: msg 0x9bc353f0 status 34, type 12, dest 1, rcvr 0

*** 2012-01-02 01:49:54.509
PQQ: Skipping service checks
Trace file /s01/orabase/diag/rdbms/vprod/VPROD2/trace/VPROD2_dbrm_5466.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORACLE_HOME = /s01/orabase/product/11.2.0/dbhome_1
System name:    Linux
Node name:      vrh2.oracle.com
Release:        2.6.32-200.13.1.el5uek
Version:        #1 SMP Wed Jul 27 21:02:33 EDT 2011
Machine:        x86_64
Instance name: VPROD2
Redo thread mounted by this instance: 2
Oracle process number: 7
Unix process pid: 5466, image: oracle@vrh2.oracle.com (DBRM)

*** 2012-01-03 03:05:54.518
*** SESSION ID:(165.1) 2012-01-03 03:05:54.518
*** CLIENT ID:() 2012-01-03 03:05:54.518
*** SERVICE NAME:() 2012-01-03 03:05:54.518
*** MODULE NAME:() 2012-01-03 03:05:54.518
*** ACTION NAME:() 2012-01-03 03:05:54.518

PQQ: Skipping service checks
kgsksysstop: blocking mode (2) timestamp: 1325577954530079
kgsksysstop: successful
kgsksysresume: successful

*** 2012-01-03 03:05:59.270
PQQ: Active Services changed
PQQ: Old service table
SvcIdx  SvcId Active ActDop
     5      5      1      0
     6      6      1      0
PQQ: New service table
SvcIdx  SvcId Active ActDop
     1      1      1      0
     2      2      1      0
     5      5      1      0
     6      6      1      0
PQQ: Checking service limits

*** 2012-01-07 02:06:51.856
PQQ: Skipping service checks
PQQ: Checking service limits

*** 2012-01-08 23:12:11.302
PQQ: Skipping service checks
Heavy swapping observed in last 5 mins:    [pct of total memory][bytes]

*** 2012-01-09 22:39:51.619
total swpin [ 3.07%][124709K], total swpout [ 4.44%][180120K]
vm stats captured every 30 secs for last 5 mins:
swpin:                 swpout: 
[ 0.27%][     11096K]  [ 0.25%][     10451K]
[ 0.27%][     11240K]  [ 0.29%][     12000K]
[ 0.29%][     12001K]  [ 0.02%][       853K]
[ 0.16%][      6849K]  [ 0.02%][       966K]
[ 0.53%][     21604K]  [ 0.09%][      4031K]
[ 0.10%][      4415K]  [ 0.03%][      1414K]
[ 0.43%][     17808K]  [ 0.37%][     15016K]
[ 0.64%][     25972K]  [ 1.61%][     65515K]
[ 0.26%][     10560K]  [ 0.88%][     36051K]
[ 0.07%][      3164K]  [ 0.83%][     33823K]

可以看到dbrm收集到了短期内的swapin和swapout数据,这样便于我们诊断由swap造成的性能或者hang问题。



解决OS 系统严重swap的一些思路:

1.  诊断是否存在内存泄露的进程,解决内存泄露
2.  调优SGA/PGA ,减少oracle对内存的占用
3.  利用  echo 3 > /proc/sys/vm/drop_caches 命令可以暂时释放一些cache的内存
4. 调整系统VM内存管理参数, 例如Linux上sysctl.conf中的以下几个参数

vm.min_free_kbytes   :Raising the value in /proc/sys/vm/min_free_kbytes will cause the system to start reclaiming memory at an earlier time than it would have before.

vm.vfs_cache_pressure :        At the default value of vfs_cache_pressure = 100 the kernel will attempt to reclaim dentries and inodes at a “fair” rate with respect to pagecache and swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel to prefer to retain dentry and inode caches. Increasing vfs_cache_pressure beyond 100 causes the kernel to prefer to reclaim dentries and inodes.

vm.swappiness  : default 60 ;Apparently /proc/sys/vm/swappiness on Red Hat Linux allows the admin to tune how aggressively the kernel swaps out processes’ memory. Decreasing the  swappiness setting may result in improved Directory performance as the kernel
holds more of the server process in memory longer before swapping it out.

设置以下值,减少out of memory的可能性:

# Oracle-Validated setting for vm.min_free_kbytes is 51200 to avoid OOM killer
vm.min_free_kbytes = 51200
#vm.swappiness = 40
vm.vfs_cache_pressure = 200

分享到:
评论

相关推荐

    解决ORA 700 [kskvmstatact excessive swapping observed]

    2. 使用 `free -m` 查看内存使用情况,以确定系统当前的内存使用情况。 3. 查看数据库使用内存情况,并计算数据库的内存使用量。 4. 根据计算结果,确定是否需要增加内存资源,以满足数据库的内存需求。 在这个例子...

    System Security Lecture Notes (StonyBrook CSE509)

    2. **Memory Swapping**: Allowing parts of the system to be swapped out to disk when not in use, optimizing resource utilization. #### Security vs. Correctness The distinction between security and ...

    TMS Pack for FireMonkey2.3.0.1

    Fixed : Issue compiling demo's in trial version Fixed : Issue with LoadFromFile column widths in TTMSFMXGrid v2.1.0.2 Improved : GetTextHeight function in TTMSFMXHTMLText Fixed : Issue with iOS ...

    ios Swapping View

    在iOS开发中,Swapping View通常指的是在应用中动态替换视图控制器或视图的过程,以便为用户提供不同的界面或功能。这种技术在实现导航、页面切换或者内容更新时非常常见。下面将详细介绍如何在iOS中实现Swapping ...

    Solaris 10 System Administration Essentials

    1.2.1 Installing Solaris on a SPARC System 6 1.2.2 Installing Solaris on an x86 System 9 1.3 Solaris JumpStart Installation 13 1.3.1 Setting up a JumpStart Server 13 1.3.2 Creating a Pro?le Server for...

    BSD4.4设计手册.7z

    The Design and Implementation of the 4.4BSD Operating System Marshall Kirk McKusick Keith Bostic Michael J. Karels John S. Quarterman Copyright © 1996 Addison-Wesley Longman, Inc The second ...

    HTML5 Games

    #### Chapter 5: Delegating Tasks to Web Workers - **Working with Web Workers**: An explanation of how Web Workers can be used to offload complex tasks from the main thread, improving performance and ...

    hot-swapping-compactpci

    "Hot-Swapping CompactPCI" 是一种在不关闭系统电源的情况下,将CompactPCI(紧凑型PCI)总线的板卡插入或移出活体背板的技术。这种技术的普及得益于CompactPCI总线自身的热插拔能力,它允许在运行中的系统中安全地...

    swap color.rar_dug9ab_swap_swapping与swap

    在IT领域,交换(Swapping)是一种内存管理技术,它涉及到将计算机内存中的数据暂时移动到硬盘上的交换空间,以便腾出内存供其他程序使用。标题"swap color.rar_dug9ab_swap_swapping与swap"可能指的是一个关于颜色...

    HTML5 GAMES Creating Fun with HTML5 CSS3 and WebGL 英文PDF

    ##### Chapter 5: Delegating Tasks to Web Workers This chapter introduces the concept of using Web Workers to offload computational tasks and improve the game’s performance. Key topics include: - **...

    Swapping to Remote Memory over InfiniBand:

    #### 一、InfiniBand技术及其特性 - **低延迟与高带宽**:现代远程直接内存访问(RDMA)能力的网络如InfiniBand和Quadrics提供了几微秒级别的低延迟以及高达10Gbps的高带宽。 - **缩小本地内存与远程内存访问差距**...

    AFF A700s - Swapping out a power supply.pdf

    在本文档中,我们讨论了如何在AFF A700s系统中更换电源供应单元(PSU)。AFF A700s是NetApp公司的高端全闪存存储解决方案,设计有冗余电源,以确保高可用性和稳定性。以下是关于更换电源供应的一些关键知识点: **...

    ED2K.zip

    2. **链接系统**:ED2K链接是由文件的哈希值、文件大小和文件名组成的,这些链接可以在网络上共享,使用户能够找到要下载的文件。例如,`ed2k://|file|filename.ext|filesize|hashvalue|/` 就是一个典型的ED2K链接。...

    kgb档案压缩console版+源码

    KGB Archiver console version ...In Sections 2-6, the description applies to the default memory option (-5, or MEM = 5). For smaller values of MEM, some components are omitted and the number...

    微软内部资料-SQL性能优化3

    Lesson 5: Concepts – Formulating and Implementing Resolution 81 Module 4: Troubleshooting Locking and Blocking Overview At the end of this module, you will be able to:  Discuss how ...

    VITA40-42_46-49-61-62-65-78设计规范

    VITA 46.11, System Management on VPX VITA 46.3 Serial RapidIOTM on VPX Fabric Connector VITA 46.4 PCI Express on the VPX Fabric Connector VITA 46.6 Gigabit Ethernet Control Plane on VPX VITA 46.7 ...

    Python Cookbook, 2nd Edition

    Processing All of a List's Items in Random Order Recipe 5.7. Keeping a Sequence Ordered as Items Are Added Recipe 5.8. Getting the First Few Smallest Items of a Sequence Recipe 5.9. Looking for...

    FAS2600 - Swapping out a power supply.pdf

    在IT领域,尤其是在数据中心管理中,确保硬件设备的稳定运行是至关重要的。...此外,了解文档和视频教程(如NetApp提供的"Swapping out a power supply in FAS2600 systems"视频)也是确保操作正确无误的重要途径。

    The Design and Implementation of the 4.4 BSD Operating System

    4. **文件系统**:4.4 BSD对文件系统进行了大量优化,包括改进了ufs(Unix File System)和引入了新的文件系统如ffs(Fast File System),这些优化措施显著提升了文件操作的效率和稳定性。 ### 实现技术 4.4 BSD...

Global site tag (gtag.js) - Google Analytics