楼主: anchen211

这是我的一个statspack的REPORT,怎高手帮忙分析一下问题

[复制链接]
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
11#
发表于 2005-3-17 17:59 | 只看该作者
系统是什么应用?

                Snap Id     Snap Time      Sessions
                ------- ------------------ --------
Begin Snap:          1 17-3月 -05 15:13:53      15
   End Snap:          2 17-3月 -05 15:29:30      15
    Elapsed:                  15.62 (mins)

时间间隔太短.

Top 5 Wait Events
~~~~~~~~~~~~~~~~~                                             Wait     % Total
Event                                               Waits  Time (cs)   Wt Time
-------------------------------------------- ------------ ------------ -------
log file parallel write                            17,802        4,197   69.27
log file sync                                         400          696   11.49
db file scattered read                             77,132          333    5.50
db file sequential read                             8,577          276    4.56
latch free                                            140          224    3.70

关于等待事件log file parallel write  :

You might want to reduce "log file parallel write" wait times in order to reduce user waits which depend on LGWR.
•        Ensure tablespaces are NOT left in HOT BACKUP mode longer than needed.
Tablespaces in HOT BACKUP mode cause more redo to be generated for each change which can vastly increase the rate of redo generarion.
•        Redo log members should ideally be on high speed disks
eg: RAID5 is not a good candidate for redo log members.
•        Redo log members should be on disks with little/no IO activity from other sources.
(including low activity from other sources against the same disk controller)
•        RAW devices can be faster file system files.
•        NOLOGGING / UNRECOVERABLE operations may be possible for certain operations to reduce the overall rate of redo generation

使用道具 举报

回复
求职 : 数据库管理员
论坛徽章:
16
授权会员
日期:2006-05-05 16:12:242014年新春福章
日期:2014-02-18 16:41:112013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:37生肖徽章2007版:龙
日期:2012-02-07 10:33:222012新春纪念徽章
日期:2012-02-07 09:59:35ITPUB十周年纪念徽章
日期:2011-11-01 16:20:282011新春纪念徽章
日期:2011-02-18 11:43:36ITPUB新首页上线纪念徽章
日期:2007-10-20 08:38:44ITPUB元老
日期:2007-07-28 10:13:02
12#
发表于 2005-3-17 19:06 | 只看该作者
db_buffer和library cache命中率太低,建議增加兩者之內存,redo log等待太嚴重,應該增加log_checkpoint_interval間隔時間,至於加多少,那要看你的應用了,自己慢慢試吧

使用道具 举报

回复
论坛徽章:
4
ITPUB元老
日期:2005-04-05 09:18:50授权会员
日期:2005-12-08 16:03:33会员2006贡献徽章
日期:2006-04-17 13:46:34会员2007贡献徽章
日期:2007-09-26 18:42:10
13#
 楼主| 发表于 2005-3-17 20:16 | 只看该作者

是个计费的数据库

最初由 husthxd 发布
[B]系统是什么应用?

                Snap Id     Snap Time      Sessions
                ------- ------------------ --------
Begin Snap:          1 17-3月 -05 15:13:53      15
   End Snap:          2 17-3月 -05 15:29:30      15
    Elapsed:                  15.62 (mins)

时间间隔太短.

Top 5 Wait Events
~~~~~~~~~~~~~~~~~                                             Wait     % Total
Event                                               Waits  Time (cs)   Wt Time
-------------------------------------------- ------------ ------------ -------
log file parallel write                            17,802        4,197   69.27
log file sync                                         400          696   11.49
db file scattered read                             77,132          333    5.50
db file sequential read                             8,577          276    4.56
latch free                                            140          224    3.70

关于等待事件log file parallel write  :

