[20190402]關於semtimedop函式呼叫2.txt
[20190402]關於semtimedop函式呼叫2.txt
--//前幾天做了sql語句在mutexes上的探究.今天看看_mutex_wait_time設定很大的情況下是否semtimedop會喚醒.
1.環境:
SYS@book> @ hide mutex
NAME DESCRIPTION DEFAULT_VALUE SESSION_VALUE SYSTEM_VALUE
------------------- ------------------ ------------- ------------- ------------
_mutex_spin_count Mutex spin count TRUE 255 255
_mutex_wait_scheme Mutex wait scheme TRUE 2 2
_mutex_wait_time Mutex wait time TRUE 1 1
--//注:_mutex_wait_time=1,相當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
$ cat m2.txt
set verify off
column a noprint new_value v_a;
--select mod ( &&3 ,3) a from dual ;
--alter session set optimizer_index_cost_adj= &&3;
host sleep $(echo &&3/50| bc -l )
insert into job_times values ( sys_context ('userenv', 'sid') ,dbms_utility.get_time ,'&&2') ;
commit ;
declare
v_id number;
v_d date;
begin
for i in 1 .. &&1 loop
--select 1 into v_id from dual ;
--select sysdate into v_d from dual ;
select deptno into v_id from dept where deptno=10;
end loop;
end ;
/
update job_times set time_ela = dbms_utility.get_time - time_ela where sid=sys_context ('userenv', 'sid') and method='&&2';
commit;
--quit
$ seq 150 | xargs -I {} -P 150 bash -c "sqlplus -s -l scott/book @m2.txt 1e6 f2_150 {} >/dev/null"
SYS@book> @ mutexy 6 a31kd5tkdvvmm
HASH SUM_SLEEPS SUM_GETS LOCATION MUTEX_TYPE MUTEX_ADDR SQLID KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099 2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2183544 4.4733E+10 kksfbc [KKSCHLFSP2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 5256 600010918 kksfbc [KKSCHLPIN1] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 6 45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
--//MUTEX_ADDR=000000007C88E330.
2.測試:
--//session 1:
SCOTT@book> @ spid
SID SERIAL# PROCESS SERVER SPID PID P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
295 5 65222 DEDICATED 65223 21 3 alter system kill session '295,5' immediate;
--//session 2:
SYS@book> alter system set "_mutex_wait_scheme"=2 scope=memory;
System altered.
SYS@book> alter system set "_mutex_wait_time"=100000;
alter system set "_mutex_wait_time"=100000
*
ERROR at line 1:
ORA-00068: invalid value 100000 for parameter _mutex_wait_time, must be between 0 and 65535
--//在0-65536之間.
SYS@book> alter system set "_mutex_wait_time"=1000;
System altered.
--//相當於10秒.
--//session 2:
SYS@book> oradebug setmypid
Statement processed.
SYS@book> oradebug peek 0x000000007C88E330 8
[07C88E330, 07C88E338) = 00000000 00000000
SYS@book> oradebug poke 0x000000007C88E330 8 0x0000000200000127
BEFORE: [07C88E330, 07C88E338) = 00000000 00000000
AFTER: [07C88E330, 07C88E338) = 00000127 00000002
--//session 1:
SCOTT@book> @ m2.txt 1 c1 0
1 row created.
Commit complete.
--//掛起!!
3.監測:
$ strace -frT -p 65223
....
4.001032 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000065>
0.000156 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000022>
0.000122 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000687>
3.000815 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.001003>
3.001148 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.000630>
4.000734 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000064>
0.000156 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000022>
0.000122 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000950>
3.001082 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000722>
3.000865 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.000592>
4.000697 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000061>
0.000152 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000022>
0.000121 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000734>
3.000862 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.001028>
3.001176 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.000716>
--//可以看出非常像dbms_lock.sleep呼叫,被拆分3,3,4秒分別執行.
--//但是我並沒有看解除阻塞後喚醒的情況,我測試多次.
SYS@book> oradebug poke 0x000000007C88E330 8 0x0000000200000127
BEFORE: [07C88E330, 07C88E338) = 00000000 00000000
AFTER: [07C88E330, 07C88E338) = 00000127 00000002
-----------------------------------
4.000819 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000062>
0.000153 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000022>
0.000124 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000019>
0.000087 times({tms_utime=52174, tms_stime=5472, tms_cutime=0, tms_cstime=0}) = 10874034811 <0.000019>
0.000076 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000020>
0.000097 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000017>
0.000087 getrusage(RUSAGE_SELF, {ru_utime={521, 748682}, ru_stime={54, 729679}, ...}) = 0 <0.000020>
0.000134 getrusage(RUSAGE_SELF, {ru_utime={521, 749681}, ru_stime={54, 729679}, ...}) = 0 <0.000020>
--//另外我注意一個細節,如果設定_mutex_wait_time>1的情況下,就會出現指數回退的情況,以下是10秒的情況.
_mutex_wait_scheme = 0 – Always YIELD
_mutex_wait_scheme = 1 & _mutex_wait_time = t – Always SLEEP for t milli-seconds (default)
_mutex_wait_scheme = 2 & _mutex_wait_time = t – EXP BACKOFF with maximum sleep
---------------------
$ strace -frT -p 65223 -e semtimedop,getrusage
Process 65223 attached - interrupt to quit
0.000000 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000036>
0.000250 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
0.000096 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
0.000199 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000018>
0.000155 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000152 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000131 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
0.000201 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000108 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
0.000100 getrusage(RUSAGE_SELF, {ru_utime={521, 774678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000703 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000020>
0.000227 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000018>
0.000109 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000478 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000018>
0.000177 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
0.000106 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000149 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000145 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000155 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
0.000108 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
0.000136 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000104 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
0.000106 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000109 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000342 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000019>
0.000205 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000123 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000017>
0.000106 getrusage(RUSAGE_SELF, {ru_utime={521, 775678}, ru_stime={54, 741678}, ...}) = 0 <0.000016>
0.000968 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
0.000243 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000026>
0.000128 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
0.000173 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
0.000172 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
0.000164 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000023>
0.000160 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000023>
0.000176 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000021>
0.000122 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
0.000117 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
0.000206 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000023>
0.000129 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000021>
0.000160 getrusage(RUSAGE_SELF, {ru_utime={521, 776677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
0.000309 semtimedop(309952512, 0x7fff28087160, 1, {0, 10000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.010902>
0.011073 semtimedop(309952512, 0x7fff28087160, 1, {0, 10000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.010790>
0.010927 semtimedop(309952512, 0x7fff28087160, 1, {0, 30000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.030891>
0.031029 semtimedop(309952512, 0x7fff28087160, 1, {0, 70000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.070846>
0.070985 semtimedop(309952512, 0x7fff28087160, 1, {0, 120000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.120839>
0.120948 semtimedop(309952512, 0x7fff28087160, 1, {0, 110000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.110910>
0.111058 semtimedop(309952512, 0x7fff28087160, 1, {0, 200000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.200888>
0.201025 semtimedop(309952512, 0x7fff28087160, 1, {0, 150000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.150867>
0.151005 semtimedop(309952512, 0x7fff28087160, 1, {0, 320000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.320891>
0.321029 semtimedop(309952512, 0x7fff28087160, 1, {0, 310000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.310879>
--//實際上阻塞的情況下.睡眠的時間間隔開始一直在增加.從1,1,3,7,12,11,20,15,32,31cs增加.
0.311003 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000032>
0.311003 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000032>
0.000157 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000027>
0.000187 semtimedop(309952512, 0x7fff28087160, 1, {0, 640000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.640510>
0.640646 semtimedop(309952512, 0x7fff28087160, 1, {0, 670000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.670902>
0.671039 semtimedop(309952512, 0x7fff28087160, 1, {1, 320000000}) = -1 EAGAIN (Resource temporarily unavailable) <1.320895>
--//這裡也是 64,67,132
1.321017 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
0.000148 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000026>
0.000152 semtimedop(309952512, 0x7fff28087160, 1, {1, 310000000}) = -1 EAGAIN (Resource temporarily unavailable) <1.310542>
--//這裡也是 131 ,後面還有.
1.310665 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
0.000145 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000027>
0.000149 semtimedop(309952512, 0x7fff28087160, 1, {2, 600000000}) = -1 EAGAIN (Resource temporarily unavailable) <2.600601>
2.600719 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
0.000131 getrusage(RUSAGE_SELF, {ru_utime={521, 777677}, ru_stime={54, 741678}, ...}) = 0 <0.000027>
0.000149 semtimedop(309952512, 0x7fff28087160, 1, {2, 710000000}) = -1 EAGAIN (Resource temporarily unavailable) <2.710794>
2.710915 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000029>
0.000147 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000025>
0.000156 semtimedop(309952512, 0x7fff28087160, 1, {5, 280000000}) = -1 EAGAIN (Resource temporarily unavailable) <5.280287>
5.280409 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
0.000151 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000026>
0.000151 semtimedop(309952512, 0x7fff28087160, 1, {5, 270000000}) = -1 EAGAIN (Resource temporarily unavailable) <5.270622>
--//527cs
5.270746 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000032>
0.000153 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000026>
0.000151 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000675>
3.000791 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000792>
3.000935 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.001177>
--//從這裡開始等10秒pin 255次.
4.001331 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000027>
0.000151 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000025>
0.000161 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000379>
3.000496 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000744>
3.000882 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.000976>
4.001137 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000029>
0.000157 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000025>
0.000159 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000474>
3.000592 semtimedop(309952512, 0x7fff28087160, 1, {3, 0}) = -1 EAGAIN (Resource temporarily unavailable) <3.000800>
3.000943 semtimedop(309952512, 0x7fff28087160, 1, {4, 0}) = -1 EAGAIN (Resource temporarily unavailable) <4.001361>
4.001510 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000029>
0.000155 getrusage(RUSAGE_SELF, {ru_utime={521, 778677}, ru_stime={54, 741678}, ...}) = 0 <0.000027>
0.000176 getrusage(RUSAGE_SELF, {ru_utime={521, 779677}, ru_stime={54, 741678}, ...}) = 0 <0.000028>
0.000162 getrusage(RUSAGE_SELF, {ru_utime={521, 779677}, ru_stime={54, 741678}, ...}) = 0 <0.000023>
0.000140 getrusage(RUSAGE_SELF, {ru_utime={521, 779677}, ru_stime={54, 741678}, ...}) = 0 <0.000022>
--//_mutex_wait_time=2的情況,不是很明顯,僅僅執行2次semtimedop sleep 0.01秒的情況.
65223 0.000106 getrusage(RUSAGE_SELF, {ru_utime={522, 312596}, ru_stime={54, 819666}, ...}) = 0 <0.000024>
65223 0.000140 getrusage(RUSAGE_SELF, {ru_utime={522, 312596}, ru_stime={54, 819666}, ...}) = 0 <0.000023>
65223 0.000237 semtimedop(309952512, 0x7fff28087160, 1, {0, 10000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.010283>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65223 0.010404 semtimedop(309952512, 0x7fff28087160, 1, {0, 10000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.010921>
65223 0.011033 semtimedop(309952512, 0x7fff28087160, 1, {0, 20000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.020893>
65223 0.021011 semtimedop(309952512, 0x7fff28087160, 1, {0, 20000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.020881>
65223 0.020998 semtimedop(309952512, 0x7fff28087160, 1, {0, 20000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.020877>
65223 0.020993 semtimedop(309952512, 0x7fff28087160, 1, {0, 20000000}) = -1 EAGAIN (Resource temporarily unavailable) <0.020885>
--//再來看看sleep記數:
$ sqlplus -s -l / as sysdba <<EOF
> $(seq 1000| xargs -I {} echo -e "@ mutexy 5 a31kd5tkdvvmm\nhost sleep 10\n")
> EOF
HASH SUM_SLEEPS SUM_GETS LOCATION MUTEX_TYPE MUTEX_ADDR SQLID KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099 161166910 600017934 kksfbc [KKSCHLPIN1] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2183544 4.4733E+10 kksfbc [KKSCHLFSP2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 6 45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
HASH SUM_SLEEPS SUM_GETS LOCATION MUTEX_TYPE MUTEX_ADDR SQLID KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099 161166942 600047254 kkslce [KKSCHLPIN2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2183544 4.4733E+10 kksfbc [KKSCHLFSP2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 6 45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
HASH SUM_SLEEPS SUM_GETS LOCATION MUTEX_TYPE MUTEX_ADDR SQLID KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099 161166948 600047254 kkslce [KKSCHLPIN2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2183544 4.4733E+10 kksfbc [KKSCHLFSP2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 6 45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
HASH SUM_SLEEPS SUM_GETS LOCATION MUTEX_TYPE MUTEX_ADDR SQLID KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099 161166952 600047254 kkslce [KKSCHLPIN2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2183544 4.4733E+10 kksfbc [KKSCHLFSP2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 6 45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
HASH SUM_SLEEPS SUM_GETS LOCATION MUTEX_TYPE MUTEX_ADDR SQLID KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099 161166954 600047254 kkslce [KKSCHLPIN2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2183544 4.4733E+10 kksfbc [KKSCHLFSP2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 6 45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
HASH SUM_SLEEPS SUM_GETS LOCATION MUTEX_TYPE MUTEX_ADDR SQLID KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099 161166956 600047254 kkslce [KKSCHLPIN2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2183544 4.4733E+10 kksfbc [KKSCHLFSP2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 6 45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
HASH SUM_SLEEPS SUM_GETS LOCATION MUTEX_TYPE MUTEX_ADDR SQLID KGLNAOWN C100
---------- ---------- ---------- ------------------------------ -------------------- ---------------- ------------- -------- ---------------------------------------
1692266099 161166958 600047254 kkslce [KKSCHLPIN2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2263154 4.6431E+10 kksLockDelete [KKSCHLPIN6] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 2183544 4.4733E+10 kksfbc [KKSCHLFSP2] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
1692266099 6 45955498 kksHeapReadUnlock [KKSCHLRDUP] Cursor Pin 000000007C88E330 a31kd5tkdvvmm SELECT DEPTNO FROM DEPT WHERE DEPTNO=10
--//sleep計數與getrusage呼叫有關,後面增加都是2次.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2640076/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [20190401]關於semtimedop函式呼叫.txt函式
- C++ 反彙編:關於函式呼叫約定C++函式
- [20170503]]函式COALESCE優於NVL 2.txt函式
- 關於函式指標函式指標
- 子函式呼叫函式
- 函式呼叫棧函式
- 關於count函式的理解函式
- 關於path_alloc()函式函式
- 關於inline函式inline函式
- 關於lag函式的用法函式
- 關於建構函式與解構函式的分享函式
- 外部函式的呼叫函式
- gdb 如何呼叫函式?函式
- 函式指標呼叫函式指標
- C程式函式呼叫&系統呼叫C程式函式
- python關於函式形參Python函式
- 關於scanf函式的問題函式
- 關於close函式和cp命令函式
- 關於函式索引的問題?函式索引
- Oracle中關於函式的使用Oracle函式
- 關於qt中的tr()函式QT函式
- 關於Oracle取整的函式Oracle函式
- PostgreSQL函式裡呼叫函式(SETOF + RETURN QUERY)SQL函式
- JS中函式內套函式的呼叫JS函式
- js函式 函式自呼叫 返回函式的函式 (閉包)JS函式
- 關於cuda中的函式問題函式
- 關於oracle內建函式的使用Oracle函式
- 關於Oracle自定義分組函式Oracle函式
- 關於函式索引(function-based index)函式索引FunctionIndex
- 關於字串的功能函式小結字串函式
- httprunner yml 呼叫外部函式HTTP函式
- Javascript的函式呼叫與thisJavaScript函式
- C中呼叫Lua函式函式
- 幾種函式呼叫方式函式
- sequence 和索引函式呼叫索引函式
- 如何使用函式指標呼叫類中的函式和普通函式函式指標
- [iOS] [OC] 關於block回撥、高階函式“回撥再呼叫”及專案實踐iOSBloC函式
- 核心函式 系統呼叫 系統命令 庫函式函式