- 浏览: 7846962 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (2425)
- 软件工程 (75)
- JAVA相关 (662)
- ajax/web相关 (351)
- 数据库相关/oracle (218)
- PHP (147)
- UNIX/LINUX/FREEBSD/solaris (118)
- 音乐探讨 (1)
- 闲话 (11)
- 网络安全等 (21)
- .NET (153)
- ROR和GOG (10)
- [网站分类]4.其他技术区 (181)
- 算法等 (7)
- [随笔分类]SOA (8)
- 收藏区 (71)
- 金融证券 (4)
- [网站分类]5.企业信息化 (3)
- c&c++学习 (1)
- 读书区 (11)
- 其它 (10)
- 收藏夹 (1)
- 设计模式 (1)
- FLEX (14)
- Android (98)
- 软件工程心理学系列 (4)
- HTML5 (6)
- C/C++ (0)
- 数据结构 (0)
- 书评 (3)
- python (17)
- NOSQL (10)
- MYSQL (85)
- java之各类测试 (18)
- nodejs (1)
- JAVA (1)
- neo4j (3)
- VUE (4)
- docker相关 (1)
最新评论
-
xiaobadi:
jacky~~~~~~~~~
推荐两个不错的mybatis GUI生成工具 -
masuweng:
(转)JAVA获得机器码的实现 -
albert0707:
有些扩展名为null
java 7中可以判断文件的contenttype了 -
albert0707:
非常感谢!!!!!!!!!
java 7中可以判断文件的contenttype了 -
zhangle:
https://zhuban.me竹板共享 - 高效便捷的文档 ...
一个不错的网络白板工具
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
在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
发表评论
-
mybatis generator中的字段大小写生成问题
2017-10-22 19:35 11241mybatis generator插件中,如果 mysql数据 ... -
MySQL统计一个列中不同值的数量
2017-07-11 14:04 16227https://yiqiwuliao.com/post/mys ... -
mysql 1449 : The user specified as a definer ('root'@'%') does not exist 解决方法
2017-03-02 09:44 1724权限问题,授权 给 root 所有sql 权限 mysql ... -
几个不错的MYSQL 优化TIPS
2016-11-19 12:30 764图片来自http://imysql.com/的PDF分享 [ ... -
powerdesign 逆向ORACLE的坑
2016-09-27 17:08 523要注意的是,在WIN 64中,如果要用powerdesin 来 ... -
( 转)mysql中删除两条重复记录中的一条
2015-10-19 20:19 1293| id | createTime | labId | pub ... -
mysql中sql语句=,>的时候的索引设置
2015-05-02 12:27 1280在 https://www.percona.com/blog/ ... -
mysql中profile的使用
2015-04-30 11:11 2184mysql 的 sql 性能分析器主要用途是显示 sql 执行 ... -
mysql中的sql mode
2015-04-13 11:29 1110mysql sql mode小结 1 sql mode可以 ... -
PROCEDURE ANALYSE()为mysql提高性能提供建议
2015-04-02 16:37 1405procedure analyse();语法如下 select ... -
mongodb中意外退出的问题
2015-02-11 14:32 1309mongodb启动的时候,意外退出: Unclean shut ... -
mysql 5.5中保留字查询
2014-06-05 23:16 1451mysql 5.5中保留字查询 http://www.5is ... -
(转)oracle 临时表空间的增删改查
2014-03-18 12:44 1098oracle 临时表空间的增删改查 1、查看临时表空间 (d ... -
pl-sql developer安装
2014-02-07 09:16 1092一直都是机器本机上有oracle,所以装pl sql deve ... -
oracle中的nvl,nvl2等参数
2013-12-26 11:18 22401.nul函数将一个null值转换为一个实际的值。 数据类型可 ... -
Oracle中的ROWNUM rowid 以及MySQL中实现rownum功能类似的语句
2013-12-26 11:08 2323http://gong-10140.iteye.com/blo ... -
ORACLE XE版本的限制
2013-12-07 08:11 360310g中用户数据最大为4G, 11G中最大为11G,如果超出大 ... -
oracle中监控索引是否可用
2013-11-04 07:22 1034在oracle中,可以使用如下的方法监控索引是否可用: a ... -
mysql 5.6中的时间类型的新精度介绍
2013-10-28 09:33 8369留意到mysql 5.6中,可以使用select now(6) ... -
<<oracle索引技术》读书笔记1
2013-08-25 16:23 1288expert indexing in oracle datab ...
相关推荐
解决ORA 700 [kskvmstatact excessive swapping observed]
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 ...
Chapter 5: Locking and Interprocess Communication . 347 Chapter 6: Device Drivers 391 Chapter 7: Modules 473 Chapter 8: The Virtual Filesystem 519 Chapter 9: The Extended Filesystem Family . 583 ...
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...
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 ...
NULL 博文链接:https://dingran.iteye.com/blog/1771113
hot-swapping-compactpci
AFF A700s - Swapping out a power supply.pdf
资源来自pypi官网。 资源全名:swapping_ebuilds-0.5.0.tar.gz
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...
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 ...
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...
Chapter 11. Signals Section 11.1. The Role of Signals Section 11.2. Generating a Signal Section 11.3. Delivering a Signal Section 11.4. System Calls Related to Signal Handling Chapter 12. The Virtual ...
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 ...
An Approach using a High Performance Network Block Device
基于加油站网络的电动汽车充换电站最优布局模型,陈楚月,华国伟,电动汽车是公认的环境友好型交通工具,电动汽车充换电站的建设对于推广电动汽车具有重要的意义,但是目前在许多城市的充换电站建
The kernel is Linux--in the case of the Linux operating system, it's the only bit of software to which the term "Linux" applies. The kernel handles all the requests or completed I/O operations and ...
palette swapping on EGA video adapters. Using this switch tc /p hello is recommended only when the user program modifies the EGA palette registers. When /P is specified, the EGA palette will be ...
5. Paging and Swapping Layered approach to page-fault handling Conditions under which the page daemon runs Functions of the page daemon Conditions under which the swapper runs 6. The swapfs File ...