博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
mariadb 10.1查看per connection内存消耗
阅读量:6939 次
发布时间:2019-06-27

本文共 2393 字,大约阅读时间需要 7 分钟。

在mariadb 10.1版本中,在information_schema.processlist表中,新增了几个字段,其中有一个memory_used,其记录的是连接的内存消耗。

同时新增了一个状态变量memory_used,其记录的应该是所有连接加起来消耗的内存(官方并没有特别详细地解释https://mariadb.com/kb/en/mariadb/show-processlist/),应该类似于oracle pga的概念。

为了再检查下mysql占用内存远超过buffer pool的原因,我们特地让运维将某个线上实例从percona切换到了mariadb 10.1.21进行观察。如下:

[root@iZbp13xgu1d7hpg1gca4ndZ ~]# mysql -uroot -pmysqlWelcome to the MariaDB monitor.  Commands end with ; or \g.Your MariaDB connection id is 1046786Server version: 10.1.20-MariaDB MariaDB ServerCopyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]> show status like '%memory_used%';+---------------+-------+| Variable_name | Value |+---------------+-------+| Memory_used   | 67464 |+---------------+-------+1 row in set (0.00 sec)MariaDB [(none)]> show global status like '%memory_used%';+---------------+-----------+| Variable_name | Value     |+---------------+-----------+| Memory_used   | 568761128 |+---------------+-----------+1 row in set (0.00 sec)MariaDB [(none)]> select user,host,memory_used from information_schema.processlist;+-----------------+----------------------+-------------+| user            | host                 | memory_used |+-----------------+----------------------+-------------+| root            | localhost            |       84576 || osm             | 10.253.106.167:47847 |       95376 || osm             | 10.253.106.167:47843 |       94616 || osm             | 10.253.106.167:47845 |       94224 || osm             | 10.253.106.167:47841 |       93856 || osm             | 10.253.106.167:47835 |       94224 || osm             | 10.253.106.167:47836 |       94616 || osm             | 10.253.106.167:47831 |       67464 || osm             | 10.253.106.167:47832 |       67464 || osm             | 10.253.106.167:47815 |       71312 || osm             | 10.253.106.167:47791 |       67464 || osm             | 10.253.106.167:47792 |       67464 || osm             | 10.253.106.167:47780 |       67464 || event_scheduler | localhost            |       39784 |+-----------------+----------------------+-------------+14 rows in set (0.00 sec)

在其内存输出中,没有办法得出global memory_used是如何组成的?processlist汇总起来也不是这个值,这确实比较奇怪,官方和各种forum也没找到各种解释。。。

该服务器buffer pool配置的是4GB,外有一些临时表在用,当前的进程内存消耗如下:

所以,就算4GB+memory_used也差不多4.55G差不多,和实际的6.4G差距还是蛮大的,看来mysql在这方面还是需要有较大的改进。

转载地址:http://gifnl.baihongyu.com/

你可能感兴趣的文章
分享三种简单的推广渠道,玩转引流精准粉
查看>>
U2L蔚然成风,曙光为什么能抢了VMware的风头?
查看>>
MySQL基础备忘(2)之视图
查看>>
MapGuide OpenSource 2.2 安装中的数字签名错误
查看>>
ubuntu分区
查看>>
艾伟_转载:学习 ASP.NET MVC (第五回)理论篇
查看>>
Amazon AWS云管理平台技术内幕,互联网营销
查看>>
【评论】GNU/Linux下有多少是GNU的?
查看>>
IE漏洞致数百万用户中招 快用瑞星卡卡打补丁
查看>>
瑞星义卖活动圆满结束 感谢用户积极参与
查看>>
【Oracle】SQL学习笔记1---基本概念及SELECT语句及提取和排序数据
查看>>
大流量网站的底层系统架构
查看>>
技巧:Vimdiff 使用(转)
查看>>
VirtualBox安装CentOS后如何安装增强功能
查看>>
3D数学知识简介
查看>>
AMD OpenCL大学课程(3)
查看>>
一种线程安全的单例模式实现
查看>>
memcached-1.4.4在ubuntu下编译的注意事项
查看>>
C# 常用命名空间
查看>>
NameValueCollection详解
查看>>