一次因磁盘竞争引起的性能问题

App抱怨说OGG Hang住了,数据没有从源端及时复制到目标端,我到OGG里一看,发现有14个小时的lag,重启replicat也不行,登陆到数据库后才发现数据库中存在大量的log file sync等待事件,隐约记得引起该事件的主要原因是因为磁盘竞争,上网查了下,果然如此:

The “log file sync” wait event is triggered when a user session issues a commit (or a rollback). The user session will signal or post the LGWR to write the log buffer to the redo log file. When the LGWR has finished writing, it will post the user session. The wait is entirely dependent on LGWR to write out the necessary redo blocks and send confirmation of its completion back to the user session. The wait time includes the writing of the log buffer and the post, and is sometimes called “commit latency”.

此时数据库中有两个活动用户,一个是GGUSER(就是OGG的用户),另一个是OPGCEP1,这是另外一个应用程序的用户名(该数据库同时支持两个应用程序)。

iostat -x 结果如下:
Normal 0 false false false EN-US ZH-CN X-NONE Device:         rrqm/s   wrqm/s   r/s   w/s   rsec/s   wsec/s avgrq-sz avgqu-sz   await  svctm  %util

sda               0.00     0.40  0.00  0.40     0.00     6.40    16.00     0.00    0.50   0.50   0.02

sda1              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

sda2              0.00     0.40  0.00  0.40     0.00     6.40    16.00     0.00    0.50   0.50   0.02

sdb               0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

sdb4              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

sdb5              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

sdc               0.00     1.00 259.20 10.40 256915.20   335.20   954.19     7.29   26.11   3.71 100.02

sdc4              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

sdc5              0.00     1.00 259.20 10.40 256915.20   335.20   954.19     7.29   26.11   3.71 100.02

sdd               0.00     0.00  0.00  0.20     0.00     0.20     1.00     0.00    1.00   1.00   0.02

sdd4              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

sdd5              0.00     0.00  0.00  0.20     0.00     0.20     1.00     0.00    1.00   1.00   0.02

dm-0              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

dm-1              0.00     0.00  0.00  0.80     0.00     6.40     8.00     0.00    0.75   0.25   0.02

dm-2              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

dm-3              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

dm-4              0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

fd0               0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

VxVM8000          0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

VxVM8001          0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

VxVM8003          0.00     0.00  0.00  0.00     0.00     0.00     0.00     0.00    0.00   0.00   0.00

VxVM8004          0.00     0.00  0.00  0.20     0.00     3.20    16.00     0.01   28.00  28.00   0.56

VxVM8005          0.00     0.00  1.20 12.00     9.60   344.60    26.83     2.38  175.68  75.36  99.48

VxVM8006          0.00     0.00 259.20  0.40 256915.20     6.60   989.68     5.15   19.12   3.85 100.02

可以发现其中有一个磁盘非常繁忙,达到100%,基本上可以确认是由于磁盘竞争引起的性能问题,让OPGCEP1停掉应用之后,OGG马上就正常了。

为了长久解决磁盘竞争的问题,需要重新分配两块磁盘:一个放redo logs,另一个放一些datafiles,主要的思想是分散I/O
Normal 0 false false false EN-US ZH-CN X-NONE

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26277071/viewspace-713824/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26277071/viewspace-713824/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值