mysql innodb status_mysql-5.7 show engine innodb status 详解

一、show engine innodb status 简介:

show engine innodb status 是mysql提供的一个用于查看innodb引擎时间信息的工具,就目前来说有两处比较

常用的地方一、死锁分析 二、innodb内存使用情况

二、通过show engine innodb status 查看内存使用情况:

1、show variables like 'innodb_buffer_pool_size' 查看buffer pool 的内存配置

show variables like 'innodb_buffer_pool_size';+-------------------------+-----------+

| Variable_name | Value |

+-------------------------+-----------+

| innodb_buffer_pool_size | 268435456 |

+-------------------------+-----------+

1 row in set (0.01sec)

mysql> select 268435456/1024/1024 asinnodb_buffer_pool_size_in_MB;+-------------------------------+

| innodb_buffer_pool_size_in_MB |

+-------------------------------+

| 256.00000000 |

+-------------------------------+

1 row in set (0.00 sec)

2、通过show engine innodb status 查看内存使用明细

show engine innodb status ;----------------------

BUFFER POOL ANDMEMORY----------------------

Total large memory allocated 274857984Dictionary memory allocated116177Buffer pool size16382Free buffers16002

Database pages 380Olddatabase pages 0Modified db pages0Pending reads0Pending writes: LRU0, flush list 0, single page 0Pages made young0, not young 0

0.00 youngs/s, 0.00 non-youngs/s

Pagesread 345, created 35, written 37

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

No buffer pool page gets since the last printout

Pagesread ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s

LRUlen: 380, unzip_LRU len: 0I/O sum[0]:cur[0], unzip sum[0]:cur[0]

三、对BUFFER POOL AND MEMORY 各项的说明:

1、Total large memory allocated                  分配给innodb 的总内存大小、单位byte

2、Dictionary memory allocated                  分析给innodb 数据字典的内存大小、单位byte

3、Buffer pool size                                    innodb buffer pool的大小、单位page  如果page的大小设置为16k的话

那么这个值乘以16就是innodb buffer pool 的大小(单位kb)

show global variables like 'innodb_buffer_pool_size';+-------------------------+-----------+

| Variable_name | Value |

+-------------------------+-----------+

| innodb_buffer_pool_size | 268435456 |

+-------------------------+-----------+

1 row in set (0.00sec)

mysql> select 16384*16*1024 asinnodb_buffer_pool_size_in_byte;+---------------------------------+

| innodb_buffer_pool_size_in_byte |

+---------------------------------+

| 268435456 |

+---------------------------------+

4、Free buffers              innodb buffer pool中空闲页面的数量,单位page

5、Database pages            innodb buffer pool中非空闲页面的数量, 单位page

6、Old database pages           old 子列表中的页面数量,单位page

7、Modified db pages             当前buffer pool中被修改的页面数量,单位page

8、Pending reads               数据由磁盘读到buffer pool,被挂起的次数

9、Pending writes: LRU          innodb buffer pool old 子列表的页面被淘汰出内存,要写入到磁盘,但是

这个写入被挂起的次数

10、flush list               check point 操作期间页面要被写入到磁盘,但是这个写入被挂起的次数

11、single page              单个页面要被写入到磁盘,但是这个写入过程被挂起的次数

12、Pages made young          页面由old列表移动到new列表的次数

13、not young               页面由new列表移动表old列表的次数

14、youngs/s                平均每秒有多少个页面由old移动到new

15、non-youngs/s             平均每秒有多少个页面由new移动到old

16、Pages read               从buffer pool中读出页面的总数

17、created                在innodb buffer pool中创建页面的总数

18、written                 innodb buffer pool中被写过的页面总数

19、reads/s                平均每秒从innodb buffer pool中读多少页

20、creates/s               平均每秒innodb buffer pool要创建多少页

21、writes/s               平均每少innodb buffer pool有多少页面被写

22、buffer pool hit rate          innodb buffer pool 命中率

23、Pages read ahead           平均每秒read ahead的次数

24、evicted without access        平均每秒页面淘汰的次数

25、Random read ahead          平均每秒random read ahead的次数

----

交流学习&打赏

faac64750cb5c06503b1bff5850a9269.png

666ba1261b3f185c30e3f7bff51e909b.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值