首页 > 其他分享 >[20240604]简单探究RESERVED FREE LISTS chunk size的分布.txt

[20240604]简单探究RESERVED FREE LISTS chunk size的分布.txt

时间:2024-06-11 20:54:43浏览次数:18  
标签:Reserved bucket LISTS FREE 20240604 test RESERVED size

[20240604]简单探究RESERVED FREE LISTS chunk size的分布.txt

--//前几天探究探究free list,无意中发现12c版本free list chunk size的发生了变化.单独另外写一篇blog.
--//我开始分析以为脚本执行有问题,仔细查看12c版本free list chunk size分布发生了变化.
--//我找了以前的11g下的转储,发生实际上11g已经出现这样的变化,只不过大家没有注意罢了.
--//今天看看RESERVED FREE LISTS chunk size的分布情况.

1.环境:
SYS@test> @ver1
PORT_STRING                    VERSION        BANNER                                                                               CON_ID
------------------------------ -------------- -------------------------------------------------------------------------------- ----------
IBMPC/WIN_NT64-9.1.0           12.2.0.1.0     Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production              0

SYS@test> startup mount
ORACLE instance started.
Total System Global Area  805306368 bytes
Fixed Size                  8924064 bytes
Variable Size             297796704 bytes
Database Buffers          490733568 bytes
Redo Buffers                7852032 bytes
Database mounted.

SYS@test> alter session set events 'immediate trace name heapdump level 2';
Session altered.

SYS@test> @ t
TRACEFILE
-----------------------------------------------------------------
D:\APP\ORACLE\diag\rdbms\test\test\trace\test_ora_7940.trc

2.查看转储文件:
d:\tmp> grep  -E "RESERVED FREE LISTS| Reserved bucket " D:\APP\ORACLE\diag\rdbms\test\test\trace\test_ora_7940.trc
RESERVED FREE LISTS:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=4400
 Reserved bucket 2 size=8216
 Reserved bucket 3 size=8752
 Reserved bucket 4 size=8760
 Reserved bucket 5 size=8768
 Reserved bucket 6 size=8776
 Reserved bucket 7 size=9384
 Reserved bucket 8 size=9392
 Reserved bucket 9 size=12368
 Reserved bucket 10 size=12376
 Reserved bucket 11 size=16408
 Reserved bucket 12 size=32792
 Reserved bucket 13 size=65560
 Reserved bucket 14 size=1990664
RESERVED FREE LISTS FOR SIZES 64KB to 512KB:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=65536
 Reserved bucket 2 size=2147483647
RESERVED FREE LISTS FOR SIZES 512KB to 976KB:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=524288
 Reserved bucket 2 size=2147483647
RESERVED FREE LISTS FOR SIZES OVER 976KB:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=999424
 Reserved bucket 2 size=2147483647
RESERVED FREE LISTS:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=4400
 Reserved bucket 2 size=8216
 Reserved bucket 3 size=8752
 Reserved bucket 4 size=8760
 Reserved bucket 5 size=8768
 Reserved bucket 6 size=8776
 Reserved bucket 7 size=9384
 Reserved bucket 8 size=9392
 Reserved bucket 9 size=12368
 Reserved bucket 10 size=12376
 Reserved bucket 11 size=16408
 Reserved bucket 12 size=32792
 Reserved bucket 13 size=65560
 Reserved bucket 14 size=1990664

--//12c输出很奇怪,前后出现相同的内容.
--//我的感觉是分成4段:
RESERVED FREE LISTS:                             <64KB
RESERVED FREE LISTS FOR SIZES 64KB to 512KB:     >=64KB  <512KB
RESERVED FREE LISTS FOR SIZES 512KB to 976KB:    >=512KB <~976KB
RESERVED FREE LISTS FOR SIZES OVER 976KB:        >=976KB

RESERVED FREE LISTS:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=4400

--//RESERVED FREE LISTS非常特殊,一般大于一定大小chunk在有可能在保留池分配,受参数_shared_pool_reserved_min_alloc控制,缺省
--//4400.

SYS@test> @ hide _shared_pool_reserved_min_alloc
NAME                            DESCRIPTION                                                        DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE ISSES ISSYS_MOD
------------------------------- ------------------------------------------------------------------ ------------- ------------- ------------ ----- ---------
_shared_pool_reserved_min_alloc minimum allocation size in bytes for reserved area of shared pool  TRUE          4400          4400         FALSE FALSE

--//一般即使需要使用这么大的chunk,oracle先在普通共享池的Free list中分配,不行才到保留池分配.
--//设置 Reserved bucket 1 size=4400,来源这里.分隔剩下如果小于4400,放入 Reserved bucket 0 size=40中.

--//尝试修改看看:
SYS@test> alter system set "_shared_pool_reserved_min_alloc"=4500 scope=spfile;
System altered.

--//重启数据库略.

SYS@test> alter session set events 'immediate trace name heapdump level 2';
Session altered.

SYS@test> @ t
TRACEFILE
-----------------------------------------------------------------
D:\APP\ORACLE\diag\rdbms\test\test\trace\test_ora_4108.trc

SYS@test> host grep  -E "RESERVED FREE LISTS| Reserved bucket " &TRC
RESERVED FREE LISTS:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=4500
 Reserved bucket 2 size=8216
 Reserved bucket 3 size=8752
 Reserved bucket 4 size=8760
 Reserved bucket 5 size=8768
 Reserved bucket 6 size=8776
 Reserved bucket 7 size=9384
 Reserved bucket 8 size=9392
 Reserved bucket 9 size=12368
 Reserved bucket 10 size=12376
 Reserved bucket 11 size=16408
 Reserved bucket 12 size=32792
 Reserved bucket 13 size=65560
 Reserved bucket 14 size=1990664
