このブログを検索

2011年2月15日火曜日

[MySQL]InnoDBのステータスを確認する

InnoDBのステータスを確認します。
この例では、InnoDB Pluginを使っているので、I/Oスレッド(read/write)をそれぞれ4に増やしてます。
$ grep _io_threads /etc/my.cnf
innodb_read_io_threads=4
innodb_write_io_threads=4

$ mysql -u root -p
mysql> SHOW ENGINE INNODB STATUS;
| Type   | Name | Status| InnoDB |      | 
=====================================
110215 22:32:10 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 8 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 20844 1_second, 20844 sleeps, 1732 10_second, 3540 background, 3540 flush
srv_master_thread log flush and writes: 20914
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 832, signal count 830
Mutex spin waits 234, rounds 6018, OS waits 63
RW-shared spins 763, OS waits 763; RW-excl spins 0, OS waits 6
Spin rounds per wait: 25.72 mutex, 30.00 RW-shared, 180.00 RW-excl
------------
TRANSACTIONS
------------
Trx id counter 417D3
Purge done for trx's n:o < 417C3 undo n:o < 0
History list length 7
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started, process no 3139, OS thread id 1242859840
MySQL thread id 5425, query id 65466 localhost root
SHOW ENGINE INNODB STATUS
---TRANSACTION 417D2, not started, process no 3139, OS thread id 1103010112
MySQL thread id 5422, query id 65451 Has read all relay log; waiting for the slave I/O thread to update it
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (read thread)
I/O thread 4 state: waiting for i/o request (read thread)
I/O thread 5 state: waiting for i/o request (read thread)
I/O thread 6 state: waiting for i/o request (write thread)
I/O thread 7 state: waiting for i/o request (write thread)
I/O thread 8 state: waiting for i/o request (write thread)
I/O thread 9 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
523 OS file reads, 9909 OS file writes, 8774 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 inserts, 0 merged recs, 0 merges
Hash table size 6375023, node heap has 4 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 177701418
Log flushed up to   177701418
Last checkpoint at  177701418
0 pending log writes, 0 pending chkp writes
5225 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 3293577216; in additional pool allocated 0
Dictionary memory allocated 607926
Buffer pool size   196607
Free buffers       194357
Database pages     2246
Old database pages 832
Modified db pages  0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 0, not young 0
0.00 youngs/s, 0.00 non-youngs/s
Pages read 486, created 4563, written 7861
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
LRU len: 2246, unzip_LRU len: 0
I/O sum[0]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread process no. 3139, id 1211124032, state: waiting for server activity
Number of rows inserted 514325, updated 8978, deleted 109, read 9934992
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================

0 件のコメント:

コメントを投稿