Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Summary of ASSM of oracle

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

ASSM uses 3-level bitmaps, and the first extent has at least 3 metadata blocks, L1-L2-header (including L3)

Duan Tou & L3

Extent control: storing HHWM information

Header control: records the basic information of a three-level bitmap, where L2 hint for insert is the starting position for searching available space

Extent table/Auxillary extent map: maintaining extent map information

Buffer tsn: 115 rdba: 0x11227ca3 (68max 2260131)

Scn: 0x0860.07f11dac seq: 0x01 flg: 0x04 tail: 0x1dac2301

Frmt: 0x02 chkval: 0x7157 type: 0x23=PAGETABLE SEGMENT HEADER

Hex dump of block: st=0, typ_found=1

Extent Control Header

-describe HHWM-

Extent Header:: spare1: 0 spare2: 0 # extents: 23 # blocks: 1024

Last map 0x00000000 # maps: 0 offset: 2716

Highwater:: 0x113a3e09 ext#: 22 blk#: 128 ext size: 128-High Watermark Block number / extent/ the number of extent blocks

# blocks in seg. Hdr's freelists: 0

# blocks below: 1000

Mapblk 0x00000000 offset: 22

Unlocked

-describe LHWM--

Low HighWater Mark:

Highwater:: 0x113a3e09 ext#: 22 blk#: 128 ext size: 128

# blocks in seg. Hdr's freelists: 0

# blocks below: 1024

Mapblk 0x00000000 offset: 22

Level 1 BMB for High HWM block: 0x113a3d8a

Level 1 BMB for Low HWM block: 0x113a3d8a

Segment Type: 1 nl2: 1 blksz: 8192 fbsz: 0

L2 Array start offset: 0x00001434

First Level 3 BMB: 0x00000000

L2 Hint for inserts: 0x11227ca2-search for the starting position of the L2 BMB, insert needs to use the

Last Level 1 BMB: 0x113a3d8a

Last Level II BMB: 0x11227ca2

Last Level III BMB: 0x00000000

Map Header:: next 0x00000000 # extents: 23 obj#: 345420 flag: 0x20000000

Inc # 0

Extent Map-- stores extent basic information in the form of (dba, len), start DBA + length

-

0x11227ca1 length: 8

0x11227ca9 length: 8

0x11227cb1 length: 8

.

0x11400109 length: 128

0x113a3d09 length: 128

0x11400189 length: 128

0x113a3d89 length: 128

Auxillary Map:extent no + L1 BMB of first DBA + first DBA in extent (extent 0 first 3 block storage metadata)

Extent 0: L1 dba: 0x11227ca1 Data dba: 0x11227ca4

Extent 1: L1 dba: 0x11227ca1 Data dba: 0x11227ca9

Extent 2: L1 dba: 0x11227cb1 Data dba: 0x11227cb2

Extent 3: L1 dba: 0x11227cb1 Data dba: 0x11227cb9

.

Extent 19: L1 dba: 0x11400109 Data dba: 0x1140010b

Extent 20: L1 dba: 0x113a3d09 Data dba: 0x113a3d0b

Extent 21: L1 dba: 0x11400189 Data dba: 0x1140018b

Extent 22: L1 dba: 0x113a3d89 Data dba: 0x113a3d8b

Second Level Bitmap block DBAs

DBA 1: 0x11227ca2

Note: the extension meta-information is stored in the segment header block, including start DBA + length + L1 BMB. If there is insufficient space in the header block, a new extent map block is allocated to store extent map.

All L3 BMB are organized together in an one-way linked list, consisting of header control + L2 BMB array

Second Level Bitmap block DBAs

DBA 1: 0x11227ca2

L2 BMB

L1 BMB array: L1 BMB DBA + max freeness + instance id

Buffer tsn: 115 rdba: 0x11227ca2 (68max 2260130)

Scn: 0x0860.07f11d99 seq: 0x02 flg: 0x04 tail: 0x1d992102

Frmt: 0x02 chkval: 0x4536 type: 0x21=SECOND LEVEL BITMAP BLOCK

Dump of Second Level Bitmap Block

Number: 22 nfree: 1 ffree: 20 pdba: 0x11227ca3

Inc #: 0 Objd: 0

Opcode:0

Xid:

L1 Ranges:

0x11227ca1 Free: 1 Inst: 1

0x11227cb1 Free: 1 Inst: 1

