匿名用户如何在不重启MYSQL情况下,让MYSQL 释放共享内存呢?
MYSQL 采用默认RPM安装,以及默认参数下, INNODB BUF SIZE 也是默认。现在MYSQL 内存占用太多
我来答
添加附件
收藏
复制链接
微信扫码分享
在小程序上查看
分享
添加附件
问题补充
4条回答
默认
最新
mysql> select event_name,current_alloc from sys.memory_global_by_current_bytes limit 10;
+---------------------------------------------------------------------------+---------------+
| event_name | current_alloc |
+---------------------------------------------------------------------------+---------------+
| memory/innodb/buf_buf_pool | 4.08 GiB |
| memory/performance_schema/events_statements_history.digest_text | 2.44 GiB |
| memory/performance_schema/events_statements_history.sql_text | 2.44 GiB |
| memory/performance_schema/events_statements_history | 355.47 MiB |
| memory/innodb/hash0hash | 114.83 MiB |
| memory/performance_schema/events_statements_history_long.sql_text | 97.66 MiB |
| memory/performance_schema/events_statements_summary_by_digest.digest_text | 97.66 MiB |
| memory/performance_schema/events_statements_history_long.digest_text | 97.66 MiB |
| memory/sql/TABLE | 73.76 MiB |
| memory/performance_schema/events_statements_summary_by_digest | 39.67 MiB |
+---------------------------------------------------------------------------+---------------+
10 rows in set (0.01 sec)
如何释放performance_schema内存 不重启情况下?
评论
有用 0mysql> select event_name,current_alloc from sys.memory_global_by_current_bytes limit 10; +---------------------------------------------------------------------------+---------------+ | event_name | current_alloc | +---------------------------------------------------------------------------+---------------+ | memory/innodb/buf_buf_pool | 4.08 GiB | | memory/performance_schema/events_statements_history.digest_text | 2.44 GiB | | memory/performance_schema/events_statements_history.sql_text | 2.44 GiB | | memory/performance_schema/events_statements_history | 355.47 MiB | | memory/innodb/hash0hash | 114.83 MiB | | memory/performance_schema/events_statements_history_long.sql_text | 97.66 MiB | | memory/performance_schema/events_statements_summary_by_digest.digest_text | 97.66 MiB | | memory/performance_schema/events_statements_history_long.digest_text | 97.66 MiB | | memory/sql/TABLE | 73.76 MiB | | memory/performance_schema/events_statements_summary_by_digest | 39.67 MiB | +---------------------------------------------------------------------------+---------------+ 10 rows in set (0.01 sec)
评论
有用 0mysql> select event_name,current_alloc from sys.memory_global_by_current_bytes limit 10;
+---------------------------------------------------------------------------+---------------+ | event_name | current_alloc | +---------------------------------------------------------------------------+---------------+ | memory/innodb/buf_buf_pool | 4.08 GiB | | memory/performance_schema/events_statements_history.digest_text | 2.44 GiB | | memory/performance_schema/events_statements_history.sql_text | 2.44 GiB | | memory/performance_schema/events_statements_history | 355.47 MiB | | memory/innodb/hash0hash | 114.83 MiB | | memory/performance_schema/events_statements_history_long.sql_text | 97.66 MiB | | memory/performance_schema/events_statements_summary_by_digest.digest_text | 97.66 MiB | | memory/performance_schema/events_statements_history_long.digest_text | 97.66 MiB | | memory/sql/TABLE | 73.76 MiB | | memory/performance_schema/events_statements_summary_by_digest | 39.67 MiB | +---------------------------------------------------------------------------+---------------+ 10 rows in set (0.01 sec)
评论
有用 0这个好像没辙,只能重启解决,另外如果你的服务器内存比较小,buffer pool不要设置太大,50%的os内存就可以。
评论
有用 0回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
墨值悬赏

