oracle的freelist,freelist和buffer busy wait的关系

"你增加再多的freelist也是使用一个Free list block"

as maclean said:

To handle such contention situations, we can specify many free lists at the segment level, sometimes called process free lists. The freelist storage parameter indicates the number of free list sets. Each user process is assigned to one process free list. When the user process needs a block with free space, it scans its assigned process free lists. Existence of multiple process free lists improves performance for concurrent OLTP activities on the same segment and avoids segment header contention.

Free List  分成:

FREELISTS (KTSFS)

Master free list - committed/newly         allocated blocks.

Process free lists -  spread insertion hot spot

Transaction free lists -

创建 segment 时 可以指定 Process free lists,如

SQL> create table maclean_freelist (t1 int) storage (freelists 10);

Table created.

SQL> select HEADER_FILE,HEADER_BLOCK from dba_segments where segment_name='MACLEAN_FREELIST';

HEADER_FILE HEADER_BLOCK

----------- ------------

1        67617

nfl = 10, nfb = 1 typ = 1 nxf = 0 ccnt = 0

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000

更少的 process free list 意味着 process 需要对 Freelist block更多的 search 搜索操作, 意味着 更长时间的 freelist block被pin, 意味着 更多进程需要等待 freelist block的pin 被释放 ,意味着更多的 busy buffer wait 。

而更多的process free list则相反, 这就是为什么 增加freelists 有助于减少 =DATA SEGMENT HEADER WITH FREE LIST BLKS or  DATA SEGMENT FREE LIST BLOCK WITH FREE BLOCK COUNT  的 busy buffer wait。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值