MySQL 5.7 Memory usage monitoring

Source: Internet
Author: User

5.7 of Performance_schema already have the ability to monitor the memory usage of MySQL, for this is to be achieved through the instrument, because the memory this piece does not have a corresponding consumer so long as

Well, it's okay to configure instrument.

1. Example:

/etc/my.cnf

[Mysqld]datadir                                    =/usr/local/mysql/databasedir                                    =/usr/local/mysqlperformance_schema_instrument              = ' Memory%=counted '

Select Event_name,current_alloc from sys.memory_global_by_current_bytes limit 10;+--------------------------------- --------------------------------------------+---------------+| Event_Name | Current_alloc |+-----------------------------------------------------------------------------+---------------+| Memory/innodb/buf_buf_pool | 131.06 MiB | | Memory/innodb/log0log | 32.01 MiB | | Memory/performance_schema/events_statements_history_long | 13.66 MiB | | Memory/performance_schema/events_statements_history_long.sqltext | 9.77 MiB | | Memory/performance_schema/events_statements_history_long.tokens | 9.77 MiB | | Memory/performance_schema/events_statements_summary_by_digest.tokens | 9.77 MiB | |                       Memory/performance_schema/table_handles              | 9.06 MiB | | Memory/performance_schema/events_statements_summary_by_thread_by_event_name | 8.67 MiB | | Memory/mysys/key_cache | 8.00 MiB | | Memory/performance_schema/memory_summary_by_thread_by_event_name | 5.62 MiB |+-----------------------------------------------------------------------------+---------------+

  

MySQL 5.7 Memory usage monitoring

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.