zoukankan      html  css  js  c++  java
  • mysql 5.7 内存使用监控

    5.7 中的performance_schema 已经有能力监控mysql 的内存使用情况了,对于这一点也是要通过instrument 来实现的,由于内存这一块没有对应的consumer 所以只要

    配置好instrument 就行了

    1、例子:

    /etc/my.cnf

    [mysqld]
    datadir                                    =/usr/local/mysql/data
    basedir                                    =/usr/local/mysql
    performance_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      |
    +-----------------------------------------------------------------------------+---------------+
  • 相关阅读:
    毕设随笔 ssm框架搭建
    ubuntu18.04安装mysql与workbench
    Ubuntu18.04安装破解Intellij IDEA
    快慢指针--快乐数判断
    二维数组,深度优先算法 -- 岛屿数量
    动态规划--打家劫舍
    大数据课程笔记 1
    递归--上下翻转二叉树
    python课程设计笔记(五) ----Resuests+BeautifulSoup (爬虫入门)
    Git Learning Part III
  • 原文地址:https://www.cnblogs.com/JiangLe/p/5947413.html
Copyright © 2011-2022 走看看