数据库系统诊断监控是我们进行系统运维的重要工具,通过数据库监控信息能够及时发现系统的异常,并对系统异常进行分析和原因定位,同时外部工具和平台(例如OCP)等也可以通过采集这些监控信息来构造整个监控大盘。

    OceanBase 目前主要维护三类的监控信息:监控项(统计事件)、等待事件和锁事件。

    监控项(统计事件)

    监控项(统计事件)用于记录系统的统计信息,分为累加型统计事件和实时型统计事件,按 session、server 和集群维度进行统计。所有统计信息通过内部表展示,包括v$sysstat, gv$sysstat, v$sesstat, gv$sesstat

    主要的累加型统计事件如下所示。

    1. +------------+----------------------------------------------------------+-------------+
    2. | 统计事件ID | 统计事件描述 | 类型 |
    3. +------------+----------------------------------------------------------+-------------+
    4. | 10000 | rpc packet in | Network |
    5. | 10001 | rpc packet in bytes | Network |
    6. | 10002 | rpc packet out | Network |
    7. | 10003 | rpc packet out bytes | Network |
    8. | 10004 | rpc deliver fail | Network |
    9. | 10005 | rpc net delay | Network |
    10. | 10006 | rpc net frame delay | Network |
    11. | 10007 | mysql packet in | Network |
    12. | 10008 | mysql packet in bytes | Network |
    13. | 10009 | mysql packet out | Network |
    14. | 10010 | mysql packet out bytes | Network |
    15. | 10011 | mysql deliver fail | Network |
    16. | 20000 | request enqueue count | Queue |
    17. | 20001 | request dequeue count | Queue |
    18. | 20002 | request queue time | Queue |
    19. | 30000 | trans commit log sync time | Transaction |
    20. | 30001 | trans commit log sync count | Transaction |
    21. | 30002 | trans commit log submit count | Transaction |
    22. | 30003 | trans system trans count | Transaction |
    23. | 30004 | trans user trans count | Transaction |
    24. | 30005 | trans start count | Transaction |
    25. | 30006 | trans total used time | Transaction |
    26. | 30007 | trans commit count | Transaction |
    27. | 30008 | trans commit time | Transaction |
    28. | 30009 | trans rollback count | Transaction |
    29. | 30010 | trans rollback time | Transaction |
    30. | 30011 | trans timeout count | Transaction |
    31. | 30012 | trans single partition count | Transaction |
    32. | 30013 | trans multi partition count | Transaction |
    33. | 30017 | trans zero partition count | Transaction |
    34. | 30018 | redo log replay count | Transaction |
    35. | 30019 | redo log replay time | Transaction |
    36. | 30020 | prepare log replay count | Transaction |
    37. | 30021 | prepare log replay time | Transaction |
    38. | 30022 | commit log replay count | Transaction |
    39. | 30023 | commit log replay time | Transaction |
    40. | 30024 | abort log replay count | Transaction |
    41. | 30025 | abort log replay time | Transaction |
    42. | 30026 | clear log replay count | Transaction |
    43. | 30027 | clear log replay time | Transaction |
    44. | 30028 | sp redo log cb count | Transaction |
    45. | 30029 | sp redo log cb time | Transaction |
    46. | 30030 | sp commit log cb count | Transaction |
    47. | 30031 | sp commit log cb time | Transaction |
    48. | 30032 | redo log cb count | Transaction |
    49. | 30033 | redo log cb time | Transaction |
    50. | 30034 | prepare log cb count | Transaction |
    51. | 30035 | prepare log cb time | Transaction |
    52. | 30036 | commit log cb count | Transaction |
    53. | 30037 | commit log cb time | Transaction |
    54. | 30038 | abort log cb count | Transaction |
    55. | 30039 | abort log cb time | Transaction |
    56. | 30040 | clear log cb count | Transaction |
    57. | 30041 | clear log cb time | Transaction |
    58. | 30042 | trans memtable end count | Transaction |
    59. | 30043 | trans memtable end time | Transaction |
    60. | 30044 | trans callback sql count | Transaction |
    61. | 30045 | trans callback sql time | Transaction |
    62. | 30046 | strong consistency stmt timeout count | Transaction |
    63. | 30047 | slave read stmt timeout count | Transaction |
    64. | 30048 | slave read stmt retry count | Transaction |
    65. | 30049 | trans fill redo log count | Transaction |
    66. | 30050 | trans fill redo log time | Transaction |
    67. | 30051 | trans submit log count | Transaction |
    68. | 30052 | trans submit log time | Transaction |
    69. | 30053 | gts request total count | Transaction |
    70. | 30054 | gts acquire total time | Transaction |
    71. | 30055 | gts acquire total count | Transaction |
    72. | 30056 | gts acquire total wait count | Transaction |
    73. | 40000 | sql select count | SQL |
    74. | 40001 | sql select time | SQL |
    75. | 40002 | sql insert count | SQL |
    76. | 40003 | sql insert time | SQL |
    77. | 40004 | sql replace count | SQL |
    78. | 40005 | sql replace time | SQL |
    79. | 40006 | sql update count | SQL |
    80. | 40007 | sql update time | SQL |
    81. | 40008 | sql delete count | SQL |
    82. | 40009 | sql delete time | SQL |
    83. | 40018 | sql other count | SQL |
    84. | 40019 | sql other time | SQL |
    85. | 40010 | sql local count | SQL |
    86. | 40011 | sql remote count | SQL |
    87. | 40012 | sql distributed count | SQL |
    88. | 40013 | active sessions | SQL |
    89. | 40014 | single query count | SQL |
    90. | 40015 | multiple query count | SQL |
    91. | 40016 | multiple query with one stmt count | SQL |
    92. | 40100 | sql inner select count | SQL |
    93. | 40101 | sql inner select time | SQL |
    94. | 40102 | sql inner insert count | SQL |
    95. | 40103 | sql inner insert time | SQL |
    96. | 40104 | sql inner replace count | SQL |
    97. | 40105 | sql inner replace time | SQL |
    98. | 40106 | sql inner update count | SQL |
    99. | 40107 | sql inner update time | SQL |
    100. | 40108 | sql inner delete count | SQL |
    101. | 40109 | sql inner delete time | SQL |
    102. | 40110 | sql inner other count | SQL |
    103. | 40111 | sql inner other time | SQL |
    104. | 50000 | row cache hit | Cache |
    105. | 50001 | row cache miss | Cache |
    106. | 50002 | block index cache hit | Cache |
    107. | 50003 | block index cache miss | Cache |
    108. | 50004 | bloom filter cache hit | Cache |
    109. | 50005 | bloom filter cache miss | Cache |
    110. | 50006 | bloom filter filts | Cache |
    111. | 50007 | bloom filter passes | Cache |
    112. | 50008 | block cache hit | Cache |
    113. | 50009 | block cache miss | Cache |
    114. | 50010 | location cache hit | Cache |
    115. | 50011 | location cache miss | Cache |
    116. | 50012 | location cache wait | Cache |
    117. | 50013 | location cache get hit from proxy virtual table | Cache |
    118. | 50014 | location cache get miss from proxy virtual table | Cache |
    119. | 50015 | location cache nonblock renew | Cache |
    120. | 50016 | location cache nonblock renew ignored | Cache |
    121. | 50017 | location nonblock get hit | Cache |
    122. | 50018 | location nonblock get miss | Cache |
    123. | 50021 | location cache rpc renew count | Cache |
    124. | 50022 | location cache renew | Cache |
    125. | 50023 | location cache renew ignored | Cache |
    126. | 50024 | mmap count | Cache |
    127. | 50025 | munmap count | Cache |
    128. | 50026 | mmap size | Cache |
    129. | 50027 | munmap size | Cache |
    130. | 50028 | kvcache sync wash time | Cache |
    131. | 50029 | kvcache sync wash count | Cache |
    132. | 50030 | location cache rpc renew fail count | Cache |
    133. | 50031 | location cache sql renew count | Cache |
    134. | 50032 | location cache ignore rpc renew count | Cache |
    135. | 60000 | io read count | Storage |
    136. | 60001 | io read delay | Storage |
    137. | 60002 | io read bytes | Storage |
    138. | 60003 | io write count | Storage |
    139. | 60004 | io write delay | Storage |
    140. | 60005 | io write bytes | Storage |
    141. | 60006 | memstore scan count | Storage |
    142. | 60007 | memstore scan succ count | Storage |
    143. | 60008 | memstore scan fail count | Storage |
    144. | 60009 | memstore get count | Storage |
    145. | 60010 | memstore get succ count | Storage |
    146. | 60011 | memstore get fail count | Storage |
    147. | 60012 | memstore apply count | Storage |
    148. | 60013 | memstore apply succ count | Storage |
    149. | 60014 | memstore apply fail count | Storage |
    150. | 60015 | memstore row count | Storage |
    151. | 60016 | memstore get time | Storage |
    152. | 60017 | memstore scan time | Storage |
    153. | 60018 | memstore apply time | Storage |
    154. | 60019 | memstore read lock succ count | Storage |
    155. | 60020 | memstore read lock fail count | Storage |
    156. | 60021 | memstore write lock succ count | Storage |
    157. | 60022 | memstore write lock fail count | Storage |
    158. | 60023 | memstore wait write lock time | Storage |
    159. | 60024 | memstore wait read lock time | Storage |
    160. | 60025 | io read micro index count | Storage |
    161. | 60026 | io read micro index bytes | Storage |
    162. | 60027 | io prefetch micro block count | Storage |
    163. | 60028 | io prefetch micro block bytes | Storage |
    164. | 60029 | io read uncompress micro block count | Storage |
    165. | 60030 | io read uncompress micro block bytes | Storage |
    166. | 60031 | storage read row count | Storage |
    167. | 60032 | storage delete row count | Storage |
    168. | 60033 | storage insert row count | Storage |
    169. | 60034 | storage update row count | Storage |
    170. | 60035 | memstore mutator replay time | Storage |
    171. | 60036 | memstore mutator replay count | Storage |
    172. | 60037 | memstore row purge count | Storage |
    173. | 60038 | memstore row compaction count | Storage |
    174. | 60039 | memstore write lock wakenup count in lock_wait_mgr | Storage |
    175. | 60039 | io read queue delay | Storage |
    176. | 60040 | io write queue delay | Storage |
    177. | 60041 | io read callback alloc delay | Storage |
    178. | 60042 | io read callback process delay | Storage |
    179. | 60043 | warm up request count | Storage |
    180. | 60044 | warm up request scan count | Storage |
    181. | 60045 | warm up request get count | Storage |
    182. | 60046 | warm up request multi get count | Storage |
    183. | 60047 | warm up request send count | Storage |
    184. | 60048 | warm up request send size | Storage |
    185. | 60049 | warm up request in drop count | Storage |
    186. | 60050 | warm up request out drop count | Storage |
    187. | 60051 | bandwidth in throttle size | Storage |
    188. | 60052 | bandwidth out throttle size | Storage |
    189. | 60053 | warm up request ignored when send queue is full | Storage |
    190. | 60054 | warm up request rowkey check count | Storage |
    191. | 60055 | warm up request multi scan count | Storage |
    192. | 60056 | memstore read row count | Storage |
    193. | 60057 | ssstore read row count | Storage |
    194. | 60058 | memstore big gap row count | Storage |
    195. | 60059 | memstore small gap row count | Storage |
    196. | 60060 | memstore big gap count | Storage |
    197. | 60061 | memstore small gap count | Storage |
    198. | 60062 | ssstore big gap row count | Storage |
    199. | 60063 | ssstore small gap row count | Storage |
    200. | 60064 | ssstore big gap count | Storage |
    201. | 60065 | ssstore small gap count | Storage |
    202. | 60067 | memstore range purge count | Storage |
    203. | 60065 | rowid hit count | Storage |
    204. | 80001 | submitted to sliding window log count | Clog |
    205. | 80002 | submitted to sliding window log size | Clog |
    206. | 80003 | index log flushed count | Clog |
    207. | 80004 | index log flushed clog size | Clog |
    208. | 80005 | clog flushed count | Clog |
    209. | 80006 | clog flushed size | Clog |
    210. | 80007 | clog read size | Clog |
    211. | 80008 | clog read count | Clog |
    212. | 80009 | clog disk read size | Clog |
    213. | 80010 | clog disk read count | Clog |
    214. | 80011 | clog disk read time | Clog |
    215. | 80012 | clog fetch log size | Clog |
    216. | 80013 | clog fetch log count | Clog |
    217. | 80014 | clog fetch log by localtion size | Clog |
    218. | 80015 | clog fetch log by location count | Clog |
    219. | 80016 | clog read request succ size | Clog |
    220. | 80017 | clog read request succ count | Clog |
    221. | 80018 | clog read request fail count | Clog |
    222. | 80019 | clog leader confirm time | Clog |
    223. | 80020 | clog flush task generate count | Clog |
    224. | 80021 | clog flush task release count | Clog |
    225. | 80022 | clog rpc delay time | Clog |
    226. | 80023 | clog rpc count | Clog |
    227. | 80024 | clog non kv cache hit count | Clog |
    228. | 80025 | clog rpc request handle time | Clog |
    229. | 80026 | clog rpc request count | Clog |
    230. | 80027 | clog cache hit count | Clog |
    231. | 80028 | clog state loop count | Clog |
    232. | 80029 | clog state loop time | Clog |
    233. | 80030 | clog replay loop count | Clog |
    234. | 80031 | clog replay loop time | Clog |
    235. | 80032 | clog to leader active count | Clog |
    236. | 80033 | clog to leader active time | Clog |
    237. | 80034 | on success cb count | Clog |
    238. | 80035 | on success cb time | Clog |
    239. | 80036 | on leader revoke count | Clog |
    240. | 80037 | on leader revoke time | Clog |
    241. | 80038 | on leader takeover count | Clog |
    242. | 80039 | on leader takeover time | Clog |
    243. | 80040 | clog write count | Clog |
    244. | 80041 | clog write time | Clog |
    245. | 80042 | ilog write count | Clog |
    246. | 80043 | ilog write time | Clog |
    247. | 80044 | clog flushed time | Clog |
    248. | 80045 | clog task cb count | Clog |
    249. | 80046 | clog cb queue time | Clog |
    250. | 80049 | clog ack count | Clog |
    251. | 80050 | clog ack time | Clog |
    252. | 80051 | clog first ack count | Clog |
    253. | 80052 | clog first ack time | Clog |
    254. | 80053 | clog leader confirm count | Clog |
    255. | 80054 | clog batch cb count | Clog |
    256. | 80055 | clog batch cb queue time | Clog |
    257. | 80056 | clog memstore mutator total size | Clog |
    258. | 80057 | clog trans log total size | Clog |
    259. | 80058 | clog submit log total size | Clog |
    260. | 80059 | clog batch buffer total size | Clog |
    261. | 80060 | ilog batch buffer total size | Clog |
    262. | 80061 | clog file total size | Clog |
    263. | 80062 | ilog file total size | Clog |
    264. | 80063 | clog batch submitted count | Clog |
    265. | 80064 | clog batch committed count | Clog |
    266. | 81001 | external log service fetch log size | Clog |
    267. | 81002 | external log service fetch log count | Clog |
    268. | 81003 | external log service fetch rpc count | Clog |
    269. | 81004 | external log service heartbeat rpc count | Clog |
    270. | 81005 | external log service heartbeat partition count | Clog |
    271. | 82001 | replay engine success replay transaction log count | Clog |
    272. | 82002 | replay engine success replay transaction log time | Clog |
    273. | 82003 | replay engine fail replay transaction log count | Clog |
    274. | 82004 | replay engine fail replay transaction log time | Clog |
    275. | 82005 | replay engine success replay freeze log count | Clog |
    276. | 82006 | replay engine success replay freeze log time | Clog |
    277. | 82007 | replay engine fail replay freeze log count | Clog |
    278. | 82008 | replay engine fail replay freeze log time | Clog |
    279. | 82009 | replay engine success replay offline replica count | Clog |
    280. | 82010 | replay engine fail replay offline replica count | Clog |
    281. | 82011 | replay engine retry replay task count | Clog |
    282. | 82012 | replay engine handle replay task count | Clog |
    283. | 82013 | replay engine total handle time | Clog |
    284. | 82014 | replay engine submitted replay task count | Clog |
    285. | 82015 | replay engine submitted transaction replay task count | Clog |
    286. | 82016 | replay engine submitted freeze replay task count | Clog |
    287. | 82017 | replay engine submitted offline replay task count | Clog |
    288. | 90001 | election change leader count | Election |
    289. | 90002 | election leader revoke count | Election |
    290. | 100001 | observer partition table updater batch count | Observer |
    291. | 100002 | observer partition table updater count | Observer |
    292. | 100003 | observer partition table updater process time | Observer |
    293. | 100004 | observer partition table updater drop task count | Observer |
    294. | 100005 | observer partition table updater repurt to queue count | Observer |
    295. | 10006 | observer partition table updater execute fail times | Observer |
    296. | 100007 | observer partition table updater success execute count | Observer |
    297. | 100008 | observer partition table updater total task count | Observer |
    298. | 110001 | partition migrate count | Rootserver |
    299. | 110002 | partition migrate time | Rootserver |
    300. | 110003 | partition add count | Rootserver |
    301. | 110004 | partition add time | Rootserver |
    302. | 110005 | partition rebuild count | Rootserver |
    303. | 110006 | partition rebuild time | Rootserver |
    304. | 110007 | partition transform count | Rootserver |
    305. | 110008 | partition transform time | Rootserver |
    306. | 110009 | partition remove count | Rootserver |
    307. | 110010 | partition remove time | Rootserver |
    308. | 110011 | partition change member count | Rootserver |
    309. | 110012 | partition change member time | Rootserver |
    310. | 110013 | succ switch leader count | Rootserver |
    311. | 110014 | failed switch leader count | Rootserver |
    312. | 110015 | success rpc process | Rootserver |
    313. | 110016 | failed rpc process | Rootserver |
    314. | 110017 | balancer succ execute count | Rootserver |
    315. | 110018 | balancer failed execute count | Rootserver |
    316. | 110019 | rebalance task failed execute count | Rootserver |
    317. | 110020 | copy global index sstable count | Rootserver |
    318. | 110021 | copy global index sstable time | Rootserver |
    319. | 110022 | copy local index sstable count | Rootserver |
    320. | 110023 | copy local index sstable time | Rootserver |
    321. +------------+----------------------------------------------------------+-------------+

    主要的实时型统计事件如下所示。

    1. +------------+----------------------------------------------------------+------------+
    2. | 统计事件ID | 统计事件描述 | 类型 |
    3. +------------+----------------------------------------------------------+------------+
    4. | 120000 | location cache size | Cache |
    5. | 120001 | clog cache size | Cache |
    6. | 120002 | index clog cache size | Cache |
    7. | 120003 | user table col stat cache size | Cache |
    8. | 120004 | index cache size | Cache |
    9. | 120005 | sys block cache size | Cache |
    10. | 120006 | user block cache size | Cache |
    11. | 120007 | sys row cache size | Cache |
    12. | 120008 | user row cache size | Cache |
    13. | 120009 | bloom filter cache size | Cache |
    14. | 130000 | active memstore used | Storage |
    15. | 130001 | total memstore used | Storage |
    16. | 130002 | major freeze trigger | Storage |
    17. | 130004 | memstore limit | Storage |
    18. | 140001 | min memory size | Resource |
    19. | 140002 | max memory size | Resource |
    20. | 140003 | memory usage | Resource |
    21. | 140004 | min cpus | Resource |
    22. | 140005 | max cpus | Resource |
    23. | 140006 | cpu usage | Resource |
    24. | 140007 | disk usage | Resource |
    25. | 150001 | clog disk free size | Clog |
    26. | 150002 | clog disk free ratio | Clog |
    27. | 150003 | clog last check log file collect time | Clog |
    28. | 170001 | observer partition table updater user table queue size | Observer |
    29. | 170002 | observer partition table updater system table queue size | Observer |
    30. | 170003 | observer partition table updater core table queue size | Observer |
    31. | 180001 | rootservice start time | Rootserver |
    32. | 180002 | rootservice waiting task count with high priority | Rootserver |
    33. | 180003 | rootservice scheduled task count with high priority | Rootserver |
    34. | 180004 | rootservice waiting task count with low priority | Rootserver |
    35. | 180005 | rootservice scheduled task count with low priority | Rootserver |
    36. +------------+----------------------------------------------------------+------------+

    等待事件

    等待事件用于记录系统发生等待的时间以及次数,例如Disk IO等待等,按session维度进行统计。所有等待事件信息通过内部表展示,包括v$session_wait, gv$session_wait, v$session_wait_history, gv$session_wait_history

    主要的等待事件如下所示。

    1. +------------+----------------------------------------------------------+------------------+
    2. | 等待事件ID | 等待事件描述 | 类型 |
    3. +------------+----------------------------------------------------------+------------------+
    4. | 10000 | system internal wait | OTHER |
    5. | 10001 | db file data read | USER_IO |
    6. | 10002 | db file data index read | USER_IO |
    7. | 11001 | db file compact read | SYSTEM_IO |
    8. | 11002 | db file compact write | SYSTEM_IO |
    9. | 11003 | db file index build read | SYSTEM_IO |
    10. | 11004 | db file index build write | SYSTEM_IO |
    11. | 11005 | db file migrate read | SYSTEM_IO |
    12. | 11006 | db file migrate write | SYSTEM_IO |
    13. | 11007 | bloomfilter build read | SYSTEM_IO |
    14. | 11008 | interm result disk write | USER_IO |
    15. | 11009 | interm result disk read | USER_IO |
    16. | 11010 | row store disk write | USER_IO |
    17. | 11011 | row store disk read | USER_IO |
    18. | 11012 | ObCacheLineSegregatedArrayBase alloc mutex | USER_IO |
    19. | 11013 | server object pool arena lock wait | USER_IO |
    20. | 13000 | sync rpc | NETWORK |
    21. | 13001 | mysql response wait client | NETWORK |
    22. | 14001 | memstore read lock wait | APPLICATION |
    23. | 14002 | memstore write lock wait | APPLICATION |
    24. | 14003 | row lock wait | APPLICATION |
    25. | 15001 | partition location cache lock wait | CONCURRENCY |
    26. | 15002 | latch: kvcache bucket wait | CONCURRENCY |
    27. | 15003 | latch: default spin lock wait | CONCURRENCY |
    28. | 15004 | latch: default spin rwlock wait | CONCURRENCY |
    29. | 15005 | latch: default mutex wait | CONCURRENCY |
    30. | 15006 | latch: time wheel task lock wait | CONCURRENCY |
    31. | 15007 | latch: time wheel bucket lock wait | CONCURRENCY |
    32. | 15008 | latch: election lock wait | CONCURRENCY |
    33. | 15009 | latch: trans ctx lock wait | CONCURRENCY |
    34. | 15010 | latch: partition log lock wait | CONCURRENCY |
    35. | 15011 | latch: plan cache value lock wait | CONCURRENCY |
    36. | 15012 | latch: clog history reporter lock wait | CONCURRENCY |
    37. | 15013 | latch: clog external executor lock wait | CONCURRENCY |
    38. | 15014 | latch: clog membership mgr lock wait | CONCURRENCY |
    39. | 15015 | latch: clog reconfirm lock wait | CONCURRENCY |
    40. | 15016 | latch: clog sliding window lock wait | CONCURRENCY |
    41. | 15017 | latch: clog stat mgr lock wait | CONCURRENCY |
    42. | 15018 | latch: clog task lock wait | CONCURRENCY |
    43. | 15019 | latch: clog id mgr lock wait | CONCURRENCY |
    44. | 15020 | latch: clog cache lock wait | CONCURRENCY |
    45. | 15021 | latch: election msg lock wait | CONCURRENCY |
    46. | 15022 | latch: plan set lock wait | CONCURRENCY |
    47. | 15023 | latch: ps store lock wait | CONCURRENCY |
    48. | 15024 | latch: trans context mgr lock wait | CONCURRENCY |
    49. | 15025 | latch: default recursive mutex wait | CONCURRENCY |
    50. | 15026 | latch: default drw lock wait | CONCURRENCY |
    51. | 15027 | latch: default bucket lock wait | CONCURRENCY |
    52. | 15028 | latch: trans ctx bucket lock wait | CONCURRENCY |
    53. | 15029 | latch: macro meta bucket lock wait | CONCURRENCY |
    54. | 15030 | latch: token bucket lock wait | CONCURRENCY |
    55. | 15031 | latch: lighty hashmap bucket lock wait | CONCURRENCY |
    56. | 15032 | latch: row callback lock wait | CONCURRENCY |
    57. | 15033 | latch: partition lock wait | CONCURRENCY |
    58. | 15034 | latch: switch stagger merge flow wait | CONCURRENCY |
    59. | 15035 | latch: switch leader wait | CONCURRENCY |
    60. | 15036 | latch: partition freeze wait | CONCURRENCY |
    61. | 15037 | latch: schema service wait | CONCURRENCY |
    62. | 15038 | latch: schema service stats wait | CONCURRENCY |
    63. | 15039 | latch: tenant lock wait | CONCURRENCY |
    64. | 15040 | latch: config lock wait | CONCURRENCY |
    65. | 15041 | latch: major freeze lock wait | CONCURRENCY |
    66. | 15042 | latch: partition table updater lock wait | CONCURRENCY |
    67. | 15043 | latch: multi tenant lock wait | CONCURRENCY |
    68. | 15044 | latch: leader coordinator lock wait | CONCURRENCY |
    69. | 15045 | latch: leader stat lock wait | CONCURRENCY |
    70. | 15046 | latch: root major freeze lock wait | CONCURRENCY |
    71. | 15047 | latch: rs bootstrap lock wait | CONCURRENCY |
    72. | 15048 | latch: schema mgr item lock wait | CONCURRENCY |
    73. | 15049 | latch: schema mgr lock wait | CONCURRENCY |
    74. | 15050 | latch: super block lock wait | CONCURRENCY |
    75. | 15051 | latch: frozen version lock wait | CONCURRENCY |
    76. | 15052 | latch: rs broadcast lock wait | CONCURRENCY |
    77. | 15053 | latch: server status lock wait | CONCURRENCY |
    78. | 15054 | latch: server maintaince lock wait | CONCURRENCY |
    79. | 15055 | latch: unit manager lock wait | CONCURRENCY |
    80. | 15056 | latch: zone manager maintaince lock wait | CONCURRENCY |
    81. | 15057 | latch: alloc object lock wait | CONCURRENCY |
    82. | 15058 | latch: alloc block lock wait | CONCURRENCY |
    83. | 15059 | latch: trace recorder lock wait | CONCURRENCY |
    84. | 15060 | latch: session trace recorder lock wait | CONCURRENCY |
    85. | 15061 | latch: trans trace recorder lock wait | CONCURRENCY |
    86. | 15062 | latch: election trace recorder lock wait | CONCURRENCY |
    87. | 15063 | latch: alive server tracer lock wait | CONCURRENCY |
    88. | 15064 | latch: allocator chunk lock wait | CONCURRENCY |
    89. | 15065 | latch: allocator tenant lock wait | CONCURRENCY |
    90. | 15066 | latch: io queue lock wait | CONCURRENCY |
    91. | 15067 | latch: zone infos rw lock wait | CONCURRENCY |
    92. | 15068 | latch: memtable trace recorder lock wait | CONCURRENCY |
    93. | 15069 | latch: bandwidth throttle lock wait | CONCURRENCY |
    94. | 15070 | latch: rs event table timestamp lock wait | CONCURRENCY |
    95. | 15071 | latch: clog fd cache lock wait | CONCURRENCY |
    96. | 15072 | latch: migrate lock wait | CONCURRENCY |
    97. | 15073 | latch: clog cascading info lock wait | CONCURRENCY |
    98. | 15074 | latch: clog locality lock wait | CONCURRENCY |
    99. | 15075 | latch: priority task queue lock wait | CONCURRENCY |
    100. | 15076 | latch: group migrate lock wait | CONCURRENCY |
    101. | 15077 | latch: group migrate task lock wait | CONCURRENCY |
    102. | 15078 | latch: group migrate task idle wait | CONCURRENCY |
    103. | 15079 | latch: log engine env switch lock wait | CONCURRENCY |
    104. | 15081 | latch: clog consec info mgr lock wait | CONCURRENCY |
    105. | 15082 | latch: election group lock wait | CONCURRENCY |
    106. | 15083 | latch: election group trace recorder lock wait | CONCURRENCY |
    107. | 15101 | default condition wait | CONCURRENCY |
    108. | 15102 | default sleep | CONCURRENCY |
    109. | 15103 | clog writer condition wait | CONCURRENCY |
    110. | 15104 | io controller condition wait | CONCURRENCY |
    111. | 15105 | io processor condition wait | CONCURRENCY |
    112. | 15106 | dedup queue condition wait | CONCURRENCY |
    113. | 15107 | seq queue condition wait | CONCURRENCY |
    114. | 15108 | inner connection pool condition wait | CONCURRENCY |
    115. | 15109 | partition table updater condition wait | CONCURRENCY |
    116. | 15110 | rebalance task mgr condition wait | CONCURRENCY |
    117. | 15111 | async rpc proxy condition wait | CONCURRENCY |
    118. | 15112 | thread idling condition wait | CONCURRENCY |
    119. | 15113 | rpc session handler condition wait | CONCURRENCY |
    120. | 15114 | location cache condition wait | CONCURRENCY |
    121. | 15115 | reentrant thread condition wait | CONCURRENCY |
    122. | 15116 | major freeze condition wait | CONCURRENCY |
    123. | 15117 | minor freeze condition wait | CONCURRENCY |
    124. | 15118 | th worker condition wait | CONCURRENCY |
    125. | 15119 | debug sync condition wait | CONCURRENCY |
    126. | 15120 | empty server check condition wait | CONCURRENCY |
    127. | 15121 | ob scheduler condition wait | CONCURRENCY |
    128. | 15122 | ob restore reader condition wait | CONCURRENCY |
    129. | 15123 | ob dynamic thread pool condition wait | CONCURRENCY |
    130. | 15124 | delete disk condition wait | CONCURRENCY |
    131. | 15125 | slog flush condition wait | CONCURRENCY |
    132. | 15126 | build index scheduler condition wait | CONCURRENCY |
    133. | 15127 | table mgr wait | CONCURRENCY |
    134. | 15128 | partition store lock wait | CONCURRENCY |
    135. | 15129 | partition store change lock wait | CONCURRENCY |
    136. | 15130 | partition store new memtable lock wait | CONCURRENCY |
    137. | 15131 | build index compaction condition wait | CONCURRENCY |
    138. | 15132 | dag worker condition wait | CONCURRENCY |
    139. | 16001 | wait end trans | COMMIT |
    140. | 16002 | wait start stmt | CLUSTER |
    141. | 16003 | wait end stmt | CLUSTER |
    142. | 16004 | wait remove partition | ADMINISTRATIVE |
    143. +------------+----------------------------------------------------------+------------------+

    锁事件

    锁事件用于记录系统中锁统计信息,主要包括获取锁成功的次数、失败的次数、自旋的次数等。所有锁事件信息通过内部表v$latch展示。锁也会有等待,其等待的统计信息在等待事件中统计。

    主要的锁事件如下所示。

    1. +--------+--------------------------------+
    2. | ID | 锁描述 |
    3. +--------+--------------------------------+
    4. | 0 | latch wait queue lock |
    5. | 1 | default spin lock |
    6. | 2 | default spin rwlock |
    7. | 3 | default mutex |
    8. | 4 | kv cache bucket latch |
    9. | 5 | time wheel task latch |
    10. | 6 | time wheel bucket latch |
    11. | 7 | election latch |
    12. | 8 | trans ctx latch |
    13. | 9 | partition log latch |
    14. | 10 | plan cache value latch |
    15. | 11 | clog history reporter latch |
    16. | 12 | clog external executor latch |
    17. | 13 | clog member ship mgr latch |
    18. | 14 | clog reconfirm latch |
    19. | 15 | clog sliding window latch |
    20. | 16 | clog stat mgr latch |
    21. | 17 | clog task latch |
    22. | 18 | clog id mgr latch |
    23. | 19 | clog cache latch |
    24. | 20 | election msg latch |
    25. | 21 | plan set latch |
    26. | 22 | ps store latch |
    27. | 23 | trans ctx mgr latch |
    28. | 24 | row latch |
    29. | 25 | default recursive mutex |
    30. | 26 | default drw lock |
    31. | 27 | default bucket lock |
    32. | 28 | trans ctx bucket lock |
    33. | 29 | macro meta bucket lock |
    34. | 30 | token bucket lock |
    35. | 31 | light hashmap bucket lock |
    36. | 32 | row callback lock |
    37. | 33 | partition latch |
    38. | 35 | switch leader lock |
    39. | 36 | partition freeze lock |
    40. | 37 | schema service lock |
    41. | 38 | schema service stats lock |
    42. | 39 | tenant lock |
    43. | 40 | config lock |
    44. | 41 | major freeze lock |
    45. | 42 | partition table updater lock |
    46. | 43 | multi tenant lock |
    47. | 44 | leader coordinator lock |
    48. | 45 | leader stat lock |
    49. | 46 | root major freeze lock |
    50. | 47 | rs bootstrap lock |
    51. | 48 | schema mgr item lock |
    52. | 49 | schema mgr lock |
    53. | 50 | super block lock |
    54. | 51 | frozen version lock |
    55. | 52 | rs broadcast lock |
    56. | 53 | server status lock |
    57. | 54 | server maintaince lock |
    58. | 55 | unit manager lock |
    59. | 56 | zone manager maintaince lock |
    60. | 57 | object set lock |
    61. | 58 | block set lock |
    62. | 59 | normal trace recorder lock |
    63. | 60 | session trace recorder lock |
    64. | 61 | trans trace recorder lock |
    65. | 62 | election trace recorder lock |
    66. | 63 | alive server tracer lock |
    67. | 64 | allocate chunk lock |
    68. | 65 | allocate tenant lock |
    69. | 66 | io queue lock |
    70. | 67 | zone infos rw lock |
    71. | 68 | memtable trace recorder lock |
    72. | 69 | bandwidth throttle lock |
    73. | 70 | rs event table timestamp lock |
    74. | 71 | clog fd cache lock |
    75. | 72 | migrate lock |
    76. | 73 | clog cascading info lock |
    77. | 74 | clog locality lock |
    78. | 75 | group migrate lock |
    79. | 76 | group migrate task lock |
    80. | 77 | log engine env switch lock |
    81. | 78 | id map node lock |
    82. | 79 | clog consec log info mgr latch |
    83. +--------+--------------------------------+