Mariadb 10.1 View per connection memory consumption

Source: Internet
Author: User
Tags mysql in

In the MARIADB 10.1 release, in the Information_schema.processlist table, several fields were added, one memory_used, which records the memory consumption of the connection.

At the same time, a new state variable memory_used is recorded, which should be the memory consumed by all connections combined (the official does not explain https://mariadb.com/kb/en/mariadb/show-processlist/in particular), Should resemble the concept of the Oracle PGA.

In order to re-examine the reasons why MySQL is taking up more memory than buffer pool, we specifically asked OPS to switch one of the online instances from Percona to mariadb 10.1.21 for observation. As follows:

[[email protected] ~]# 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), 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 INF ormation_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)

In its memory output, there is no way to conclude how the global memory_used is composed. Processlist is not the same value, it is really strange, the official and various forum also did not find various explanations ...

The server buffer pool is configured with 4GB and some temporary tables are in use, and the current process memory consumption is as follows:

So, even if the 4gb+memory_used is almost 4.55G, and the actual 6.4G gap is quite large, it seems that MySQL in this area still need to have a big improvement.

Mariadb 10.1 View per connection memory consumption

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.