性能优化分析案例---解决SQL语句过度消耗CPU问题
来源:互联网 发布:算命软件 编辑:程序博客网 时间:2024/05/16 07:12
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
问题描述:
10月25日上午滨州网通的工程师报告OSS应用系统运行缓慢,具体操作是通过OSS系统查询话单,很长时间才能返回结果,严重影响了客户的正常使用。
问题处理:
1.登陆数据库主机,用sar命令看到idle的值持续为0,CPU的资源已经耗尽:
bz_db1#sar24
SunOSkest5.8Generic_108528-19sun4u 10/26/04
10:56:46 %usr %sys %wio %idle
10:56:48 1 4 95 0
10:56:50 1 5 94 0
10:56:52 0 6 93 0
10:56:54 1 6 93 0
Average 1 5 94 0
2.使用TOP命令看到有两个明显占用CPU利用率过高的进程,以下是top命令的结果:
bz_db1#top
lastpid: 1664;loadaverages: 3.26, 3.24, 3.69
159processes:152sleeping,2running,2zombie,1stopped,2onCPU
CPUstates: 1.5%idle,72.5%user,17.9%kernel, 8.0%iowait, 0.0%swap
Memory:2.0Greal,233Mfree,2.0Gswapinuse,3.4Gswapfree
PIDUSERNAMETHRPRNCE SIZE RESSTATE TIMEFLTS CPUCOMMAND
27420oracle 110 0 1.3G 1.2GCPU01 22.9H 231.94%oracle
27418oracle 110 0 1.3G 1.2Grun 23.0H 626.86%oracle
5943oracle 159 0 1.3G 1.2Gsleep 25:26 37 4.92%oracle
6295oracle 155 0 1.3G 1.2Grun 25:14 74 4.90%oracle
7778oracle 143 0 1.3G 1.2Gsleep 11:43 110 4.86%oracle
13270oracle 159 0 1.3G 1.2Gsleep210.6H 0 0.96%oracle
13056oracle 148 0 1.3G 1.2Gsleep303:30 0 0.37%oracle
10653root 158 02560K1624KCPU00 0:00 0 0.32%top
18827oracle 158 0 1.3G 1.2Gsleep 18.4H 0 0.31%oracle共7页 第1页
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
问题描述:
10月25日上午滨州网通的工程师报告OSS应用系统运行缓慢,具体操作是通过OSS系统查询话单,很长时间才能返回结果,严重影响了客户的正常使用。
问题处理:
1.登陆数据库主机,用sar命令看到idle的值持续为0,CPU的资源已经耗尽:
bz_db1#sar24
SunOSkest5.8Generic_108528-19sun4u 10/26/04
10:56:46 %usr %sys %wio %idle
10:56:48 1 4 95 0
10:56:50 1 5 94 0
10:56:52 0 6 93 0
10:56:54 1 6 93 0
Average 1 5 94 0
2.使用TOP命令看到有两个明显占用CPU利用率过高的进程,以下是top命令的结果:
bz_db1#top
lastpid: 1664;loadaverages: 3.26, 3.24, 3.69
159processes:152sleeping,2running,2zombie,1stopped,2onCPU
CPUstates: 1.5%idle,72.5%user,17.9%kernel, 8.0%iowait, 0.0%swap
Memory:2.0Greal,233Mfree,2.0Gswapinuse,3.4Gswapfree
PIDUSERNAMETHRPRNCE SIZE RESSTATE TIMEFLTS CPUCOMMAND
27420oracle 110 0 1.3G 1.2GCPU01 22.9H 231.94%oracle
27418oracle 110 0 1.3G 1.2Grun 23.0H 626.86%oracle
5943oracle 159 0 1.3G 1.2Gsleep 25:26 37 4.92%oracle
6295oracle 155 0 1.3G 1.2Grun 25:14 74 4.90%oracle
7778oracle 143 0 1.3G 1.2Gsleep 11:43 110 4.86%oracle
13270oracle 159 0 1.3G 1.2Gsleep210.6H 0 0.96%oracle
13056oracle 148 0 1.3G 1.2Gsleep303:30 0 0.37%oracle
10653root 158 02560K1624KCPU00 0:00 0 0.32%top
18827oracle 158 0 1.3G 1.2Gsleep 18.4H 0 0.31%oracle共7页 第1页
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 数据库性能优化分析案例---解决SQL语句过度消耗CPU问题
- 数据库性能优化分析案例---解决SQL语句过度消耗CPU问题
- 性能优化分析案例---解决SQL语句过度消耗CPU问题
- 解决SQL语句过度消耗CPU问题
- Oracle诊断案例----如何捕获问题SQL解决过度CPU消耗问题
- Oracle诊断案例----如何捕获问题SQL解决过度CPU消耗问题
- 如何捕获问题SQL解决过度CPU消耗问题
- 如何捕获问题SQL解决过度CPU消耗问题
- 捕获问题SQL解决过度CPU消耗问题
- 捕获问题sql解决过度cpu消耗问题
- 如何捕获问题SQL解决过度CPU消耗问…
- 如何解决CPU过度消耗问题
- 系统性能优化分析—CPU消耗
- cpu性能消耗分析
- Android UI性能优化实战 识别绘制中的性能问题。解决CPU绘制过度
- postgresql定位分析消耗CPU高的SQL语句
- Oracle中捕获问题SQL解决CPU过渡消耗
- Oracle中捕获问题SQL解决CPU过渡消耗
- 优秀程序员应经具备的素质
- ERP与
- 创建实体化视图的几个注意点
- 男性心理健康的八大标准
- 微软 enterprise libaray 3.1 Policy Injection Application Block序列文章
- 性能优化分析案例---解决SQL语句过度消耗CPU问题
- Composite UI Application Block(Cab)比较详细的一片文章
- 作为一个DBA,如何管理和维护一个企业级的管理系统.
- DBA工作备忘录-阵列损坏解决方法
- TransportableTablespaces
- 有关SQLServer内存问题
- Tomcat4.01配置全攻略
- 请帮忙看看这Delphi代码是哪里出错了!!!!
- 带格式的文本串,如何使用BCP导入,单引号‘’如何处理