打开performance_schema
控制台可开
打开内存监控
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 ;