Sharedpool 2: freelists/sharedpoollrulist

Source: Internet
Author: User
This section describes freelists and sharedpoollrulist. freelist idle list is divided by bucket. There are a total of 255 buckets. bucket0 --- bucket254 each bucket has a chunklist; freelists have unused chunkRESERVEDFREELISTS: the number of buckets on RESERVEDFREELISTS is 15.

This section describes free lists and shared pool lru list. the free list idle list is divided by bucket. There are a total of 255 buckets. bucket 0 --- bucket 254 each bucket has a chunk list; the free lists instances all have unused chunk reserved free lists: the number of buckets on the reserved free lists is 15.

This section describes free lists and shared pool lru list.
Free list: the free list is divided by bucket. There are 255 free list items in total. bucket 0 --- bucket 254
Each bucket has a chunk list; on free lists, all chunks are not used.
Reserved free lists:
The number of buckets on the reserved free lists is 15.
Keep free lists. When the CHUNK required by the SQL statement is greater than 4400bytes, the idle CHUNK will be searched in RESERVED FREE LISTS.
If the CHUNK required by the SQL statement is no greater than 4400bytes, the CHUNK will only be searched in the free list.
This is controlled by implicit parameters: _ shared_pool_reserved_min_alloc minimum allocation size in bytes for reserved area. The default value is 4400.
###################
View the free lists/bucket/reserved free lists structure in the DUMP Shared Pool: -- create a session
Alter session set events 'immediate trace name heapdump level 2 ';
Select value from v $ diag_info where name like 'de % ';
/U01/diag/rdbms/bys3/bys3/trace/bys3_ora_7876.trc
View TRACE file content: -- find this section: VI search HEAP DUMP
Chunk 2bffa844 sz= 22460 freeable "character set m"
Total heap size = 146798680 -- 146798680/1024/1024 -- 139.99813 initialization parameter: shared_pool_size -- 140 M
Free lists: ------ idle column, you can clearly see the rule of bucket size allocation-from small to large, there are a total of 255 buckets, from 16 bytes to 64 k, use this method to allocate memory, it can effectively reduce memory fragments. Each Bucket is connected by double linked.
Bucket 0 size = 16
Chunk 2bc00048 sz = 0 kghdsx
Bucket 1 size = 20 bytes Bucket 1, there are many chunks, saving space omitted
Chunk 23a60468 sz = 20 free ""
Chunk address, size, and status
Chunk 23ceb498 sz = 20 free ""
Chunk 237fcde4 sz = 20 free ""
Bucket 2 size = 24 -- Bucket 2 -- 24 bytes
Chunk 245b13e4 sz = 24 free ""
Chunk 23ace7c0 sz = 24 free ""
Chunk 239c5a28 sz = 24 free ""
Bucket 3 size = 28
Chunk 24540e9c sz = 28 free ""
Chunk 2521209c sz = 28 free ""
Chunk 23483448 sz = 28 free ""
......
Bucket 252 size = 16396
Bucket 253 size = 32780
Bucket 254 size = 65548
Total free space = 518232
Reserved free lists: -- retain free lists. The parsing method is the same as above. The chunks in the reserved pool are relatively large.
Reserved bucket 0 size = 16
Chunk 23420320 sz = 676 R-free ""
Chunk 23427b94 sz = 3420 R-free ""
Chunk 2342618c sz = 952 R-free ""
Chunk 23800050 sz = 1040 R-free ""
Chunk 23400050 sz = 2824 R-free ""
Chunk 25bff028 sz = 4032 R-free ""
Chunk 293ff788 sz = 2144 R-free ""
Reserved bucket 1 size = 4400 -- if this is used, 4564-4400, and the remaining 164 bytes will become the new CHUNK
Chunk 23430a40 sz = 4564 R-free ""
Reserved bucket 2 size = 8204
Reserved bucket 3 size = 8460
Reserved bucket 4 size = 8464
Reserved bucket 5 size = 8468
Reserved bucket 6 size = 8472
Chunk 2342b988 sz = 9136 R-free ""
Reserved bucket 7 size = 9296
Reserved bucket 8 size = 9300
Reserved bucket 9 size = 12320
Reserved bucket 10 size = 12324
Reserved bucket 11size = 16396
Chunk 234161f8 sz = 16448 R-free ""
Reserving bucket 12 size = 32780
Reserved bucket 13 size = 65548
Chunk 23401d50 sz = 72296 R-free ""
Chunk 23815668 sz = 125312 R-free ""
Chunk 23c00050 sz= 180380 R-free ""
Reserved bucket 14 size = 1990652
Total reserved free space = 6712468 -- the Total idle reserved space is 6.4 M, and the initial parameter size of shared_pool_reserved_size is 7 M, 0.6 M is used.
######################
In the shared pool LRU chain, all chunks in the recreate State are mounted on the LRU chain of the shared pool. Multiple chunks may be required for an SQL statement, and the chunks in the recreate State are found on the LRU chain, then, the freeabl chunk will be mounted under the CHUNK in the recreate State, to avoid all chunks being too long on the LRU chain.
Find a section about (lru first) in the TRACE file. The method is the same as above:
Reserved bucket 14 size = 1990652
Total reserved free space = 6712468
Unpinned recreatable chunks (lru first ):
Chunk 246c9848 sz = 348 recreate "KGLHD" latch = (nil) -- latch status is empty, Chunk SIZE is 348 bytes, status recreate,
Chunk 237cb10c sz = 4096 recreate "KGLH0 ^ b9197c6e" latch = (nil)
Chunk 24bb5df0 sz = 364 recreate "KGLHD" latch = (nil)
Chunk 241aa1b8 sz = 4096 recreate "KGLH0 ^ 59449e50" latch = (nil)
Chunk 252640a0 sz = 364 recreate "KGLHD" latch = (nil)
Chunk 23a619a0 sz = 4096 recreate "KGLH0 ^ d5f1e0d7" latch = (nil)
Chunk 23465600 sz = 348 recreate "KGLHD" latch = (nil)
Chunk 2346575c sz = 1036 recreate "KGLHD" latch = (nil)
Chunk 23465b68 sz = 4096 recreate"KGLH0 ^ c6e0d102" latch = (nil) -- one RecreateMultiple freeable status chunks under the CHUNK
Ds 24bdecb0 sz= 4096 ct = 1
Chunk 23466b68 sz = 4096 freeable "SQLA ^ 1536bb77" ds = 0x23db5bd8
Chunk 2366b68 sz = 144 freeable "KGLDA"
Chunk 2366bf8 sz = 4096 freeable "KGLH0 ^ ba3f9b05" ds = 0x2425e238

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.