如何定位RDS MySQL内存使用率高?

打开performance_schema

控制台可开
image

打开内存监控

update performance_schema.setup_instruments set enabled = 'yes' where name like 'memory%';

查看监控

select * from sys.x$memory_by_host_by_current_bytes   ;
select * from sys.x$memory_by_thread_by_current_bytes ;
select * from sys.x$memory_by_user_by_current_bytes   ;
select * from sys.x$memory_global_by_current_bytes    ;
select * from sys.x$memory_global_total               ;

参考

http://www.innomysql.com/mysql-5-7-oom%E9%97%AE%E9%A2%98%E8%AF%8A%E6%96%AD-%E5%B0%B1%E6%98%AF%E8%BF%99%E4%B9%88%E7%AE%80%E5%8D%95/

猜你喜欢

转载自yq.aliyun.com/articles/685940