從v$sysstat的指標ges messages sent理解oracle 10.2.0.1 rac lmd程式系列三
結論
1,如果節點間的DML操作非常頻繁,會在節點間產生大量的GES資訊傳遞2,ges messages sent可以評估RAC節點的DML操作或通訊是否頻繁,如果此值小,說明RAC資料庫並不繁忙
3,lmd程式是負責傳送ges message到遠端的RAC節點
4,如果用oradebug suspend lmd,會導致遠端RAC節點的insert操作受阻,可見lmd程式就是管理全域性鎖資源
5,ges messages sent在lmd hang時,也會有微量的增加
6,引申一下,可能v$sysstat中的效能指標,說白了就是評估RAC不同的後臺程式的效能的,透過這些指標可以進一步分析後臺程式是否正常
進而進一步診斷分析RAC資料庫的效能
測試
SQL> select * from v$version where rownum=1;BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
SQL> select statistic#,name,class from v$statname where lower(name) like '%ges%';
STATISTIC# NAME CLASS
---------- ---------------------------------------------------------------- ----------
22 messages sent 128
23 messages received 128
44 gcs messages sent 32
45 ges messages sent 32 ---主要研究這個指標
可見ges messages sent隸屬於叢集層面
CLASS NUMBER A number representing one or more statistics classes. The following class numbers are additive:
1 - User
2 - Redo
4 - Enqueue
8 - Cache
16 - OS
32 - Real Application Clusters
64 - SQL
128 - Debug
--node1
SQL> select v$statname.name,v$sysstat.value from v$sysstat,v$statname where v$sysstat.statistic#=v$statname.statistic# and v$statname.statistic# in (45);
NAME VALUE
---------------------------------------------------------------- ----------
ges messages sent 44374
SQL> create table t_ges(a int,b int);
Table created.
SQL> insert into t_ges select level,level from dual connect by level<=1000000;
1000000 rows created.
SQL> commit;
Commit complete.
可見大量的DML操作後,指標值大幅提升
SQL> select v$statname.name,v$sysstat.value from v$sysstat,v$statname where v$sysstat.statistic#=v$statname.statistic# and v$statname.statistic# in (45);
NAME VALUE
---------------------------------------------------------------- ----------
ges messages sent 44925
可見TRUNCATE大表指標也會提升,不過不如INSERT增幅大
SQL> truncate table t_ges;
Table truncated.
SQL> select v$statname.name,v$sysstat.value from v$sysstat,v$statname where v$sysstat.statistic#=v$statname.statistic# and v$statname.statistic# in (45);
NAME VALUE
---------------------------------------------------------------- ----------
ges messages sent 45104
--node2
SQL> create table t_ges2(a int,b int);
Table created.
可見在另一個節點也會使指標提升
SQL> insert into t_ges2 select level,level from dual connect by level<=1000000;
1000000 rows created.
SQL> commit;
Commit complete.
---node1
SQL> select v$statname.name,v$sysstat.value from v$sysstat,v$statname where v$sysstat.statistic#=v$statname.statistic# and v$statname.statistic# in (45);
NAME VALUE
---------------------------------------------------------------- ----------
ges messages sent 45373
如果暫停lmd,上述指標還有變化嗎?會如何表現呢?
SQL> select addr,program,username,pid,spid from v$process where username='oracle' and pid=6;
ADDR PROGRAM USERNAME PID SPID
---------------- ------------------------------------------------ --------------- ---------- ------------
0000000083A585C8 oracle@jingfa1 (LMD0) oracle 6 15271
SQL> select v$statname.name,v$sysstat.value from v$sysstat,v$statname where v$sysstat.statistic#=v$statname.statistic# and v$statname.statistic# in (45);
NAME VALUE
---------------------------------------------------------------- ----------
ges messages sent 45430
SQL> oradebug setospid 15271
Oracle pid: 6, Unix process pid: 15271, image: oracle@jingfa1 (LMD0)
SQL> oradebug suspend
Statement processed.
如果HANG LMD,指值增量極小
SQL> select v$statname.name,v$sysstat.value from v$sysstat,v$statname where v$sysstat.statistic#=v$statname.statistic# and v$statname.statistic# in (45);
NAME VALUE
---------------------------------------------------------------- ----------
ges messages sent 45678
SQL> oradebug resume
Statement processed.
SQL> select v$statname.name,v$sysstat.value from v$sysstat,v$statname where v$sysstat.statistic#=v$statname.statistic# and v$statname.statistic# in (45);
NAME VALUE
---------------------------------------------------------------- ----------
ges messages sent 45711
--可見如果LMD超過一個時間期限,仍不能恢復正常,會引發IPC TIMEOUT,進而會把另一個節點從叢集中驅逐
oracle@jingfa2 bdump]$ tail -f alert_jingfa2.log
IPC Send timeout to 0.0 inc 8 for msg type 29 from opid 22
Wed Nov 11 03:29:07 2015
Communications reconfiguration: instance_number 1
Wed Nov 11 03:29:07 2015
Trace dumping is performing id=[cdmp_20151111032907]
Wed Nov 11 03:29:11 2015
IPC Send timeout detected.Sender: ospid 18114
Receiver: inst 1 binc 433078410 ospid 15271
Wed Nov 11 03:29:13 2015
IPC Send timeout to 0.0 inc 8 for msg type 12 from opid 18
Wed Nov 11 03:30:59 2015
Evicting instance 1 from cluster
Wed Nov 11 03:31:01 2015
Trace dumping is performing id=[cdmp_20151111033042]
Wed Nov 11 03:31:06 2015
Reconfiguration started (old inc 8, new inc 12)
List of nodes:
1
Global Resource Directory frozen
* dead instance detected - domain 0 invalid = TRUE
Communication channels reestablished
Master broadcasted resource hash value bitmaps
Non-local Process blocks cleaned out
Wed Nov 11 03:31:06 2015
LMS 0: 0 GCS shadows cancelled, 0 closed
Set master node info
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-1829980/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 用strace跟蹤分析oracle 10.2.0.1 rac lmd程式系列二Oracle
- oracle 10.2.0.1 rac的lmd程式的含義之一Oracle
- 基於oracle 10.2.0.1 rac學習lmon程式系列六Oracle
- 基於oracle 10.2.0.1 rac學習lms程式系列四Oracle
- oracle v$sysstat效能檢視Oracle
- 基於oracle 10.2.0.1 rac學習lmon程式系列六之增補一Oracle
- Oracle中效能檢視V$SYSSTATOracle
- 學習oracle 10.2.0.1 rac叢集程式cssd的原理及機制之系列一OracleCSS
- oracle v$lock系列之三Oracle
- RAC筆記之gcs/ges/grd筆記GC
- oracle rac 10.2.0.1 升級到 oracle 10.2.0.4Oracle
- Oracle RAC ASM 例項 從10.2.0.1 升級到 10.2.0.4 說明OracleASM
- 深入理解Go系列一之指標變數Go指標變數
- 基於oracle 10.2.0.1 rac使用oradebug dump hanganalyze 分析oracle hang系列四Oracle
- 基於oracle 10.2.0.1 rac使用oradebug dump hanganalyze 分析oracle hang系列五Oracle
- 基於oracle 10.2.0.1 rac使用oradebug dump hanganalyze 分析oracle hang系列六Oracle
- C語言重點——指標篇(一文讓你完全搞懂指標)| 從記憶體理解指標 | 指標完全解析C語言指標記憶體
- oracle 11g rac 程式理解Oracle
- v$sysstat和v$sesstat區別
- 如何理解指向指標的指標?指標
- 指標和標籤的基礎理解指標
- Oracle 10g rac升級(10.2.0.1 Rac到10.2.0.4)Oracle 10g
- (轉)學習Oracle動態效能表-(4)-V$SYSSTATOracle
- C++指標理解C++指標
- 從IL角度徹底理解回撥_委託_指標指標
- 動態效能表V$sysstat
- C語言指標(三):陣列指標和字串指標C語言指標陣列字串
- VB真是想不到系列之三:VB指標葵花寶典之函式指標 (轉)指標函式
- NullPointerException空指標異常的理解NullException指標
- oracle 10.2.0.1 rac 升級到10.2.0.4 rac時,dbua升級的元件列表Oracle元件
- 深入理解 Golang 指標Golang指標
- 「C++」理解智慧指標C++指標
- Oracle RAC 10.2.0.1 升級 10.2.0.4 簡單描述Oracle
- Oracle動態效能檢視學習筆記(1)_v$sysstatOracle筆記
- 如何正確理解「指標」和「標籤」指標
- Oracle RAC Cache Fusion 系列十七:Oracle RAC DRMOracle
- v$sesstat,v$mystat,v$statname和v$sysstat檢視簡介
- JavaScript中this指標指向的徹底理解JavaScript指標