You might want to reduce "log file parallel write" wait times in order to reduce user waits which depend on LGWR.
•        Ensure tablespaces are NOT left in HOT BACKUP mode longer than needed.
Tablespaces in HOT BACKUP mode cause more redo to be generated for each change which can vastly increase the rate of redo generarion.
•        Redo log members should ideally be on high speed disks
eg: RAID5 is not a good candidate for redo log members.
•        Redo log members should be on disks with little/no IO activity from other sources.
(including low activity from other sources against the same disk controller)
•        RAW devices can be faster file system files.
•        NOLOGGING / UNRECOVERABLE operations may be possible for certain operations to reduce the overall rate of redo generation [/B]


每隔5分钟接收一批计费信息并由程序入库,计费信息放在一个分区表中,两三天的记录就有二,三百万条,我将此分区表导出后,导出文件就有3G之大.应该是写操作比较频繁,也用一些读操作,只是用户做查询用.应该不多.

使用道具 举报

回复
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
14#
发表于 2005-3-17 20:45 | 只看该作者
呵呵,先把db buffer增大看看把.
3g的内存,db buffer也太小了.

使用道具 举报

回复
论坛徽章:
4
ITPUB元老
日期:2005-04-05 09:18:50授权会员
日期:2005-12-08 16:03:33会员2006贡献徽章
日期:2006-04-17 13:46:34会员2007贡献徽章
日期:2007-09-26 18:42:10
15#
 楼主| 发表于 2005-3-17 21:49 | 只看该作者

能否再看看其它的?多给点分析?

最初由 husthxd 发布
[B]呵呵,先把db buffer增大看看把.
3g的内存,db buffer也太小了. [/B]


我想现在应该是重在过程,多点分析,让我能看明白,呵呵!

使用道具 举报

回复
论坛徽章:
22
2010新春纪念徽章
日期:2010-03-01 11:08:33马上有对象
日期:2014-02-19 11:55:14马上有钱
日期:2014-02-19 11:55:14马上有房
日期:2014-02-19 11:55:14马上有车
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:08:092012新春纪念徽章
日期:2012-02-13 15:08:092012新春纪念徽章
日期:2012-02-13 15:08:092012新春纪念徽章
日期:2012-02-13 15:08:092012新春纪念徽章
日期:2012-02-13 15:08:09
16#
发表于 2005-3-18 09:33 | 只看该作者

Re: 是个计费的数据库

最初由 anchen211 发布
[B]

每隔5分钟接收一批计费信息并由程序入库,计费信息放在一个分区表中,两三天的记录就有二,三百万条,我将此分区表导出后,导出文件就有3G之大.应该是写操作比较频繁,也用一些读操作,只是用户做查询用.应该不多. [/B]


我觉得关键要看看你的应用, 加载数据是不是有别的方法啊.

这么大的数据量, 是不是可以考虑修改加载程序啊.

使用道具 举报

回复
论坛徽章:
4
ITPUB元老
日期:2005-04-05 09:18:50授权会员
日期:2005-12-08 16:03:33会员2006贡献徽章
日期:2006-04-17 13:46:34会员2007贡献徽章
日期:2007-09-26 18:42:10
17#
 楼主| 发表于 2005-3-18 10:33 | 只看该作者

调整了db_block_buffer后,好象有所改善

最初由 husthxd 发布
[B]呵呵,先把db buffer增大看看把.
3g的内存,db buffer也太小了. [/B]


主要影响如下:
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            Buffer Nowait %:  100.00       Redo NoWait %:  100.00
            Buffer  Hit   %:   62.14    In-memory Sort %:   99.75
            Library Hit   %:   78.76        Soft Parse %:   16.25
         Execute to Parse %:   59.61         Latch Hit %:  100.00
Parse CPU to Parse Elapsd %:   86.60     % Non-Parse CPU:   99.62

Shared Pool Statistics        Begin   End
                               ------  ------
             Memory Usage %:    4.39   90.30
    % SQL with executions>1:   46.27    1.94
  % Memory for SQL w/exec>1:   34.18    0.99

