mariadb 10.1查看per connection内存消耗
在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 -pmysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 1046786
Server version: 10.1.20-MariaDB MariaDB Server Copyright (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在这方面还是需要有较大的改进。
mariadb 10.1查看per connection内存消耗的更多相关文章
- Docker MariaDB 10.3 Galera Cluster 集群同步复制 多主 Docker Haproxy 负载均衡
mariadb 现有动态列,支持json格式存储,类似mongodb的bson,但是操作能力较为尴尬,中间件有spider,我非常感兴趣的一个东西 关于spider 这里有一篇很好的博文,有时间一定得 ...
- windows下使用adb工具查看android程序cpu和内存消耗情况
在实际的开发当中,尤其软件运行在一个硬件设备比较差的环境下,对软件占用资源大的问题是开发者们必须要解决的问题,系统比较卡.觉得应该看看程序的cpu和内存消耗 一直以来都在windows下编程,已经习惯 ...
- Linux学习总结(10)——Linux查看CPU和内存使用情况
在系统维护的过程中,随时可能有需要查看 CPU 使用率,并根据相应信息分析系统状况的需要.在 CentOS 中,可以通过 top 命令来查看 CPU 使用状况.运行 top 命令后,CPU 使用状态会 ...
- MySQL与MariaDB核心特性比较详细版v1.0(覆盖mysql 8.0/mariadb 10.3,包括优化、功能及维护)
注:本文严禁任何形式的转载,原文使用word编写,为了大家阅读方便,提供pdf版下载. MySQL与MariaDB主要特性比较详细版v1.0(不含HA).pdf 链接:https://pan.baid ...
- Linux查看CPU和内存使用情况(转)
在系统维护的过程中,随时可能有需要查看 CPU 使用率,并根据相应信息分析系统状况的需要.在 CentOS 中,可以通过 top 命令来查看 CPU 使用状况.运行 top 命令后,CPU 使用状态会 ...
- Linux查看CPU和内存使用情况
在系统维护的过程中,随时可能有需要查看 CPU 使用率,并根据相应信息分析系统状况的需要.在 CentOS 中,可以通过 top 命令来查看 CPU 使用状况.运行 top 命令后,CPU 使用状态会 ...
- Linux查看CPU和内存使用情况【转】
转自:http://www.cnblogs.com/xd502djj/archive/2011/03/01/1968041.html 在系统维护的过程中,随时可能有需要查看 CPU 使用率,并根据相应 ...
- 【转】Linux查看CPU和内存使用情况
=====================================top============================================== 在系统维护的过程中,随时可 ...
- Linux查看CPU和内存使用情况 【转】
Linux查看CPU和内存使用情况 在系统维护的过程中,随时可能有需要查看 CPU 使用率,并根据相应信息分析系统状况的需要.在 CentOS 中,可以通过 top 命令来查看 CPU 使用状况.运行 ...
随机推荐
- iOS UITextField实时监听获取输入内容,中文状态去除预输入拼音
http://blog.csdn.net/cse110/article/details/51360796 - (void)textFieldDidChange:(UITextField *)textF ...
- sql根据某一个字段重复只取第一条数据
比如上图,取3,4行记录的第一行也就是3行,而不返回4行. 使用分析函数row_number() over (partiion by ... order by ...)来进行分组编号,然后取分组标号值 ...
- 2018/03/14 每日一个Linux命令 之 ln
ln 链接命令 -- 类似Windows的快捷方式,实际等于建立了一个文件同步的链接,我想,MAC上面复制一个文件到另一个路径,特别快,它可能就是建立了一个链接. -- 在通俗点讲,就是你创建链接之后 ...
- es新增字段,并设置默认值
重新设置mapping 添加新的字段. 设置es允许脚本执行:elasticsearch.yml script.inline: true 然后执行脚本 POST linewell_assets_mgt ...
- vue-页面回退
<template> <div> <button @click="goback">我是Home01</button> </di ...
- 1025 PAT Ranking[排序][一般]
1025 PAT Ranking (25)(25 分) Programming Ability Test (PAT) is organized by the College of Computer S ...
- Ubuntu 16.04下deb文件的安装
pkg 是Debian Package的简写,是为Debian 专门开发的套件管理系统,方便软件的安装.更新及移除.所有源自Debian的Linux发行版都使用dpkg,例如Ubuntu.Knoppi ...
- window7 触屏操作相关
一.体系概述 1.Windows Touch Input 和 Gestures消息 Windows Touch消息特性 通过在执行期间的监听和解释来使能.下面的示例展示了Windows7 上消息是怎么 ...
- Improving the quality of the output
There are a variety of reasons you might not get good quality output from Tesseract. It's important ...
- Linux CentOS6.5下编译安装MySQL 5.6
检查:卸载掉原有MySql 因为mysql数据库在Linux上实在是太流行了,所以目前下载的主流Linux系统版本基本上都集成了mysql数据库在里面,我们可以通过如下命令来查看我们的操作系统上是否已 ...