0x11227cc1 Free: 1 Inst: 1

.

0x113a3d89 Free: 3 Inst: 1

0x113a3d8a Free: 1 Inst: 1

Free: from 1 to 5 to full and 75% Murray 100% free

L1

Consists of a series of DBA range that describes the space utilization of several contiguous blocks (not across extent). An extent can be described by several BMB

Buffer tsn: 115 rdba: 0x11227ca1 (68max 2260129)

Scn: 0x0860.07f11dac seq: 0x01 flg: 0x04 tail: 0x1dac2001

Frmt: 0x02 chkval: 0x69fb type: 0x20=FIRST LEVEL BITMAP BLOCK

Hex dump of block: st=0, typ_found=1

Dump of First Level Bitmap Block

-

Nbits: 4 nranges: 2 parent dba: 0x11227ca2 poffset: 0

Unformatted: 0 total: 16 first useful block: 3

Owning instance: 1

Instance ownership changed at 02/26/2014 09:35:44

Last successful Search 02/26/2014 09:35:44

Freeness Status: nf1 0 nf2 0 nf3 0 nf4 0

Extent Map Block Offset: 4294967295

First free datablock: 16

Bitmap block lock opcode 0

Locker xid:: 0x0000.000.00000000

Inc #: 0 Objd: 0

DBA Ranges:-- because an extent has 8 blocks, and the L1 describes 16 blocks, it contains 2 range

0x11227ca1 Length: 8 Offset: 0

0x11227ca9 Length: 8 Offset: 8

0:Metadata 1:Metadata 2:Metadata 3:FULL

4:FULL 5:FULL 6:FULL 7:FULL

8:FULL 9:FULL 10:FULL 11:FULL

12:FULL 13:FULL 14:FULL 15:FULL

L1 BMB describes the space utilization of each data block

How do I search for available space?

Query L3-L2-L1 in turn, and finally locate the appropriate DBA. The PID hash value is required when processing L2/L1.

1 L2-L1

Locate L2 according to the segment header L2 Hint for inserts, and the process locates L1 according to its PID hash value and determines whether there is enough space according to L1.free.

If you meet the conditions to jump to the L1 BMB, otherwise try the next L2 BMB

2 L1-DBA

Search for L1 BMB, using the process pid hash as the start dba

When the candidate DBA is found, the process tries to get the block in nowait mode. If there is an active process on the block, then try the next one. After 5 failed attempts, release L1 BMB for buffer busy wait waiting.

If you encounter unformatted blocks, format N blocks and update HWM at once.

Conclusion:

L3 contains a plurality of L2Magi L2 contains a plurality of L1Magens L1 contains a plurality of data blocks.

Select L2 in L3 and rely on L2 Hint for inserts.

Select L1 in L2, according to the hash value of the process PID number

Selecting a data block in L1 is also based on the hash value of the process PID number.

If L2 BMB contains N L1s and L1 BMB contains M DBA, then theoretically, it can support N concurrent insert processes.

However, the high water mark is not taken into account, and the process can only access the block under the HHWM. If the current high water mark is in the M block, the maximum number of concurrent insert processes is supported.

Number of blocks raised at one time at high water mark = min (L1 BMB ranges, extent)

Vage has a classic tuning case.

Symptoms:

An ASSM table is partitioned one day with 1m per uniform extent; since 9:00, it has been inserted concurrently, and there are about 100 processes

Buffer busy wait waits around 9 o'clock every day and disappears for about ten minutes. Then when the pressure is high, there is occasional competition, but it is not as serious as the morning peak.

Analysis:

Through the experiment, it is found that the newly created table has two L1 BMB, but only one of them can be selected by concurrent processes, and each L1 BMB describes 64 blocks.

This is due to the high water mark, the HHWM raises 64 blocks when it is first inserted, and the block described by the L1 BMB cannot be used on top of the HHWM, and the concurrency is 64.

When the segment is greater than 64, an L1 BMB describes 256blocks, while the high water level line grows in units of 128blocks (extent), supporting up to 128concurrent processes.

So the symptoms disappear after a period of time, but there is occasional competition.

Solution:

The author adopts two measures.

When 1 is less than 64m, the high watermark is raised 64 blocks at a time (limited by L1 BMB), and the high watermark is artificially raised to 64m. Theoretically, concurrent processes can be inserted into the

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report