gc current block pin time gc current block flush time 疑惑
非常簡單的記錄,沒有可讀性,留作一個疑惑。
第一個節點更新資料塊
第二個節點更新同樣的資料塊
由於是更新操作,因此需要塊的current block
第二個節點像第一個節點要求current block,再傳送前,第一個節點需要pin住此塊,把log buffer內的內容寫磁碟。
統計量裡的gc current block pin time gc current block flush time分別對應了此種情況。但是我模擬的情況,發現並沒有發生統計量的增加。
節點1:
test@ILSP>select
2 statistic#,
3 name,
4 value
5 from
6 v$sysstat where statistic# in (215,216);
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 68
216 gc current block flush time 7019
test@ILSP> update t_one set v1='10' where n1=265 and rownum=1;
1 row updated.
test@ILSP>
test@ILSP>select
2 statistic#,
3 name,
4 value
5 from
6 v$sysstat where statistic# in (215,216);
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 68
216 gc current block flush time 7019
節點2:
test@ILSP>select
2 statistic#,
3 name,
4 value
5 from
6 v$sysstat where statistic# in (215,216);
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 67
216 gc current block flush time 6906
test@ILSP> update t_one set v1='10' where n1=266 and rownum=1;
1 row updated.
test@ILSP>
test@ILSP>select
2 statistic#,
3 name,
4 value
5 from
6 v$sysstat where statistic# in (215,216);
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 67
216 gc current block flush time 6906
但是,另一個場景卻發生了:
test@ILSP>begin
2 for i in 1 ..100000 loop
3 UPDATE wxh_tbd SET object_name=20 where rowid='AAAVaMAAEAAABDjAAA';
4 commit write immediate wait;
5 end loop;
6 end;
7 /
test@ILSP>begin
2 for i in 1 ..10000 loop
3 UPDATE wxh_tbd SET object_name=20 where rowid='AAAVaMAAEAAABDjAAB';
4 commit write immediate wait;
5 end loop;
6 end;
7 /
sys@ILSP>select
2 statistic#,
3 name,
4 value
5 from
6 v$sysstat where statistic# in (215,216);
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 72
216 gc current block flush time 7502
2 rows selected.
sys@ILSP>/
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 73
216 gc current block flush time 7545
2 rows selected.
sys@ILSP>/
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 73
216 gc current block flush time 7570
2 rows selected.
sys@ILSP>/
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 74
216 gc current block flush time 7591
我的版本是11.2.0.3,我的猜想,可能是ORACLE做了最佳化,再傳送current block前檢查下對應的日誌有沒有寫磁碟,如果已經寫磁碟了,就不需要再去做pin和flush的操作了。
第一個節點更新資料塊
第二個節點更新同樣的資料塊
由於是更新操作,因此需要塊的current block
第二個節點像第一個節點要求current block,再傳送前,第一個節點需要pin住此塊,把log buffer內的內容寫磁碟。
統計量裡的gc current block pin time gc current block flush time分別對應了此種情況。但是我模擬的情況,發現並沒有發生統計量的增加。
節點1:
test@ILSP>select
2 statistic#,
3 name,
4 value
5 from
6 v$sysstat where statistic# in (215,216);
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 68
216 gc current block flush time 7019
test@ILSP> update t_one set v1='10' where n1=265 and rownum=1;
1 row updated.
test@ILSP>
test@ILSP>select
2 statistic#,
3 name,
4 value
5 from
6 v$sysstat where statistic# in (215,216);
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 68
216 gc current block flush time 7019
節點2:
test@ILSP>select
2 statistic#,
3 name,
4 value
5 from
6 v$sysstat where statistic# in (215,216);
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 67
216 gc current block flush time 6906
test@ILSP> update t_one set v1='10' where n1=266 and rownum=1;
1 row updated.
test@ILSP>
test@ILSP>select
2 statistic#,
3 name,
4 value
5 from
6 v$sysstat where statistic# in (215,216);
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 67
216 gc current block flush time 6906
但是,另一個場景卻發生了:
test@ILSP>begin
2 for i in 1 ..100000 loop
3 UPDATE wxh_tbd SET object_name=20 where rowid='AAAVaMAAEAAABDjAAA';
4 commit write immediate wait;
5 end loop;
6 end;
7 /
test@ILSP>begin
2 for i in 1 ..10000 loop
3 UPDATE wxh_tbd SET object_name=20 where rowid='AAAVaMAAEAAABDjAAB';
4 commit write immediate wait;
5 end loop;
6 end;
7 /
sys@ILSP>select
2 statistic#,
3 name,
4 value
5 from
6 v$sysstat where statistic# in (215,216);
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 72
216 gc current block flush time 7502
2 rows selected.
sys@ILSP>/
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 73
216 gc current block flush time 7545
2 rows selected.
sys@ILSP>/
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 73
216 gc current block flush time 7570
2 rows selected.
sys@ILSP>/
STATISTIC# NAME VALUE
---------- ---------------------------------------------------------------- ----------
215 gc current block pin time 74
216 gc current block flush time 7591
我的版本是11.2.0.3,我的猜想,可能是ORACLE做了最佳化,再傳送current block前檢查下對應的日誌有沒有寫磁碟,如果已經寫磁碟了,就不需要再去做pin和flush的操作了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22034023/viewspace-1427402/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- gc current/cr block busy等待事件GCBloC事件
- 解決gc current request等待事件GC事件
- gc current request 引起長期鎖表的故障GC
- PostgreSQL DBA(111) - pgAdmin(Don't do this:Don't use CURRENT_TIME)SQL
- BlockBloC
- Block學習①--block的本質BloC
- Unused Block Compression和Null Block CompressionBloCNull
- 7.71 CURRENT_TIMESTAMP
- 7.70 CURRENT_DATE
- Full GC (Metadata GC Threshold)GC
- __block使用BloC
- 從CLR GC到CoreCLR GCGC
- Block學習②--block的變數捕獲BloC變數
- iOS block巢狀block中weakify的使用iOSBloC巢狀
- GCGC
- GC.MaxGeneration屬性【GC示例】GC
- time time_t tm用法
- iOS Block探究iOSBloC
- Avoided redundant navigation to current location: "/users"IDENavigation
- MySQL中的CURRENT_TIMESTAMPMySql
- ON UPDATE CURRENT_TIMESTAMP請慎用
- Block學習⑤--block對物件變數的捕獲BloC物件變數
- GC是什麼?為什麼要有GC?GC
- JVM 系列文章之 Full GC 和 Minor GCJVMGC
- AUTHID CURRENT_USER的注意點
- Vue, Avoided redundant navigation to current location: "/login".VueIDENavigation
- Block的型別BloC型別
- block實現原理BloC
- E. Block SequenceBloC
- DREAM TIME
- display:block display:inline-block 的屬性、呈現和作用BloCinline
- 總結Minor GC、Full GC觸發條件GC
- 20 compliments that needs to be said to my girl from time to timeAI
- python的GCPythonGC
- java GC CollectorJavaGC
- gc buffer busyGC
- gc 檢視GC
- Block深入學習,授人以漁。—— Block與各種變數BloC變數
- Git之提示There is no tracking information for the current branch.GitORM