RESERVED FREE LISTS FOR SIZES 64KB to 512KB:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=65536
 Reserved bucket 2 size=2147483647
RESERVED FREE LISTS FOR SIZES 512KB to 976KB:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=524288
 Reserved bucket 2 size=2147483647
RESERVED FREE LISTS FOR SIZES OVER 976KB:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=999424
 Reserved bucket 2 size=2147483647
RESERVED FREE LISTS:
 Reserved bucket 0 size=40
 Reserved bucket 1 size=4500
 Reserved bucket 2 size=8216
 Reserved bucket 3 size=8752
 Reserved bucket 4 size=8760
 Reserved bucket 5 size=8768
 Reserved bucket 6 size=8776
 Reserved bucket 7 size=9384
 Reserved bucket 8 size=9392
 Reserved bucket 9 size=12368
 Reserved bucket 10 size=12376
 Reserved bucket 11 size=16408
 Reserved bucket 12 size=32792
 Reserved bucket 13 size=65560
 Reserved bucket 14 size=1990664
--//可以发现改变隐含参数,导致 Reserved bucket 1 size=4500,但是Reserved bucket 2 size=8216没有变化.

--//还原:
SYS@test> alter system reset "_shared_pool_reserved_min_alloc";
System altered.

--//重启数据库略.

标签:Reserved,bucket,LISTS,FREE,20240604,test,RESERVED,size
From: https://www.cnblogs.com/lfree/p/18242709

相关文章

  • 【教学类-13-05】20240604《数字色块图-5*7*8-A4横板-横切》中4班
    背景需求:【教学类-13-04】20230404《数字色块图+判断密码是否正确-5*7*8-A4横板-横切》(中班主题《我爱我家》)_图案密码色块-CSDN博客文章浏览阅读530次。【教学类-13-04】20230404《数字色块图+判断密码是否正确-5*7*8-A4横板-横切》(中班主题《我爱我家》)_图案密码色块......
  • 翻译《The Old New Thing》- Hotkeys involving the Windows logo key are reserved b
    HotkeysinvolvingtheWindowslogokeyarereservedbythesystem-TheOldNewThing(microsoft.com)https://devblogs.microsoft.com/oldnewthing/20071130-00/?p=24333RaymondChen 2007年11月30日Windows徽标键的热键由系统保留        系统保留了......
  • 解决postgres数据库remaining connection slots are reserved for non-replication su
    来源:【小工具】-解决postgres数据库remainingconnectionslotsarereservedfornon-replicationsuperuserconnectio-CSDN博客psycopg2.OperationalError:FATAL:remainingconnectionslotsarereservedfornon-replicationsuperuserconnection报错信息Traceback......
  • 在CMakeLists.txt中添加源文件的几种方法
    单个.cpp源文件的情况用这段代码进行测试,CMake中添加一个可执行文件作为构建目标:#include<cstdio>intmain(){printf("Hello,world!\n");}指定源文件的时候可以有两种方式。在创建目标的时候直接指定源文件add_executable(mainmain.cpp)先创建目标,再添加源......
  • HTML 18 - Lists
     HTMLListisacollectionofrelatedinfomation.Thelistscanbeorderedorunderdereddependingontherequirement.Inhtmlwecancreatebothorderandunorderlistsbyusing<ol>and<ul>tags.Eachtypeoflistcanbedecoratedusingpo......
  • LeetCode 1669. Merge In Between Linked Lists
    原题链接在这里:https://leetcode.com/problems/merge-in-between-linked-lists/description/题目:Youaregiventwolinkedlists: list1 and list2 ofsizes n and m respectively.Remove list1'snodesfromthe ath nodetothe bth node,andput list2 in......
  • CMakeLists.txt --- install使用
    例:cmake_minimum_required(VERSION3.9)project(test)set(CMAKE_BUILD_TYPEDebug)add_library(hahatest.cpp)install(TARGEThahaDESTINATION/home/linxisuo/project/test)install(DIRECTORY${CMAKE_SOURCE_DIR}/testDESTINATION/home/linxisuo)说明:1.安装......
  • CMakeLists.txt --- 导入接口库(预编译库)
    以接口库的方式导入预编译库cmake_minimum_required(VERSION3.9)project(test)set(CMAKE_BUILD_TYPEDebug)set(CMAKE_C_FLAGS"$ENV{CFLAGS}-O2-Wall-pthread")set(CMAKE_CXX_FLAGS"$ENV{CFLAGS}-O2-Wall-pthread-std=c++11-std=gnu++11")#设置mo......
  • [Vue warn]: Do not use built-in or reserved HTML elements as component id: line
    [Vuewarn]:Donotusebuilt-inorreservedHTMLelementsascomponentid:line这个报错是Vue警告不要使用内置的或者保留的HTML元素作为组件的id。在Vue中,组件的id应该是唯一的,并且不应该与HTML元素的标签名相同。比如说,如果有一个组件定义如下:<template><......
  • Vue中component lists rendered with v-for should have explicit keys异常
    在Vue.js中,当你在组件列表中使用v-for指令渲染多个组件时,每个组件元素都应当有一个明确的key属性。Vue.js引擎通过这个key来优化虚拟DOM的diff过程,提升页面更新效率,并确保状态保持一致。例如,如果你有这样的代码:Vue<ul><liv-for="iteminitems">{{......