欢迎来到天天文库
浏览记录
ID:6675933
大小:48.50 KB
页数:15页
时间:2018-01-22
《如何捕获问题sql解决过度cpu消耗问题》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、如何捕获问题SQL解决过度CPU消耗问题如何捕获问题SQL解决过度CPU消耗问题问题描述:开发人员报告系统运行缓慢,影响用户访问.1.登陆数据库主机使用vmstat检查,发现CPU资源已经耗尽,大量任务位于运行队列:bash-2.03$vmstat3procsmemorypagediskfaultscpurbwswapfreeremfpipofrdesrs6s9s1sdinsycsussyid0005504232146411200000000110429496719600-84-5-145131005368072151836056691
2、0220001003011791827959730131005377328152246481719022000100276680192577964013000538240015247766768200000000035708534331697301340053736161520512127107802200010038389584362396401360053693921518496107924055000000292085732639973013200536491215162246357800000000033587944311997
3、3012900535864815117121891236000000000336610365313595501290053545281511304120119400000004032358864291196401280053468481507704998230000000303189904830749640125005341248150470480843022000610356395143314955013300533274415011127979800000001032188805290297301290053253841497368
4、1076430220001403184829728799640126005363144151432081753000000000253374092164973013600535562415105121695667860000001030028600281096401301053514481502936267580182100000000312678122900964012900534725614995681559132220000102225807619419820116005338192149540017711620000000101
5、9477781163997302.使用Top命令观察进程CPU耗用,发现没有明显过高CPU使用的进程$toplastpid:28313;loadaverages:99.90,117.54,125.7123:28:38296processes:186sleeping,99running,2zombie,9oncpuCPUstates:0.0%idle,96.5%user,3.5%kernel,0.0%iowait,0.0%swapMemory:4096Mreal,1404Mfree,2185Mswapinuse,5114Mswapfree
6、PIDUSERNAMETHRPRINICESIZERESSTATETIMECPUCOMMAND27082oracle8i13301328M1309Mrun0:171.29%oracle26719oracle8i15501327M1306Msleep0:291.11%oracle28103oracle8i13501327M1304Mrun0:061.10%oracle28161oracle8i12501327M1305Mrun0:041.10%oracle26199oracle8i14501328M1309Mrun0:421.10%ora
7、cle26892oracle8i13301328M1310Mrun0:241.09%oracle27805oracle8i14501327M1306Mcpu/10:101.04%oracle23800oracle8i12301327M1306Mrun1:281.03%oracle25197oracle8i13401328M1309Mrun0:571.03%oracle21593oracle8i13301327M1306Mrun2:121.01%oracle27616oracle8i14501329M1311Mrun0:141.01%or
8、acle27821oracle8i14301327M1306Mrun0:101.00%oracle26517oracle8i13301328M1309Mrun0:330.97%oracle25785orac
此文档下载收益归作者所有