关于working sets简单记录

一个working set由如下内容组成:

20101231_5777172a0f0c9912f618kS6lhBP5akgK.jpg
1.jpg

其中有我们比较熟悉的lru ,lru-w,ckpt queue.
一个db_block_lru_latche保护一个working set。
一个working sets至少需要包含50个buffers。每个working sets都有特定的一个db_block_lru_latche保护。
例如:如果进程需要同时检测LRU或者LRUW列表时,为获得cache buffers lru chain发生锁存器争用,

这个过程等待latch:cache buffers lru chain等待。
我的测试库中cache buffers lru chain的数量。
sysCRMG>select count(*) from v$latch_children where name ='cache buffers lru chain';
  COUNT(*)
----------
        32

由于buffer cache分为了default,keep,recycle池,default池又分为2,4,8,16,32k的,因此
cache buffers lru chain的最少数量为:default+keep+recycle+5个不同大小数据块尺寸的=8.

看看我的数据库中的lru latch分布:
sysCRMG>select d.blk_size, c.child#, p.bp_name, c.gets, c.sleeps
  2    from x$kcbwds d, v$latch_children c, x$kcbwbpd p
  3   where d.set_latch = c.addr
  4     and d.set_id between p.bp_lo_sid and p.bp_hi_sid
  5   order by c.child#;

  BLK_SIZE     CHILD# BP_NAME                                        GETS     SLEEPS
---------- ---------- ---------------------------------------- ---------- ----------
      8192          1 KEEP                                           2015          0
      8192          2 KEEP                                           2015          0
      8192          3 KEEP                                           2015          0
      8192          4 KEEP                                           2015          0
      8192          5 RECYCLE                                        2015          0
      8192          6 RECYCLE                                        2015          0
      8192          7 RECYCLE                                        2015          0
      8192          8 RECYCLE                                        2015          0
      8192          9 DEFAULT                                    32123658      18974
      8192         10 DEFAULT                                    32060918      18256
      8192         11 DEFAULT                                    25369375       8113
      8192         12 DEFAULT                                    25296528       8008
      2048         13 DEFAULT                                        2015          0
      2048         14 DEFAULT                                        2015          0
      2048         15 DEFAULT                                        2015          0
      2048         16 DEFAULT                                        2015          0
      4096         17 DEFAULT                                        2015          0
      4096         18 DEFAULT                                        2015          0
      4096         19 DEFAULT                                        2015          0
      4096         20 DEFAULT                                        2015          0
      8192         21 DEFAULT                                        2015          0
      8192         22 DEFAULT                                        2015          0
      8192         23 DEFAULT                                        2015          0
      8192         24 DEFAULT                                        2015          0
     16384         25 DEFAULT                                        2015          0
     16384         26 DEFAULT                                        2015          0
     16384         27 DEFAULT                                        2015          0
     16384         28 DEFAULT                                        2015          0
     32768         29 DEFAULT                                        2015          0
     32768         30 DEFAULT                                        2015          0
     32768         31 DEFAULT                                        2015          0
     32768         32 DEFAULT                                        2015          0


GETS>2015的行代表已经使用的latch,我们看到default池用到了4把cache buffers lru chain latch.
因此不难推断,数据库存在四个working sets.看看我的测试库的dbwn的进程有几个。
sysCRMG>show parameter db_w
NAME                                 TYPE                   VALUE
------------------------------------ ---------------------- ------------------------------
db_writer_processes                  integer                2


看来我的一个DBWN管理了两个working sets.

20101231_8bc44900bddfedd33f50VDWTXmEF2Z26.jpg
2.jpg

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

转载于:http://blog.itpub.net/22034023/viewspace-683046/

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值