设为首页 加入收藏

TOP

[20190419]shared latch spin count 2.txt(一)
2019-09-17 18:49:45 】 浏览:76
Tags:20190419 shared latch spin count 2.txt

[20190419]shared latch spin count 2.txt

--//上午测试shared latch XX模式的情况,链接:http://blog.itpub.net/267265/viewspace-2641902/
--//继续测试其它情况.
--//链接:http://andreynikolaev.wordpress.com/2011/01/14/spin-tales-part-2-shared-latches-in-oracle-9-2-11g/

                S mode get  X mode get
Held in S mode  Compatible  2*_spin_count
Held in X mode           0  2*_spin_count
Blocking mode            0  2*_spin_count


1.环境:
SCOTT@book> @ ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

SYS@book> @ hide spin_count
NAME              DESCRIPTION                        DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE
----------------- ---------------------------------- ------------- ------------- ------------
_mutex_spin_count Mutex spin count                   TRUE          255           255
_spin_count       Amount to spin waiting for a latch TRUE          2000          2000

$ cat shared_latch.txt
/* 参数如下: @ latch.txt latch_name willing why where mode sleep_num */
--//connect / as sysdba
col laddr new_value laddr
col vmode  new_value vmode
select decode(lower('&&5'),'s',8,'x',16,'8',8,'16',16) vmode from dual ;
SELECT addr laddr FROM v$latch_parent WHERE NAME='&&1';
oradebug setmypid
oradebug call kslgetsl_w 0x&laddr &&2 &&3 &&4  &vmode
host sleep &&6
oradebug call kslfre 0x&laddr
--//exit
--//注:我前几天的测试脚本有connect / as sysdba,exit这两行,我为了调式方便,先注解这2行,避免反复退出进入会话.

2.测试1:
--//选择一个shared latch测试,我选择"test shared non-parent l0" latch测试:
SYS@book> select * from shared_latches where name='test shared non-parent l0';
VERSION    LATCH# NAME                      S
---------- ------ ------------------------- -
11.2.0.4.0      6 test shared non-parent l0 Y

2.测试一些细节不再列出,参考链接:http://blog.itpub.net/267265/viewspace-2641902/
--//测试XS模式的情况:
--//session 1:
SYS@book> @ shared_latch.txt "test shared non-parent l0&

首页 上一页 1 2 3 4 下一页 尾页 1/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇MySQL 多实例的安装 下一篇读书笔记——《redis入门指南(第..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目