Rechercher dans le manuel MySQL

15.16.3 InnoDB Standard Monitor and Lock Monitor Output

The Lock Monitor is the same as the Standard Monitor except that it includes additional lock information. Enabling either monitor for periodic output turns on the same output stream, but the stream includes extra information if the Lock Monitor is enabled. For example, if you enable the Standard Monitor and Lock Monitor, that turns on a single output stream. The stream includes extra lock information until you disable the Lock Monitor.

Standard Monitor output is limited to 1MB when produced using the SHOW ENGINE INNODB STATUS statement. This limit does not apply to output written to server standard error output (stderr).

Example Standard Monitor output:

  1. *************************** 1. row ***************************
  2.   Name:
  3. =====================================
  4. 2018-04-12 15:14:08 0x7f971c063700 INNODB MONITOR OUTPUT
  5. =====================================
  6. Per second averages calculated from the last 4 seconds
  7. -----------------
  8. BACKGROUND THREAD
  9. -----------------
  10. srv_master_thread loops: 15 srv_active, 0 srv_shutdown, 1122 srv_idle
  11. srv_master_thread log flush and writes: 0
  12. ----------
  13. SEMAPHORES
  14. ----------
  15. OS WAIT ARRAY INFO: reservation count 24
  16. OS WAIT ARRAY INFO: signal count 24
  17. RW-shared spins 4, rounds 8, OS waits 4
  18. RW-excl spins 2, rounds 60, OS waits 2
  19. RW-sx spins 0, rounds 0, OS waits 0
  20. Spin rounds per wait: 2.00 RW-shared, 30.00 RW-excl, 0.00 RW-sx
  21. ------------------------
  22. LATEST FOREIGN KEY ERROR
  23. ------------------------
  24. 2018-04-12 14:57:24 0x7f97a9c91700 Transaction:
  25. TRANSACTION 7717, ACTIVE 0 sec inserting
  26. mysql tables in use 1, locked 1
  27. 4 lock struct(s), heap size 1136, 3 row lock(s), undo log entries 3
  28. MySQL thread id 8, OS thread handle 140289365317376, query id 14 localhost root update
  29. INSERT INTO child VALUES (NULL, 1), (NULL, 2), (NULL, 3), (NULL, 4), (NULL, 5), (NULL, 6)
  30. Foreign key constraint fails for table `test`.`child`:
  31. ,
  32.   CONSTRAINT `child_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `parent` (`id`) ON DELETE
  33. Trying to add in child table, in index par_ind tuple:
  34. DATA TUPLE: 2 fields;
  35.  0: len 4; hex 80000003; asc     ;;
  36.  1: len 4; hex 80000003; asc     ;;
  37.  
  38. But in parent table `test`.`parent`, in index PRIMARY,
  39. the closest match we can find is record:
  40. PHYSICAL RECORD: n_fields 3; compact format; info bits 0
  41.  0: len 4; hex 80000004; asc     ;;
  42.  1: len 6; hex 000000001e19; asc       ;;
  43.  2: len 7; hex 81000001110137; asc       7;;
  44.  
  45. ------------
  46. ------------
  47. Trx id counter 7748
  48. Purge done for trx's n:o < 7747 undo n:o < 0 state: running but idle
  49. History list length 19
  50. LIST OF TRANSACTIONS FOR EACH SESSION:
  51. ---TRANSACTION 421764459790000, not started
  52. 0 lock struct(s), heap size 1136, 0 row lock(s)
  53. ---TRANSACTION 7747, ACTIVE 23 sec starting index read
  54. mysql tables in use 1, locked 1
  55. LOCK WAIT 2 lock struct(s), heap size 1136, 1 row lock(s)
  56. MySQL thread id 9, OS thread handle 140286987249408, query id 51 localhost root updating
  57. DELETE FROM t WHERE i = 1
  58. ------- TRX HAS BEEN WAITING 23 SEC FOR THIS LOCK TO BE GRANTED:
  59. RECORD LOCKS space id 4 page no 4 n bits 72 index GEN_CLUST_INDEX of table `test`.`t`
  60. trx id 7747 lock_mode X waiting
  61. Record lock, heap no 3 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
  62. 0: len 6; hex 000000000202; asc       ;;
  63. 1: len 6; hex 000000001e41; asc      A;;
  64. 2: len 7; hex 820000008b0110; asc        ;;
  65. 3: len 4; hex 80000001; asc     ;;
  66.  
  67. ------------------
  68. TABLE LOCK table `test`.`t` trx id 7747 lock mode IX
  69. RECORD LOCKS space id 4 page no 4 n bits 72 index GEN_CLUST_INDEX of table `test`.`t`
  70. trx id 7747 lock_mode X waiting
  71. Record lock, heap no 3 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
  72. 0: len 6; hex 000000000202; asc       ;;
  73. 1: len 6; hex 000000001e41; asc      A;;
  74. 2: len 7; hex 820000008b0110; asc        ;;
  75. 3: len 4; hex 80000001; asc     ;;
  76.  
  77. --------
  78. FILE I/O
  79. --------
  80. I/O thread 0 state: waiting for i/o request (insert buffer thread)
  81. I/O thread 1 state: waiting for i/o request (log thread)
  82. I/O thread 2 state: waiting for i/o request (read thread)
  83. I/O thread 3 state: waiting for i/o request (read thread)
  84. I/O thread 4 state: waiting for i/o request (read thread)
  85. I/O thread 5 state: waiting for i/o request (read thread)
  86. I/O thread 6 state: waiting for i/o request (write thread)
  87. I/O thread 7 state: waiting for i/o request (write thread)
  88. I/O thread 8 state: waiting for i/o request (write thread)
  89. I/O thread 9 state: waiting for i/o request (write thread)
  90. Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
  91. ibuf aio reads:, log i/o's:, sync i/o's:
  92. Pending flushes (fsync) log: 0; buffer pool: 0
  93. 833 OS file reads, 605 OS file writes, 208 OS fsyncs
  94. 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
  95. -------------------------------------
  96. INSERT BUFFER AND ADAPTIVE HASH INDEX
  97. -------------------------------------
  98. Ibuf: size 1, free list len 0, seg size 2, 0 merges
  99. merged operations:
  100. insert 0, delete mark 0, delete 0
  101. discarded operations:
  102. insert 0, delete mark 0, delete 0
  103. Hash table size 553253, node heap has 0 buffer(s)
  104. Hash table size 553253, node heap has 1 buffer(s)
  105. Hash table size 553253, node heap has 3 buffer(s)
  106. Hash table size 553253, node heap has 0 buffer(s)
  107. Hash table size 553253, node heap has 0 buffer(s)
  108. Hash table size 553253, node heap has 0 buffer(s)
  109. Hash table size 553253, node heap has 0 buffer(s)
  110. Hash table size 553253, node heap has 0 buffer(s)
  111. 0.00 hash searches/s, 0.00 non-hash searches/s
  112. ---
  113. LOG
  114. ---
  115. Log sequence number          19643450
  116. Log buffer assigned up to    19643450
  117. Log buffer completed up to   19643450
  118. Log written up to            19643450
  119. Log flushed up to            19643450
  120. Added dirty pages up to      19643450
  121. Pages flushed up to          19643450
  122. Last checkpoint at           19643450
  123. 129 log i/o's done, 0.00 log i/o's/second
  124. ----------------------
  125. BUFFER POOL AND MEMORY
  126. ----------------------
  127. Total large memory allocated 2198863872
  128. Dictionary memory allocated 409606
  129. Buffer pool size   131072
  130. Free buffers       130095
  131. Database pages     973
  132. Old database pages 0
  133. Modified db pages  0
  134. Pending reads      0
  135. Pending writes: LRU 0, flush list 0, single page 0
  136. Pages made young 0, not young 0
  137. 0.00 youngs/s, 0.00 non-youngs/s
  138. Pages read 810, created 163, written 404
  139. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  140. Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
  141. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  142. LRU len: 973, unzip_LRU len: 0
  143. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  144. ----------------------
  145. INDIVIDUAL BUFFER POOL INFO
  146. ----------------------
  147. ---BUFFER POOL 0
  148. Buffer pool size   65536
  149. Free buffers       65043
  150. Database pages     491
  151. Old database pages 0
  152. Modified db pages  0
  153. Pending reads      0
  154. Pending writes: LRU 0, flush list 0, single page 0
  155. Pages made young 0, not young 0
  156. 0.00 youngs/s, 0.00 non-youngs/s
  157. Pages read 411, created 80, written 210
  158. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  159. Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
  160. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  161. LRU len: 491, unzip_LRU len: 0
  162. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  163. ---BUFFER POOL 1
  164. Buffer pool size   65536
  165. Free buffers       65052
  166. Database pages     482
  167. Old database pages 0
  168. Modified db pages  0
  169. Pending reads      0
  170. Pending writes: LRU 0, flush list 0, single page 0
  171. Pages made young 0, not young 0
  172. 0.00 youngs/s, 0.00 non-youngs/s
  173. Pages read 399, created 83, written 194
  174. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  175. No buffer pool page gets since the last printout
  176. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  177. LRU len: 482, unzip_LRU len: 0
  178. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  179. --------------
  180. ROW OPERATIONS
  181. --------------
  182. 0 queries inside InnoDB, 0 queries in queue
  183. 0 read views open inside InnoDB
  184. Process ID=5772, Main thread ID=140286437054208 , state=sleeping
  185. Number of rows inserted 57, updated 354, deleted 4, read 4421
  186. 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
  187. ----------------------------
  188. END OF INNODB MONITOR OUTPUT
  189. ============================

Standard Monitor Output Sections

For a description of each metric reported by the Standard Monitor, refer to the Metrics chapter in the Oracle Enterprise Manager for MySQL Database User's Guide.

  • Status

    This section shows the timestamp, the monitor name, and the number of seconds that per-second averages are based on. The number of seconds is the elapsed time between the current time and the last time InnoDB Monitor output was printed.

  • BACKGROUND THREAD

    The srv_master_thread lines shows work done by the main background thread.

  • SEMAPHORES

    This section reports threads waiting for a semaphore and statistics on how many times threads have needed a spin or a wait on a mutex or a rw-lock semaphore. A large number of threads waiting for semaphores may be a result of disk I/O, or contention problems inside InnoDB. Contention can be due to heavy parallelism of queries or problems in operating system thread scheduling. Setting the innodb_thread_concurrency system variable smaller than the default value might help in such situations. The Spin rounds per wait line shows the number of spinlock rounds per OS wait for a mutex.

    Mutex metrics are reported by SHOW ENGINE INNODB MUTEX.

  • LATEST FOREIGN KEY ERROR

    This section provides information about the most recent foreign key constraint error. It is not present if no such error has occurred. The contents include the statement that failed as well as information about the constraint that failed and the referenced and referencing tables.

  • LATEST DETECTED DEADLOCK

    This section provides information about the most recent deadlock. It is not present if no deadlock has occurred. The contents show which transactions are involved, the statement each was attempting to execute, the locks they have and need, and which transaction InnoDB decided to roll back to break the deadlock. The lock modes reported in this section are explained in Section 15.7.1, “InnoDB Locking”.

  • TRANSACTIONS

    If this section reports lock waits, your applications might have lock contention. The output can also help to trace the reasons for transaction deadlocks.

  • FILE I/O

    This section provides information about threads that InnoDB uses to perform various types of I/O. The first few of these are dedicated to general InnoDB processing. The contents also display information for pending I/O operations and statistics for I/O performance.

    The number of these threads are controlled by the innodb_read_io_threads and innodb_write_io_threads parameters. See Section 15.13, “InnoDB Startup Options and System Variables”.

  • INSERT BUFFER AND ADAPTIVE HASH INDEX

    This section shows the status of the InnoDB insert buffer (also referred to as the change buffer) and the adaptive hash index.

    For related information, see Section 15.5.2, “Change Buffer”, and Section 15.5.3, “Adaptive Hash Index”.

  • LOG

    This section displays information about the InnoDB log. The contents include the current log sequence number, how far the log has been flushed to disk, and the position at which InnoDB last took a checkpoint. (See Section 15.11.3, “InnoDB Checkpoints”.) The section also displays information about pending writes and write performance statistics.

  • BUFFER POOL AND MEMORY

    This section gives you statistics on pages read and written. You can calculate from these numbers how many data file I/O operations your queries currently are doing.

    For buffer pool statistics descriptions, see Monitoring the Buffer Pool Using the InnoDB Standard Monitor. For additional information about the operation of the buffer pool, see Section 15.5.1, “Buffer Pool”.

  • ROW OPERATIONS

    This section shows what the main thread is doing, including the number and performance rate for each type of row operation.


Suchen Sie im MySQL-Handbuch

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 26/06/2006, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/mysql-rf-innodb-standard-monitor.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:en Manuel MySQL : https://dev.mysql.com/

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut