2. www.percona.com
议程
● MyISAM pk InnoDB :简要对比
● InnoDB Status
● InnoDB 的几个主要参数
● Percona Server 和其他产品开发流程介绍及参
加开源软件的体会和建议
● 时间允许, Percona 工具简介
很多基本知识,很多现场演示( live demo )
3. www.percona.com
关于我
● 丰富的 IT 业界经验:从 Windows 到 Linux ,从
微软 SQL Server 到开源 MySQL ,从行存储到
列存储,从制造业到金融业到培训和咨询,都有
广泛涉及和研究。
● 曾著有三本数据库书籍,并在时间允许的情况
下,乐于分享和交流其经验和心得。
● Http://www.haidongji.com
7. www.percona.com
InnoDB 状态
● 数据采集应当超过 30 秒
=====================================
111126 17:41:40 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 39 seconds
8. www.percona.com
InnoDB 状态组成部分
● Background Thread
● Semaphores
● Latest Foreign Key Error
● Latest Detect Deadlock
● File I/O
● Insert Buffer and Adaptive Hash Index
● Log
● Buffer Pool and Memory
● Row Operations
● Transactions
10. www.percona.com
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 32171153,
signal count 31011552
Mutex spin waits 0, rounds 20027565614, OS
waits 21875962
RW-shared spins 15207459, OS waits 1053752; RW-
excl spins 95741267, OS
waits 2485654
11. www.percona.com
----------
SEMAPHORES
----------
--Thread 8113 has waited at ibuf0ibuf.c line
366 for 1.00 seconds the semaphore:
S-lock on RW-latch at 67e58d0 created in file
dict0dict.c line 3706
number of readers 0, waiters flag 0
Last time read locked in file ibuf0ibuf.c line
366
Last time write locked in file ibuf0ibuf.c line
359
● 一般来讲,我们不想看到以上的 semaphore 等待,因为那意味
着 OS Waits( 耗资大 ) ,而不是 spin-waits( 耗资小)
16. www.percona.com
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 5, seg size 7,
36923 inserts, 36924 merged recs, 27673 merges
Hash table size 3187567, node heap has 3949
buffer(s)
2.00 hash searches/s, 17.08 non-hash searches/s
17. www.percona.com
---
LOG
---
Log sequence number 1615338
Log flushed up to 1615338
Last checkpoint at 1615338
Max checkpoint age 7782360
Checkpoint age target 7539162
Modified age 0
Checkpoint age 0
0 pending log writes, 0 pending chkp writes
8 log i/o's done, 0.00 log i/o's/second