首页 > 数据库 >MYSQL 8 上云 performance_schema 里面参数我们打开了那些 5个表调整脚本?(POLARDB 适用)...

MYSQL 8 上云 performance_schema 里面参数我们打开了那些 5个表调整脚本?(POLARDB 适用)...

时间:2023-06-22 15:02:03浏览次数:49  
标签:... SET NO setup ENABLED 上云 UPDATE 个表 schema


MYSQL 8  上云 performance_schema 里面参数我们打开了那些  5个表调整脚本?(POLARDB 适用)..._数据库

关于监控如果上云后,到底还需要自行进行监控吗,是一个问题,是否把所有的数据库监控都放到云上,通过云来获取数据库的信息是一个问题。

首先回答是否定的,

1  云的数据库监控的数据,部分也是通过数据库中的系统的表中获得的

2  云的监控数据的需要进行处理加工,处理加工的方式对不对,这也是一个问题

3  更细致的监控,举例如果是POSTGRESQL 那么云的监控给出的数据是可怜的,必然我们要通过PG 里面的详细的系统表进行数据的获得和更细化的信息的获得,MYSQL 8 也是一致的

所以结论是,必须要打开 PS ( performance_schema) ,并从中获得系统的信息。

show variables like 'performance_schema';

MYSQL 8  上云 performance_schema 里面参数我们打开了那些  5个表调整脚本?(POLARDB 适用)..._数据库_02

首先需要先熟悉下面的五个表,这是针对PS的开关,具体PS 如何使用,怎么使用,性能消耗,都和这五个设计的表有关

1  setup_instruments

这个参数至关重要,他对所有的监控项进行了设置,其中1236 个选项中

MYSQL 8  上云 performance_schema 里面参数我们打开了那些  5个表调整脚本?(POLARDB 适用)..._mysql_03

打开的参数有544 个 (8.027 ),这些参数中是否都需要打开,显然粗略的看一看就知道,不需要,所以下面总结了将目前我们任务无用的监控设置关闭的语句 

下面是组织好的语句,针对MYSQL 8 performance_schema 中的setup_instruments 中的获取的嬉戏进行关闭,下面的是默认开启,但实际上我们并不使用的仪器。实际上我们使用的打开的

UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'wait/io/file/sql/slow_log';
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'wait/io/file/innodb/innodb_data_file';                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'wait/io/file/innodb/innodb_log_file';                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'wait/io/file/innodb/innodb_temp_file'; 
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'wait/lock/metadata/sql/mdl'; 
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'stage/sql/Waiting for table metadata lock'; 
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/select';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/create_table';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/create_index';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/alter_table';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/update';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/insert';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/insert_select';                                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/delete';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/truncate';                                                         
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/drop_table';                                                       
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/drop_index';                                                       
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/show_databases';                                                   
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/show_tables'; 
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/commit'; 
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/commit'; 
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/begin';
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'statement/sql/error'; 
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'memory/performance_schema/table_io_waits_summary_by_index_usage';                
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'memory/performance_schema/table_lock_waits_summary_by_table';   
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'memory/sql/hash_join';   
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'memory/innodb/ibuf0ibuf';         
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'error';   
——————————————————————————————
对整体进行配置的命令关闭我们不需要的设置
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Replica_job_group::group_relay_log_name';                             
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/binlog_cache_mngr';                                                   
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Row_data_memory::memory';                                             
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Gtid_set::to_string';                                                 
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Gtid_state::to_string';                                               
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Owned_gtids::to_string';                                              
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Log_event';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Filesort_info::merge';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Filesort_info::record_pointers';                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Filesort_buffer::sort_keys';                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/errmsgs::handler';                                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/handlerton::objects';                                                 
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/XA::transaction_contexts';                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/host_cache::hostname';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/user_var_entry::value';                                               
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/User_level_lock';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/MYSQL_LOG::name';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/TC_LOG_MMAP::pages';                                                  
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/my_bitmap_map';                                                       
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/QUICK_RANGE_SELECT::mrr_buf_desc';                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Event_queue_element_for_exec::names';                                 
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/my_str_malloc';                                                       
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/MYSQL_BIN_LOG::basename';                                             
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/MYSQL_BIN_LOG::index';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/MYSQL_RELAY_LOG::basename';                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/MYSQL_RELAY_LOG::index';                                              
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/rpl_filter memory';                                                   
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/errmsgs::server';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Gis_read_stream::err_msg';                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Geometry::ptr_and_wkb_data';                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/MYSQL_LOCK';                                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/NET::buff';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/NET::compress_packet';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Event_scheduler::scheduler_param';                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Gtid_set::Interval_chunk';                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Owned_gtids::sidno_to_hash';                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Sid_map::Node';                                                       
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Gtid_state::group_commit_sidno_locks';                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Mutex_cond_array::Mutex_cond';                                        
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/TABLE_RULE_ENT';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Rpl_info_table';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Rpl_info_file::buffer';                                               
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/db_worker_hash_entry';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/rpl_replica::check_temp_dir';                                         
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/REPLICA_INFO';                                                        
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/binlog_pos';                                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/HASH_ROW_ENTRY';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/binlog_statement_buffer';                                             
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Partition::syntax_buffer';                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/READ_INFO';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/JOIN_CACHE';                                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/TABLE::sort_io_cache';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/dd::infrastructure';                                                  
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/dd::column_statistics';                                               
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/dd::default_values';                                                  
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/dd::import';                                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/dd::objects';                                                         
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Unique::sort_buffer';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Unique::merge_buffer';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/TABLE';                                                               
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/LOG::file_name';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/dd::String_type';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/ST_SCHEMA_TABLE';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/PROFILE';                                                             
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/global_system_variables';                                             
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/THD::variables';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Shared_memory_name';                                                  
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/bison_stack';                                                         
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/THD::handler_tables_hash';                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/hash_index_key_buffer';                                               
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/user_conn';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/LOG_POS_COORD';                                                       
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/MPVIO_EXT::auth_info';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/opt_bin_logname';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/READ_RECORD_cache';                                                   
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/XA::recovered_transactions';                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/File_query_log::name';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/thd_timer';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/THD::Session_tracker';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/THD::Session_sysvar_resource_manager';                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/show_replica_status_io_gtid_set';                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/write_set_extraction';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/JSON';                                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/log_error::loaded_services';                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/log_error::stack';                                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/log_sink_pfs';                                                        
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/histograms';                                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'memory/sql/hash_join';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/rm_table::foreach_root';                                              
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/rm_db::mdl_reqs_root';                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/client/mysql_options';                                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/client/MYSQL_DATA';                                                       
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/client/MYSQL';                                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/client/MYSQL_RES';                                                        
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/client/MYSQL_ROW';                                                        
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/client/MYSQL_STATE_CHANGE_INFO';                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/client/MYSQL_HANDSHAKE';                                                  
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/vio/ssl_fd';                                                              
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/vio/vio';                                                                 
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/vio/read_buffer';                                                         
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/max_alloca';                                                        
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/charset_file';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/charset_loader';                                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/lf_node';                                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/lf_dynarray';                                                       
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/lf_slist';                                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/LIST';                                                              
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/IO_CACHE';                                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/KEY_CACHE';                                                         
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/SAFE_HASH_ENTRY';                                                   
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/MY_TMPDIR::full_list';                                              
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/MY_BITMAP::bitmap';                                                 
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/my_compress_alloc';                                                 
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/my_err_head';                                                       
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/my_file_info';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/MY_DIR';                                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/DYNAMIC_STRING';                                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysys/TREE';                                                              
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Event_basic::mem_root';                                               
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/root';                                                                
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/load_env_plugins';                                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/MDL_context::acquire_locks';                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Partition::share';                                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Partition::sort_buffer';                                              
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Partition::admin';                                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/refcache/reference_cache_mem';                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/MDL_context::backup_manager';                                         
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/udf_mem';                                                             
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysqld_openssl/openssl_malloc';                                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/plugin_mem_root';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/plugin_init_tmp';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/plugin_int_mem_root';                                                 
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/mysql_plugin_dl';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/mysql_plugin';                                                        
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/plugin_bookmark';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/csv/TINA_SHARE';                                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/csv/blobroot';                                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/csv/tina_set';                                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/csv/row';                                                                 
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/csv/Transparent_file';                                                    
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'memory/innodb/ibuf0ibuf';                                                        
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/myisammrg/MYRG_INFO';                                                     
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/myisammrg/children';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/temptable/physical_disk';                                                 
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/temptable/physical_ram';                                                  
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/archive/FRM';                                                             
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/archive/record_buffer';                                                   
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/blackhole/blackhole_share';                                               
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysqlx/objects';                                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysqlx/recv_buffer';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/mysqlx/send_buffer';                                                      
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/component_sys_vars/component_system_variables';                           
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/tz_storage';                                                          
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/servers_cache';                                                       
UPDATE performance_schema.setup_instruments SET ENABLED= 'NO' WHERE NAME = 'memory/sql/Relay_log_info::mta_coor';                                            
UPDATE performance_schema.setup_instruments SET ENABLED= 'YES' WHERE NAME = 'error';     
调整setup_threads  
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/performance_schema/setup';                    
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/sql/bootstrap';                               
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/sql/manager';                                 
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/sql/main';                                    
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/sql/one_connection';                          
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/sql/signal_handler';                          
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/sql/compress_gtid_table';                     
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/sql/parser_service';                          
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/sql/admin_interface';                         
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/mysys/thread_timer_notifier';                 
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/sql/event_scheduler';                         
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/sql/event_worker';                            
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/log_archiver_thread';                  
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/page_archiver_thread';                 
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/buf_dump_thread';                      
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/clone_ddl_thread';                     
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/clone_gtid_thread';                    
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/ddl_thread';                           
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/dict_stats_thread';                    
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/io_handler_thread';                    
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/io_ibuf_thread';                       
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/io_log_thread';                        
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/io_read_thread';                       
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/io_write_thread';                      
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/buf_resize_thread';                    
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/log_writer_thread';                    
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/log_checkpointer_thread';              
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/log_flusher_thread';                   
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/log_write_notifier_thread';            
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/log_flush_notifier_thread';            
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/recv_writer_thread';                   
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/srv_error_monitor_thread';             
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/srv_lock_timeout_thread';              
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/srv_master_thread';                    
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/srv_monitor_thread';                   
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/srv_purge_thread';                     
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/srv_worker_thread';                    
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/trx_recovery_rollback_thread';         
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/page_flush_thread';                    
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/page_flush_coordinator_thread';        
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/fts_optimize_thread';                  
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/fts_parallel_merge_thread';            
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/fts_parallel_tokenization_thread';     
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/srv_ts_alter_encrypt_thread';          
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/parallel_read_thread';                 
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/innodb/parallel_rseg_init_thread';            
UPDATE setup_threads SET ENABLED = 'YES', history = 'YES' where name = 'thread/innodb/meb::redo_log_archive_consumer_thread';
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/myisam/find_all_keys';                        
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/mysqlx/acceptor_network';                     
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/mysqlx/worker';                               
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/sql/replica_io';                              
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/sql/replica_sql';                             
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/sql/replica_worker';                          
UPDATE setup_threads SET ENABLED = 'NO', history = 'NO' where name = 'thread/sql/replica_monitor';

