平台:SunOS Generic_ sunu sparc SUNWUltraEnterprise 数据库: 症状:响应缓慢应用请求已经无法返回 登陆数据库发现redo日志组除current外都处于active状态 oracle:/oracle/oracle>sqlplus / as sysdba SQL*Plus: Release Production on Thu Jun :: (c) Copyright Oracle CorporationAll rights reserved Connected to: Oraclei Enterprise Edition Release Production With the Partitioning and Java options PL/SQL Release Production SQL> select * from v$log; GROUP#THREAD#SEQUENCE#BYTESMEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM NOACTIVEE+ JUN NOACTIVEE+ JUN NOACTIVEE+ JUN NOCURRENT E+ JUN NOACTIVEE+ JUN NOACTIVEE+ JUN NOACTIVEE+ JUN NOACTIVEE+ JUN NOACTIVEE+ JUN rows selected SQL> / GROUP#THREAD#SEQUENCE#BYTESMEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM NOACTIVEE+ JUN NOACTIVEE+ JUN NOACTIVEE+ JUN NOCURRENT E+ JUN NOACTIVEE+ JUN NOACTIVEE+ JUN NOACTIVEE+ JUN NOACTIVEE+ JUN NOACTIVEE+ JUN rows selected 如果日志都处于active状态那么显然DBWR的写已经无法跟上log switch触发的检查点 接下来让我们检查一下DBWR的繁忙程度: SQL> ! oracle:/oracle/oracle>ps ef|grep ora_ oracle Mar ? : ora_smon_hysms oracle Mar ? : ora_dbw_hysms oracle Mar ? : ora_pmon_hysms oracle Mar ? : ora_lgwr_hysms oracle Mar ?: ora_snp_hysms oracle Mar ?: ora_snp_hysms oracle Mar ?: ora_snp_hysms oracle Mar ? : ora_ckpt_hysms oracle Mar ?: ora_snp_hysms oracle Mar ?: ora_snp_hysms oracle Mar ?: ora_d_hysms oracle Mar ?: ora_s_hysms oracle Mar ?: ora_reco_hysms oracle :: pts/ : grep ora_ DBWR的进程号是 使用Top命令观察一下: oracle:/oracle/oracle>top last pid: ;load averages: :: processes: sleeping running zombie on cpu CPU states: % idle % user% kernel % iowait% swap Memory: M real M free M swap in use M swap free PID USERNAME THR PRI NICESIZE RES STATETIMECPU COMMAND smspf M M cpu/ : % oracle oracle M M runH % oracle oracle M M sleep H% oracle smspf M M sleepH% java smspf M M cpu/:% oracle smspf K K sleep H% fee_ftp_get oracle K K cpu/:% top smspf M M sleep:% java smspf M K sleep:% smif_status_rec smspf M M sleep H% fee_file_in root K K sleep:% sshd smspf M M sleep:% oracle oracle M M sleep:% oracle smspf K K sleep:% sgip_client_ltz smspf MM sleep:% java 我们注意到号进程消耗的CPU不过%显然并不繁忙那么瓶颈就很可能在IO上 使用IOSTAT工具检查IO状况 gqgai:/home/gqgai>iostat xn extended device statistics r/sw/s kr/s kw/s wait actv wsvc_t asvc_t%w%b device
ctd ctd ctd ctd hurraysms:vold(pid) extended device statistics r/sw/s kr/s kw/s wait actv wsvc_t asvc_t%w%b device
ctd ctd ctd ctd hurraysms:vold(pid) extended device statistics r/sw/s kr/s kw/s wait actv wsvc_t asvc_t%w%b device
ctd ctd ctd ctd hurraysms:vold(pid) extended device statistics r/sw/s kr/s kw/s wait actv wsvc_t asvc_t%w%b device
|