Mysql InnoDBノートメモリ

4876 ワード

InnoDB状態
show engine innodb status\G;

実行結果
Type: InnoDB
Name:
Status:
Per second averages calculated from the
last 6 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 0 srv_active, 0 srv_shutdown, 17509 srv_idle
srv_master_thread log flush and writes: 17509
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 2
OS WAIT ARRAY INFO: signal count 2
Mutex spin waits 5, rounds 12, 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: 2.40 mutex, 30.00 RW-shared, 0.00 RW-excl
------------
TRANSACTIONS
------------
Trx id counter 17154
Purge done for trx's n:o < 14771 undo n:o < 0 state: running but idle
History list length 588
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 1, OS thread handle 0x8ac, query id 15 localhost 127.0.0.1 root
init
show engine innodb status
--------
FILE I/O
--------
I/O thread 0 state: wait Windows aio (insert buffer thread)
I/O thread 1 state: wait Windows aio (log thread)
I/O thread 2 state: wait Windows aio (read thread)
I/O thread 3 state: wait Windows aio (read thread)
I/O thread 4 state: wait Windows aio (read thread)
I/O thread 5 state: wait Windows aio (read thread)
I/O thread 6 state: wait Windows aio (write thread)
I/O thread 7 state: wait Windows aio (write thread)
I/O thread 8 state: wait Windows aio (write thread)
I/O thread 9 state: wait Windows aio (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
312 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
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX  
性能挿入バッファと適応ハッシュ挿入バッファはバッファプールの一部ではない.インデックスに使用するのは補助インデックスであり、インデックスは一意ではない.この集約インデックスの挿入は、プライマリ・キーの自己成長のように順次完了するが、テーブルに一意でない非集約インデックスがある場合は、非集約インデックスのリーフ・ノードに対して離散記憶B+ツリーを挿入する必要がある.
-------------------------------------
Ibuf:size 1,free list len 0,seg size 2,0 merges segSize:現在の挿入バッファサイズは2*16 KBである.free listは空きリスト長sizeはマージ済みレコードページ数insertは挿入レコード数、mergedマージページ数、mergesマージ回数
merged operations:
insert 0, delete mark 0, delete 0
discarded operations:
insert 0, delete mark 0, delete 0
Hash table size 553253, node heap has 1 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 2122026419
Log flushed up to 2122026419
Pages flushed up to 2122026419
Last checkpoint at 2122026419
0 pending log writes, 0 pending chkp writes
8 log i/o's done, 0.00 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 135987200; in additional pool allocated 0
Dictionary memory allocated 32514
Buffer pool size 8192
Free buffers 7892
Database pages 299
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
0.00 youngs/s, 0.00 non-youngs/s
Pages read 299, 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: 299, 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
0 read views open inside InnoDB
Main thread id 2708, 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
----------------------------
END OF INNODB MONITOR OUTPUT
============================
 
InnoDBのメモリ
バッファ、REDOログバッファ、および追加のメモリからなる.
show variables like 'innodb_buffer_pool_size'\G;   134217728
show variables like 'innodb_log_buffer_size'\G;     8388608
show variables like 'innodb_additional_mem_pool_size'\G;     8388608
のバッファプールは、各種データを格納ためのキャッシュの最大部分である.エンジンは、ページ16 KB/毎にバッファプールに読み出す、LRUを押してバッファプールのデータを保持する.データベースファイルを変更する必要がある場合は、バッファ内のページを変更し、変更すると汚れたページになり、一定の頻度で汚れたページをファイルにリフレッシュします.
Buffer pool size 8192のサイズでバッファ8192*16(KB/page)/1024=?
バッファプールにキャッシュするデータ型は、インデックスページ、データページ、UNDOページ、挿入バッファ、適応ハッシュインデックス、InnoDBロック情報、データ辞書などである.
AWEがオンになると、エンジンは自動的に適応ハッシュインデックスを無効にする.
ログバッファは、REDOログ情報をこのバッファに格納、一定の頻度でREDOログファイルにリフレッシュする.