innodb存储引擎状态参数

1.InnoDB 存储引擎层体系结构图:

wKioL1YDWjvxhm5GAAHnCeQgG6k709.jpg


2.查看innodb存储引擎的时间 

mysql> show engine innodb status \G
*************************** 1. row ***************************
  Type: InnoDB         --innodb存储引擎
  Name:
Status:
=====================================
2015-04-17 10:37:02 7f1fc1fe9700 INNODB MONITOR OUTPUT   --监控输出
=====================================
Per second averages calculated from the last 14 seconds  
-----------------


3.后台线程参数
BACKGROUND THREAD
-----------------
srv_master_thread loops: 0 srv_active, 0 srv_shutdown, 562 srv_idle  --主线程状态循环0次,0个关闭状态,562个空闲状态,表示主线程无压力
srv_master_thread log flush and writes: 562   --主线程日志刷新和写入562个页
----------


4.信息输出
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 2
OS WAIT ARRAY INFO: signal count 2
Mutex spin waits 0, rounds 0, OS waits 0
RW-shared spins 2, rounds 60, OS waits 2
RW-excl spins 0, rounds 0, OS waits 0
Spin rounds per wait: 0.00 mutex, 30.00 RW-shared, 0.00 RW-excl
------------


5.事物
TRANSACTIONS
------------
Trx id counter 3842
Purge done for trx's n:o < 2856 undo n:o < 0 state: running but idle
History list length 6
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 2, OS thread handle 0x7f1fc1fe9700, query id 5 localhost root init
show engine innodb status
--------


6.文件IO
FILE I/O
--------
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)  --默认4个读线程
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)  --默认4个写线程
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, 0] , aio writes: 0 [0, 0, 0, 0] ,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
318 OS file reads, 5 OS file writes, 5 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s
-------------------------------------


7.插入缓冲和自适应哈稀索引
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 0, seg size 2, 0 merges --size是已经合并记录页的数量,free list len空闲列表的长度,seg size是当前insert buffer的大小,merges是合并了多少个插入语句
merged operations:
 insert 125, delete mark 101, delete 10  --insert插入缓冲的次数,delete mark标记为已删除的次数,delete表示purge的次数(删除)
discarded operations:
 insert 0, delete mark 0, delete 0  --有多少个insert buffer被丢弃,有多少个insert buffer被标记为已删除,purge多少个insert buffer等
Hash table size 276671, node heap has 0 buffer(s)  --hash索引的大小和使用情况
0.00 hash searches/s, 0.00 non-hash searches/s    --每秒搜索的情况(AHI)
---


8.日志信息
LOG
---
Log sequence number 1649686
Log flushed up to   1649686
Pages flushed up to 1649686
Last checkpoint at  1649686
0 pending log writes, 0 pending chkp writes
8 log i/o's done, 0.00 log i/o's/second
----------------------


9.缓冲池和内存
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 137363456; in additional pool allocated 0
Dictionary memory allocated 50138
Buffer pool size   8191       --缓冲池页总数量(8191 X 16KB)
Free buffers       8025    --剩余数量
Database pages     166      --LRU中的页数量(如果相加不等于总大小,是因为锁信息,数据字典占用了)
Old database pages 0    --旧数据的数量
Modified db pages  0   --脏页的数量
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0   --young是LRU算法将old页加入到new页,not young是old页没有加入new页.
0.00 youngs/s, 0.00 non-youngs/s   --youngs/s是每秒加入操作的次数,non-youngs/s是没有加入的每秒操作次数
Pages read 166, created 0, written 1
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 166, unzip_LRU len: 0    --LRU将16KB页压缩成1KB,2KB,4KB,8KB,unzip_LRU没有压缩的页
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
--------------


10.行操作
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
Main thread process no. 27472, id 139774264338176, state: sleeping
Number of rows inserted 0, updated 0, deleted 0, read 0
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------


11.结束监控
END OF INNODB MONITOR OUTPUT
============================

1 row in set (0.00 sec)

mysql>


第四段:

TRANSACTIONS
------------
Trx id counter 3842
Purge done for trx's n:o < 2856 undo n:o < 0 state: running but idle
History list length 6            --记录undo日志的数量
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 2, OS thread handle 0x7f1fc1fe9700, query id 5 localhost root init
show engine innodb status
--------


第六段:

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 276671, node heap has 0 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---

seg size 2:INSERT BUFFER的大小,2X16KB

ree list len 0:空闲列表的长度

Ibuf: size 1:合并记录页的数量

insert 0:INSERT BUFFER

delete mark 0:DELETE BUFFER

delete 0:PURGE BUFFER

discarded operations:Change Buffer发生merge时表已经被删除,无需再将记录合并到辅助索引中了


第七段:

LOG
---
Log sequence number 1649686     --当前的LSN号
Log flushed up to   1649686     --刷新后的LSN号
Pages flushed up to 1649686     --刷新和事物提交后的LSN号
Last checkpoint at  1649686     --写入到磁盘后的LSN号
0 pending log writes, 0 pending chkp writes
8 log i/o's done, 0.00 log i/o's/second
----------------------



你可能感兴趣的:(存储引擎,InnoDB,状态参数)