123
返回列表 发新帖
楼主: biti_rainy

wait event :log file sync & log file parallel write

[复制链接]
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
21#
发表于 2009-10-21 01:16 | 只看该作者
原帖由 liangpd 于 2009-10-19 21:32 发表
1. Most of the time it's because applications unnecessarily commit. If the developers can change the code to do commit only when it has to, log file sync can drop a lot.

你意思是Most of the time it's because applications unnecessarily commit, 那有什么办法从数据库这边找出那些应用有问题?到底是什么应用导致了high file log syn? txn.


Easy. Check v$session_event to see what sessions frequently experience 'log file sync' waits. Or just keep watching v$session_wait.

Supplement that with 'user commits' stats. That is, find the statistic# in v$statname (or v$sysstat) for 'user commits'. Check v$sesstat to see which session has very high increase in value for this statistic within a short time.

Yong Huang

使用道具 举报

回复
论坛徽章:
71
ITPUB元老
日期:2009-11-30 15:55:11授权会员
日期:2009-11-30 11:36:17ITPUB季度 技术新星
日期:2010-08-31 10:47:25优秀写手
日期:2014-12-24 06:00:14ITPUB8周年纪念徽章
日期:2009-09-27 10:21:20祖国60周年纪念徽章
日期:2009-10-09 08:28:00奔驰
日期:2013-10-20 13:32:09数据库板块每日发贴之星
日期:2008-10-03 01:02:14数据库板块每日发贴之星
日期:2009-11-23 01:01:03数据库板块每日发贴之星
日期:2010-07-27 01:01:02
22#
发表于 2010-1-22 18:16 | 只看该作者
原帖由 Yong Huang 于 2009-10-21 01:16 发表


Easy. Check v$session_event to see what sessions frequently experience 'log file sync' waits. Or just keep watching v$session_wait.

Supplement that with 'user commits' stats. That is, find the statistic# in v$statname (or v$sysstat) for 'user commits'. Check v$sesstat to see which session has very high increase in value for this statistic within a short time.

Yong Huang


开发人员说为了保证交易被记录住,只能频繁提交。那么就只能提高磁盘io了吧?现在是5块盘的raid5,应该是用raid10存log了。

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
23#
发表于 2010-1-23 04:33 | 只看该作者
原帖由 lixunpeng 于 2010-1-22 04:16 发表

开发人员说为了保证交易被记录住,只能频繁提交。那么就只能提高磁盘io了吧?现在是5块盘的raid5,应该是用raid10存log了。


Yes, RAID 10 is the best for online redo logfiles. RAID 5 is very bad for this purpose.

In rare cases, unusually high "log file sync" waits are due to bugs. Search on MOS.

Yong Huang

使用道具 举报

回复
论坛徽章:
2
授权会员
日期:2005-10-30 17:05:332010新春纪念徽章
日期:2010-01-04 08:33:08
24#
发表于 2010-4-24 21:46 | 只看该作者
看来真是IO瓶颈的问题?但还有其他的方法吗?例如,nologging 是否也可以减少log buffer 写入redo log?我记得按照Oracle的要求,一般一个归档要求20分钟以上。但是在频繁提交的事务要求下,实际上往往几分钟就产生switch logfile了。往往是这种原因造成的log file sync 等待吧?

[ 本帖最后由 jowvid 于 2010-4-24 21:51 编辑 ]

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
25#
发表于 2010-4-25 00:52 | 只看该作者
If log write is sporadic instead of continuous, a large SAN cache helps.

Nologging helps if certain operations contribute to most of redo generation, such as CTAS, direct-path insert. Redo for regular DML won't be reduced. When the redo is reduced (for those certain operations), it won't even go into log buffer. (So it's not that 减少log buffer 写入redo log files.)

> 几分钟就产生switch logfile了。往往是这种原因造成的log file sync 等待吧?

No. Increasing the size of redo logfiles can prolong log file switch, but won't reduce log file sync.

Yong Huang

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表