Top 5 Wait Events
~~~~~~~~~~~~~~~~~                                             Wait     % Total
Event                                               Waits  Time (cs)   Wt Time
-------------------------------------------- ------------ ------------ -------
log file parallel write                            41,779        4,575   67.04
latch free                                            301          647    9.48
log file sync                                         634          621    9.10
db file scattered read                             94,405          464    6.80
db file sequential read                             7,109          239    3.50
          -------------------------------------------------------------

另附完整的REPORT,各位可以跟踪整个过程,并提出更好的建议.

billlocal_0318.txt

61.85 KB, 下载次数: 7

使用道具 举报

回复
论坛徽章:
4
ITPUB元老
日期:2005-04-05 09:18:50授权会员
日期:2005-12-08 16:03:33会员2006贡献徽章
日期:2006-04-17 13:46:34会员2007贡献徽章
日期:2007-09-26 18:42:10
18#
 楼主| 发表于 2005-3-18 10:36 | 只看该作者

调整了db_block_buffer后,好象有所改善

最初由 husthxd 发布
[B]呵呵,先把db buffer增大看看把.
3g的内存,db buffer也太小了. [/B]


调整前的db_block_buffer:2048,db_block_size:8K 只有16M,太小
现将db_block_buffer调整到:4096

我观察主要的参数
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
            Buffer Nowait %:  100.00       Redo NoWait %:  100.00
            Buffer  Hit   %:   62.14    In-memory Sort %:   99.75
            Library Hit   %:   78.76        Soft Parse %:   16.25
         Execute to Parse %:   59.61         Latch Hit %:  100.00
Parse CPU to Parse Elapsd %:   86.60     % Non-Parse CPU:   99.62

Shared Pool Statistics        Begin   End
                               ------  ------
             Memory Usage %:    4.39   90.30
    % SQL with executions>1:   46.27    1.94
  % Memory for SQL w/exec>1:   34.18    0.99

Top 5 Wait Events
~~~~~~~~~~~~~~~~~                                             Wait     % Total
Event                                               Waits  Time (cs)   Wt Time
-------------------------------------------- ------------ ------------ -------
log file parallel write                            41,779        4,575   67.04
latch free                                            301          647    9.48
log file sync                                         634          621    9.10
db file scattered read                             94,405          464    6.80
db file sequential read                             7,109          239    3.50
          -------------------------------------------------------------


可以看到TOP5的第一项有了没有反而增加了,是无效?还是应继续增大db_block_buffer?
另附完整的REPORT,各位可以跟踪整个过程,并提出更好的建议.

billlocal_0318.txt

61.85 KB, 下载次数: 8

使用道具 举报

回复
论坛徽章:
0
19#
发表于 2005-3-18 11:25 | 只看该作者

改了跟没改一样

调整前的db_block_buffer:2048,db_block_size:8K 只有16M,太小
现将db_block_buffer调整到:4096
-------------------------------------------------------------------------------------------------------------------------
从16M改到32M也算是进步吧
不过你的内存3G也对oracle太小气了吧?
应该db_block_buffer=128000  这样 oracle的data cache 就有 1G
甚至db_block_buffer=256000  这样 oracle的data cache 就有 2G
不过说实话,如果你的数据库并行查询的人不多,只是计费
或者db_block_buffer=64000  这样 oracle的data cache 就有 512M
如果该服务器还跑别的应用,512M也是够用的

使用道具 举报

回复
论坛徽章:
168
马上加薪
日期:2014-02-19 11:55:142012新春纪念徽章
日期:2012-02-13 15:10:582012新春纪念徽章
日期:2012-01-04 11:49:54蜘蛛蛋
日期:2011-12-05 16:08:56ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41设计板块每日发贴之星
日期:2011-07-22 01:01:02ITPUB官方微博粉丝徽章
日期:2011-06-30 12:30:16管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:33
20#
发表于 2005-3-18 12:17 | 只看该作者
db_block_buffer:2048
改为204800还差不多

另外:
你只是把statspack报告上传上来,但客户有感觉到系统慢吗?
慢在什么地方?

使用道具 举报

回复

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

本版积分规则 发表回复

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