楼主: biti_rainy

wait event :log file sync & log file parallel write

[复制链接]
论坛徽章:
31
管理团队2006纪念徽章
日期:2006-04-16 22:44:452012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:522012新春纪念徽章
日期:2012-02-13 15:11:52铁扇公主
日期:2012-02-21 15:02:402013年新春福章
日期:2013-02-25 14:51:242014年新春福章
日期:2014-02-18 16:41:11马上有车
日期:2014-02-18 16:41:11马上有车
日期:2014-02-19 11:55:14
11#
发表于 2004-9-28 14:04 | 只看该作者
<< 写logfile这个过程,log buffer可以继续被修改其他进程修改嘛?
At least in 8i, when the  server process  wants to write to the log buffer, it must have the "redo allocatiion" latch. However, when  LGWR wants to  write the log buffer to  the  log file, it also  requests the "redo  allocation"  latch.   Thus the LGWR will prevent other foreground process to allocate more space in the log buffer.

But the LGWR doesn't request the  "redo copy" latch.  There fore other  server  process still can  write to the other  area  of log  buffer.  LGWR will wait for other  server processes to finish the  copy.

( when  a  server  process needs to write to the  log buffer, it must have the  redo copy latch first, then get  the redo allocation latch , then release  redo allocation latch,  do the copy from its pga to  log buffer, then release  the redo copy latch  ) .

So in summary, Yes , it is possible for other server processes to continue to write to  log buffer , but only for  the  purpose of finishing the  previous request.

>> Log file sync很高得情况,降低log buffer有效嘛?
I think the most important point is to  increase the disk IO speed of  the  log file.  And ofcourse you should n't set the log buffer to a high value in the first place.  I doubt  there is much use of tuning the size of log buffer  if it  is not too high . But anyhow, if some one has good experience  on this , please post.

使用道具 举报

回复
招聘 : Linux运维
论坛徽章:
2
授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
12#
发表于 2004-9-28 15:25 | 只看该作者
###So in summary, Yes , it is possible for other server processes to continue to write to log buffer , but only for the purpose of finishing the previous request.###
thanks for your answer,wing hong.
我还是用中文习惯,呵呵
你的意思是server processes能够继续写log buffer是仅限那些已经在lgwr进行写之前就获得log copy latch的server processes吗?

使用道具 举报

回复
论坛徽章:
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
13#
发表于 2004-9-28 23:00 | 只看该作者
最初由 小新 发布
[B]###So in summary, Yes , it is possible for other server processes to continue to write to log buffer , but only for the purpose of finishing the previous request.###
thanks for your answer,wing hong.
我还是用中文习惯,呵呵
你的意思是server processes能够继续写log buffer是仅限那些已经在lgwr进行写之前就获得log copy latch的server processes吗? [/B]


That's exactly what wing hong's message says.

BTW, I used to think LGWR writes the entire log buffer. Not sure why I thought so. That's not right. If your LGWR writes often, every write will be small so it's not that big a problem, although it still causes redo allocation latch to be held and a short log file sync wait for server processes.

The best way to make LGWR run faster is to use raw disks for logfiles and of course use the fastest disks. If you commit often as on OLTP, making a big log_buffer is not as bad as before. It just wastes a little bit memory.

Yong Huang

使用道具 举报

回复
论坛徽章:
2
授权会员
日期:2005-10-30 17:05:33会员2006贡献徽章
日期:2006-04-17 13:46:34
14#
发表于 2004-11-3 01:00 | 只看该作者
正想深入了解这个问题用gogoole搜索,除了oracle官方网站,还是回到老家IYPUB :)
都是大侠在讨论问题呀,学习!

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2009-09-09 14:37:38
15#
发表于 2007-12-20 13:42 | 只看该作者
这个帖子不错,比较深入...顶一把

使用道具 举报

回复
论坛徽章:
2
2014年新春福章
日期:2014-02-18 16:42:02马上有房
日期:2014-02-18 16:42:02
16#
发表于 2008-10-31 11:38 | 只看该作者
总结:
1、凡是出现log file sync & log file parallel write的情况,大部份时间可以判定是IO有问题。
2、调整的办法,使用RAID 0+1,使用光纤磁盘的存储设备,将几张常常要用到的大表分区、物化视图、想办法优化读写速度、减小LOG BUFFER的大小,缩短SCAN的时间
  (因为,ALTER或日志切换、满时都会触发LGWR写回磁盘,从全局来考虑性能调整更好,洪先生,您说对吗?肯请指教)

                                                                                            —xiong .  qiang

使用道具 举报

回复
论坛徽章:
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
17#
发表于 2008-11-1 02:16 | 只看该作者
原帖由 jason_xiong 于 2008-10-30 21:38 发表
总结:
1、凡是出现log file sync & log file parallel write的情况,大部份时间可以判定是IO有问题。
2、调整的办法,使用RAID 0+1,使用光纤磁盘的存储设备,将几张常常要用到的大表分区、物化视图、想办法优化读写速度、减小LOG BUFFER的大小,缩短SCAN的时间
  (因为,ALTER或日志切换、满时都会触发LGWR写回磁盘,从全局来考虑性能调整更好,洪先生,您说对吗?肯请指教)

                                                                                            —xiong .  qiang


Comments on your summary.

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.

2. If you can afford RAID 0+1, why not do RAID 1+0, which has the additional resilience against disk crash?

Yong Huang

使用道具 举报

回复
论坛徽章:
2
2014年新春福章
日期:2014-02-18 16:42:02马上有房
日期:2014-02-18 16:42:02
18#
发表于 2008-11-4 14:30 | 只看该作者
大哥,您还是用中文吧!   不懂英文啊

使用道具 举报

回复
论坛徽章:
0
19#
发表于 2009-10-20 11: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.

使用道具 举报

回复
论坛徽章:
0
20#
发表于 2009-10-20 15:19 | 只看该作者
一个帖子从2003年讨论到2009年,太NB了

使用道具 举报

回复

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

本版积分规则 发表回复

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