關於DFS lock handle等待事件

xiexingzhi發表於2014-02-12
碰到資料庫中出現DFS lock handle等待事件,該如何分析

The session waits for the lock handle of a global lock request on the distributed file system (DFS). It is most common in a parallel server situation.
 
Solutions
During a period of wait, use the following SQL statement to retrieve the name of the lock and the mode of the lock request:
select chr(bitand(p1,-16777216)/16777215) || chr(bitand(p1, 16711680)/65535) "Lock",
to_char(bitand(p1, 65536)) "Mode",
p2, p3 , seconds_in_wait
from v$session_wait
where event = 'DFS lock handle';
 
Then use the following to identify the requesting session and the blocking session:
select inst_id, sid, type, id1, id2, lmode, request, block
from gv$lock
where type='CI' and id1=9 and id2=5
 
In this example, use the values from the first query in the where clause. type=Lock, id1=p1 and id2=p2.
 
Waits of this type generally indicate competition between distributed nodes for data.


Configuring Temporary Tablespaces for RAC Databases for Optimal Performance [ID 465840.1]
Temporary tablespace SS Contention In RAC [ID 459036.1]


Understanding 'DFS Lock Handle' and Cross-Instance (CI) Call Waits [ID 458292.1]
Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.6 - Release: 10.1 to 11.1
Information in this document applies to any platform.

Goal
Frequently 'DFS lock Handle' or Cross Instance Calls is the top wait in AWR reports or 10046 trace files. It is important to understand what does this error mean and how to debug it further.

Solution
A DFS lock handle wait in RAC is generally associated with a Cross Instance (CI) call, requesting some other instance to perform some work on behalf of this process. However, not all DFS lock handle waits are for CI enqueue and this note will focus on CI enqueue.


Different cross-instance calls are handled by different processes on the remote instance. This is dependent on the type of the call.

For example:

For 'DFS lock handle' count=1 wait_time=497312
type|mode=43490005, id1=e, id2=5
                    ^^^^^^^^
                          CI

Based on the above the id1 value is 0xe = 14 -> Release unused space of the sort segments. Handled by SMON


WAIT #5: nam='DFS lock handle' ela= 4117 p1=1128857605 p2=1 p3=5
p1=1128857605= 0x43490005

                                  ^^^^^^^^
                                       CI

the P2 is the id1=1 which means: Reuse (checkpoint and invalidate) block range

The following can be used as reference for understanding the id1 for CI call:

1 reuse (checkpoint and invalidate block range)
2 LGWR Checkpointing and Hot Backup
3 DBWR syncronization of SGA with control file
4 log file add/drop/rename notification
5 miscellaneous CTWR operations
7 Manged standby recovery related
8 alter rollback segment optimal
9 Signal Query Servers/coordinator
10 Create Remote parallel query Server
11 Set Global Partitions
12 Stop Disk Writes
13 Drop Sort Segments
14 Release unused space from Sort Segments
15 instance Recovery for Parallel operation Group
16 Validate parallel slave Lock Value
17 check transaction state objects
18 object reuse request
19 rolling release checks
20 propagate begin backup scn for a file
21 refresh top plan (for db scheduler
22 clear checkpoint progress record
23 drop temp file
24 QUiesce database Restricted
25 Update Dscn Tracking (ktcndt
26 Purge dictionary Object number Cache
27 set Database Force Logging mode
28 invalidate cached file address translations
29 Cursor Unauthorize Mode
30 process waiters after row cache requeue
31 Active Change Directory extent relocation
32 block change tracking state change
33 kgl mulitversion obsolete
34 set previous resetlogs data
35 set recovery destination pointer
36 fast object reuse request
38 ASM diskgroup discovery wait
39 ASM diskgroup release
40 ASM push DB updates
41 ASM add ACD chunk
42 ASM map resize message
43 ASM map lock message
44 ASM map unlock message (phase 1
45 ASM map unlock message (phase 2
46 ASM generate add disk redo marker
d47 ASM check of PST validity
48 ASM offline disk CIC
49 Logical Standby Sync Point SCN
50 update SQL Tuning Base existence bitvector
51 PQ induced Checkpointing
52 ASM F1X0 relocation
53 Scheduler autostart
54 KZS increment grant/revoke counter
55 ASM disk operation message
56 ASM I/O error emulation
57 DB Supp log cursor invalidation
58 Cache global range invalidation
59 Cache global object invalidation
60 ASM Pre-Existing Extent Lock wait
61 Perform a ksk action through DBWR
62 ASM diskgroup refresh wait
63 KCBO object checkpoint
64 KCBO object pq checkpoint
65 global health check event
66 Oracle Label Security refresh
67 thread internal enable
68 cross-instance registration
69 KGL purge unused subheaps
70 clear pin instance flag
71 Rolling operations CIC

The following can be used to understand id2:


1 used to pass in parameters
2 used to invoke the function in backgroud process
3 used to indicate the foreground has not returned
4 mounted excl, use to allocate mechanism
5 used to queue up interested clients 

 

The method of diagnosis for each type of CI call in case causing significant contention is different and needs to be taken on a case by case basis.

NOTE: These CI calls are part of normal database activity, and seeing these waits itself is not a indication of any issue. Unless you are encountering any significant waits on this event, you can ignore this.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22531473/viewspace-1079981/,如需轉載,請註明出處,否則將追究法律責任。

相關文章