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

打开performance_schema
控制台可开
在这里插入图片描述

打开内存监控
update performance_schema.setup_instruments set enabled = ‘yes’ where name like ‘memory%’;
查看监控
select * from sys.x m e m o r y b y h o s t b y c u r r e n t b y t e s ; s e l e c t ∗ f r o m s y s . x memory_by_host_by_current_bytes ; select * from sys.x memorybyhostbycurrentbytes;selectfromsys.xmemory_by_thread_by_current_bytes ;
select * from sys.x m e m o r y b y u s e r b y c u r r e n t b y t e s ; s e l e c t ∗ f r o m s y s . x memory_by_user_by_current_bytes ; select * from sys.x memorybyuserbycurrentbytes;selectfromsys.xmemory_global_by_current_bytes ;
select * from sys.x$memory_global_total ;
event_name
内存事件名称。

current_count
事件发生的总次数。

current_alloc
事件尚未释放的已分配字节的当前数目。

current_avg_alloc
为事件的每个内存块分配的当前字节数。

high_count
分配给事件的内存块数量的最高标记。

high_alloc
为事件分配的字节数的高水位标记。

high_avg_alloc
为事件分配的每个内存块的平均字节数的最高标记。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值