9
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

show innodb status で データーベース の中身がメモリに入りきっているか確認

Last updated at Posted at 2017-03-19

show innodb status\G

mysql> show engine innodb status\G

BUFFER POOL AND MEMORY
----------------------
Total memory allocated 2195718144; in additional pool allocated 0
Dictionary memory allocated 1350348
Buffer pool size   131072
Free buffers       0
Database pages     128747
  • Free buffersが0なので、確保したバッファープールを使い切っている。

    • 0 にならないように innodb_buffer_pool_size 値を増やす
    • もしくは 不要なデータを大量削除しておく。
  • mysqldを再起動して確認。

  • 暖気のためDBをdumpしてからFree buffers値を確認。

0.00 reads/s, 0.00 creates/s, 0.00 writes/s

 ----------------------
 BUFFER POOL AND MEMORY
 ----------------------
 Total memory allocated 626511882; in additional pool allocated 1048320
 Buffer pool size   32768
 Free buffers       28540
 Database pages     4224
 Modified db pages  0
 Pending reads 0 
 Pending writes: LRU 0, flush list 0, single page 0
 Pages read 350, created 3874, written 12035
+0.00 reads/s, 0.00 creates/s, 0.00 writes/s
 No buffer pool page gets since the last printout
  • reads/s が 0であればDISKから読み出されていない。

innodb_buffer_pool_size

  • my.cnf で innodb_buffer_pool_size サイズを指定できる。
  • 実メモリの 80% まで指定できるらしいが、ここで指定した値の110% を使用される仕様。
    • 自分は70% までとした。
9
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?