您的位置:首页 > 其它

show engine innodb status 解读

2018-02-24 19:04 573 查看
mysql> show engine innodb status\G
*************************** 1. row ***************************
Type: InnoDB
Name:
Status:
=====================================
2018-02-24 18:15:52 0x7f2ac00dd700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 41 seconds

-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 2 srv_active, 0 srv_shutdown, 23859 srv_idle
srv_master_thread log flush and writes: 23860

----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 2
OS WAIT ARRAY INFO: signal count 2
RW-shared spins 0, rounds 4, OS waits 2
RW-excl spins 0, rounds 0, OS waits 0
RW-sx spins 0, rounds 0, OS waits 0
Spin rounds per wait: 4.00 RW-shared, 0.00 RW-excl, 0.00 RW-sx

------------------------
LATEST FOREIGN KEY ERROR
------------------------
2018-01-29 23:23:31 0x7f984875e700 Transaction:
TRANSACTION 171061511, ACTIVE 1 sec inserting
mysql tables in use 1, locked 1
10 lock struct(s), heap size 1136, 6 row lock(s), undo log entries 5

------------------------
LATEST DETECTED DEADLOCK ### 如果有死锁发生,会有相关的记录
------------------------
2018-02-24 18:52:09 2b6677e07700 -- 死锁发生的时间
*** (1) TRANSACTION:
*** (2) TRANSACTION: -- 事务2的状态

------------
TRANSACTIONS ### 包含了InnoDB事务(transaction)的统计信息
------------
Trx id counter 5892
Purge done for trx's n:o < 5386 undo n:o < 0 state: running but idle
History list length 3
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 421297007339344, not started
0 lock struct(s), heap size 1136, 0 row lock(s)

--------
FILE I/O ###显示了I/O Helper thread d的状态,包含一些统计信息
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
ibuf aio reads:, log i/o's:, sync i/o's:
Pending flushes (fsync) log: 0; buffer pool: 0
384 OS file reads, 59 OS file writes, 7 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s

-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2, 0 merges
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
Hash table size 34679, node heap has 0 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s

---
LOG ###记录了transaction log 子系统的信息
---
Log sequence number 370441977
Log flushed up to 370441977
Pages flushed up to 370441977
Last checkpoint at 370441968
0 pending log flushes, 0 pending chkp writes
10 log i/o's done, 0.00 log i/o's/second

----------------------
BUFFER POOL AND MEMORY #####INNODB BUFFER POOL 状态,
----------------------
Total large memory allocated 137428992 --分配给innodb 的总内存大小、单位byte
Dictionary memory allocated 147231 --分配给innodb 数据字典的内存大小、单位byte
Buffer pool size 8192 --innodb buffer pool的大小、单位page 如果page的大小设置为16k的话 *16*1024 = innodb_buffer_pool_size
Free buffers 7914 --innodb buffer pool中空闲页面的数量,单位page
Database pages 278 --innodb buffer pool中非空闲页面的数量, 单位page
Old database pages 0 --old 子列表中的页面数量,单位page
Modified db pages 0 --当前buffer pool中被修改的页面数量,单位page
Pending reads 0 -- 数据由磁盘读到buffer pool,被挂起的次数
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0 --Pages made young页面由old列表移动到new列表的次数;not young 页面由new列表移动表old列表的次数
0.00 youngs/s, 0.00 non-youngs/s --youngs/s平均每秒有多少个页面由old移动到new,non-youngs/s平均每秒有多少个页面由new移动到old
Pages read 243, created 35, written 42 -- 从buffer pool中读出页面的总数;在innodb buffer pool中创建页面的总数; innodb buffer pool中被写过的页面总数
0.00 reads/s, 0.14 creates/s, 42.14 writes/s -- 平均每秒从innodb buffer pool中读多少页,平均每秒innodb buffer pool要创建多少页,平均每少innodb buffer pool有多少页面被写
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000 -- innodb buffer pool 命中率
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
-- Pages read ahead 平均每秒read ahead的次数 ,evicted without access平均每秒页面淘汰的次数 ,  Random read ahead 平均每秒random read ahead的次数
LRU len: 80675, unzip_LRU len: 0
I/O sum[10392]:cur[0], unzip sum[0]:cur[0]

----------------------
INDIVIDUAL BUFFER POOL INFO #############如设置了innodb_buffer_pool_instances,则有多个子pool
----------------------

--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
Process ID=2969, Main thread ID=139821729601280, state: sleeping
Number of rows inserted 0, updated 0, deleted 0, read 12
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================

1 row in set (0.00 sec)

mysql> \s
--------------
mysql  Ver 14.14 Distrib 5.7.20, for Linux (x86_64) using  EditLine wrapper
Connection id:4
Current database:performance_schema
Current user:root@localhost
SSL:Not in use
Current pager:stdout
Using outfile:''
Using delimiter:;
Server version:5.7.20-log MySQL Community Server (GPL)
Protocol version:10
Connection:Localhost via UNIX socket
Server characterset:utf8
Db     characterset:utf8
Client characterset:utf8
Conn.  characterset:utf8
UNIX socket:/var/lib/mysql/mysql.sock
Uptime:7 hours 28 min 8 sec
Threads: 3  Questions: 222  Slow queries: 0  Opens: 201  Flush tables: 1  Open tables: 194  Queries per second avg: 0.008
--------------
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  innodb status