基于:Mysql 5.7

查看 innodb_buffer_pool 具体使用情况

命令: SHOW ENGINE INNODB STATUS\G;
案例:

  1. mysql> SHOW ENGINE INNODB STATUS\G;
  2. *************************** 1. row ***************************
  3. Type: InnoDB
  4. Name:
  5. Status:
  6. =====================================
  7. 2020-10-21 20:55:11 0x7fdf0c17e700 INNODB MONITOR OUTPUT
  8. =====================================
  9. Per second averages calculated from the last 59 seconds
  10. -----------------
  11. BACKGROUND THREAD
  12. -----------------
  13. srv_master_thread loops: 174 srv_active, 0 srv_shutdown, 3070475 srv_idle
  14. srv_master_thread log flush and writes: 3070642
  15. ----------
  16. SEMAPHORES
  17. ----------
  18. OS WAIT ARRAY INFO: reservation count 96
  19. OS WAIT ARRAY INFO: signal count 75
  20. RW-shared spins 0, rounds 142, OS waits 71
  21. RW-excl spins 0, rounds 1, OS waits 1
  22. RW-sx spins 0, rounds 0, OS waits 0
  23. Spin rounds per wait: 142.00 RW-shared, 1.00 RW-excl, 0.00 RW-sx
  24. ------------
  25. TRANSACTIONS
  26. ------------
  27. Trx id counter 1209023
  28. Purge done for trx's n:o < 1209022 undo n:o < 0 state: running but idle
  29. History list length 85
  30. LIST OF TRANSACTIONS FOR EACH SESSION:
  31. ---TRANSACTION 422071226222432, not started
  32. 0 lock struct(s), heap size 1136, 0 row lock(s)
  33. --------
  34. FILE I/O
  35. --------
  36. I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
  37. I/O thread 1 state: waiting for completed aio requests (log thread)
  38. I/O thread 2 state: waiting for completed aio requests (read thread)
  39. I/O thread 3 state: waiting for completed aio requests (read thread)
  40. I/O thread 4 state: waiting for completed aio requests (read thread)
  41. I/O thread 5 state: waiting for completed aio requests (read thread)
  42. I/O thread 6 state: waiting for completed aio requests (write thread)
  43. I/O thread 7 state: waiting for completed aio requests (write thread)
  44. I/O thread 8 state: waiting for completed aio requests (write thread)
  45. I/O thread 9 state: waiting for completed aio requests (write thread)
  46. Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
  47. ibuf aio reads:, log i/o's:, sync i/o's:
  48. Pending flushes (fsync) log: 0; buffer pool: 0
  49. 1009 OS file reads, 622 OS file writes, 267 OS fsyncs
  50. 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
  51. -------------------------------------
  52. INSERT BUFFER AND ADAPTIVE HASH INDEX
  53. -------------------------------------
  54. Ibuf: size 1, free list len 47, seg size 49, 0 merges
  55. merged operations:
  56. insert 0, delete mark 0, delete 0
  57. discarded operations:
  58. insert 0, delete mark 0, delete 0
  59. Hash table size 34673, node heap has 1 buffer(s)
  60. Hash table size 34673, node heap has 0 buffer(s)
  61. Hash table size 34673, node heap has 0 buffer(s)
  62. Hash table size 34673, node heap has 1 buffer(s)
  63. Hash table size 34673, node heap has 1 buffer(s)
  64. Hash table size 34673, node heap has 0 buffer(s)
  65. Hash table size 34673, node heap has 1 buffer(s)
  66. Hash table size 34673, node heap has 1 buffer(s)
  67. 0.00 hash searches/s, 0.00 non-hash searches/s
  68. ---
  69. LOG
  70. ---
  71. Log sequence number 303613174
  72. Log flushed up to 303613174
  73. Pages flushed up to 303613174
  74. Last checkpoint at 303613165
  75. 0 pending log flushes, 0 pending chkp writes
  76. 170 log i/o's done, 0.00 log i/o's/second
  77. ----------------------
  78. BUFFER POOL AND MEMORY
  79. ----------------------
  80. Total large memory allocated 137428992
  81. Dictionary memory allocated 556898
  82. Buffer pool size 8191
  83. Free buffers 7456
  84. Database pages 721
  85. Old database pages 278
  86. Modified db pages 0
  87. Pending reads 0
  88. Pending writes: LRU 0, flush list 0, single page 0
  89. Pages made young 0, not young 0
  90. 0.00 youngs/s, 0.00 non-youngs/s
  91. Pages read 649, created 72, written 410
  92. 0.00 reads/s, 0.00 creates/s, 0.00 writes/s
  93. No buffer pool page gets since the last printout
  94. Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
  95. LRU len: 721, unzip_LRU len: 17
  96. I/O sum[0]:cur[0], unzip sum[0]:cur[0]
  97. --------------
  98. ROW OPERATIONS
  99. --------------
  100. 0 queries inside InnoDB, 0 queries in queue
  101. 0 read views open inside InnoDB
  102. Process ID=1, Main thread ID=140595880257280, state: sleeping
  103. Number of rows inserted 1799, updated 14, deleted 0, read 3816
  104. 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
  105. ----------------------------
  106. END OF INNODB MONITOR OUTPUT
  107. ============================
  108. 1 row in set (0.01 sec)