setup_object  是针对监控项对数据库进行隔离和设置那些对象应该被监控,修改后会立即生效。

insert into performance_schema.setup_objects (object_type,object_schema,object_name,enabled,timed) values ('EVENT','sys','%','NO','NO');
insert into performance_schema.setup_objects (object_type,object_schema,object_name,enabled,timed) values ('TABLE','sys','%','NO','NO');
update performance_schema.setup_objects set ENABLED = 'NO' WHERE OBJECT_TYPE IN ('FUNCTION','PROCEDURE','TRIGGER');

MYSQL 8  上云 performance_schema 里面参数我们打开了那些  5个表调整脚本?(POLARDB 适用)..._mysql_04

setup_consumers 表中给出的是信息的存储的允许的情况,这里暂时针对这个结果暂不调整。                                  

MYSQL 8  上云 performance_schema 里面参数我们打开了那些  5个表调整脚本?(POLARDB 适用)..._mysql_05

  setup_actors  默认支持100行的数据存储,这里主要是针对需要记录的数据进行一个分离,那些数据产生的用户,主机,角色等信息需要被记录。   如果使用的行沾满了,就需要修改配置后,重启服务器后,才能继续配置。

MYSQL 8  上云 performance_schema 里面参数我们打开了那些  5个表调整脚本?(POLARDB 适用)..._mysql_06

同时在修改参数前后,进行了非常不专业的压力测试,修改参数后,本地有略微的查询时间的提升(针对业务数据查询),但不能作为实际参考性的意义,只有借鉴的意义。

在阿里云的POLARDB 中进行对比测试,在打开后不打入参数和打入参数后,进行压力测试,基本上快 0.6 -0.9秒。

基于资源的限制,以上的参数我们准备应用到阿里云的POLARDB,尽量避免资源的消耗,同时或许我们需要的数据。

MYSQL 8  上云 performance_schema 里面参数我们打开了那些  5个表调整脚本?(POLARDB 适用)..._mysql_07

标签:...,SET,NO,setup,ENABLED,上云,UPDATE,个表,schema
From: https://blog.51cto.com/u_14150796/6534897

