- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
5#
发表于 2012-5-11 22:00:09
"你增加再多的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。 |
|