相关文章

  • 95后Android开发:“我现在是真想躺平...“
    我是真想躺平…说实话,我现在每天上班都很难受,我也不知道为啥反正就很丧,很想当一条咸鱼,就想躺着。最近疫情、裁员…坏消息很多,大环境不好,我本就打算今年换工作的,现在这环境就有点烦…其他行业可能不知道,程序员跳槽最佳的时间就是3-4月,或者9-10月,被称为金三银四和金九银十,但是今年这......
  • MYSQL 8 从PS说起,但不止于PS , 不在使用淘汰的慢查询日志,那我怎么查慢查询(6)...
    这是关于MYSQL8获取信息的方式的第六篇,终于到达了慢日志查询的位置,在MYSQL的DBA的管理员的心目中,pt-query-digest和SLOWQUERYLOG是分析慢查询的唯一的方式。实际上在MYSQL8中这样的慢查询的数据获取方式,已经被淘汰了,或者说不合时宜了。主要的原因是获取信息的时效性的问题......
  • 数据库上云就可以 解雇 DBA ,来说说数据库上云那些 “有意思” 的事情
    随着问问题的同学越来越多,公众号内部私信回答问题已经很困难了,所以建立了一个群,关于各种数据库的问题都可以,目前主要是POSTGRESQL,MYSQL,MONGODB,POLARDB,REDIS等,期待你的加入,另外针对云的问题,我们可以多多交流互相学习————————————————————————正文......
  • 四年Android开发,在拉勾上投了十几个简历,没有一个面试邀请......药丸了
    在浏览某论坛的时候看到一名程序员吐槽:坐标杭州,四年Android开发一枚,技术不顶尖也不算差吧,这边加班太猛了,在考虑换一个岗位。在拉勾上投了十几个简历,全都是不合适,没有一个面试邀请!!!简历在拉勾上是开放的,竟然没有一个感兴趣的公司打电话给我。前年这个时候,接到的电话还是很多的,这才过......
  • 渣硕Android开发找工作都这么难了吗?千万不要轻易离职......
    坐标北京,21年3月毕业工作,北京某大型互联网码农集散基地渣硕背景。第一份工作在北京的一个80人左右规模的小公司做Android,最近刚刚跳槽成功。做Android是从19年中旬开始,毕业前的第一份工作和第二份工作都在规模不超过20人的小团队练级,毕业前本来有计划留杭州,也拿到不少心仪Offer,但是......
  • 程序员的噩梦:接手别人的代码,二次开发...
    故事纯属虚构,如有雷同,纯属雷同开端小吹是一个自由职业的程序员,没有了每个月的固定工资,只能一边开发自己的独立App,一边靠接外包单子来维持生活这样子。他手头上的外包项目已经完结了,正在努力寻找下一个项目。已经闲了一个星期了,小吹心里有点慌。这时候,客户小白找上门来了。小......
  • 终端运行roscore时,报错:Unable to contact my own server at...
    问题现象:问题原因:以上问题是由于ROS环境变量ROS_MASTER_URI设置错误导致的,重新设置该变量即可。解决方法:打开~/.bashrc文件,添加或修改环境变量ROS_HOSTNAME和ROS_MASTER,即改为:exportROS_HOSTNAME=localhostexportROS_MASTER_URI=http://localhost:11311修改并保存~/.......
  • 报错:Failed to execute goal org.codehaus.mojo:........快速解决!
    解决:Failedtoexecutegoalorg.codehaus.mojo:exec-maven-plugin:3.0.0:exec(default-cli)onprojectspring_aop:Commandexecutionfailed.的问题出现如下问题:Failedtoexecutegoalorg.codehaus.mojo:exec-maven-plugin:3.0.0:exec(default-cli)onprojectsprin......
  • do...while循环、for循环、while循环反汇编
    do...while循环、for循环、while循环反汇编do...while循环C代码如下所示:VC6++Debug32位版本#include"stdafx.h"voidFunction(){ inti=0; intsum=0; do { sum+=i; i++; }while(i<100);} intmain(void){ Function();return0;}反汇编如......
  • POSTGRESQL 创建一个表到底有什么说的? 可说的挺多的
    创建一张表,到底有什么说的, 下面是POSTGRESQL创建数据表的官方文档的内容截图. 那我们就往下看,到底我们可以说点什么建表的开头是关于临时表的问题,其中临时表的global和local,在目前的V12的版本中并没有具体的含义,问题1,POSTGRESQL怎么创建一个看似global的temparytab......