本帖最后由 886 于 2022-3-1 01:27 编辑
求各位师傅指点一二,下面配置是我自己互联网做了点功课后胡乱设置的,先谢谢。 数据库读写很频繁,Mysql 数据表单个表就有15GB左右。 Mysql专用服务器,CPU 56线程,64GB内存
- default_storage_engine = InnoDB
- performance_schema_max_table_instances = 400
- table_definition_cache = 400
- skip-external-locking
- key_buffer_size = 10240M
- max_allowed_packet = 100G
- table_open_cache = 4096
- sort_buffer_size = 128M
- net_buffer_length = 4K
- read_buffer_size = 128M
- read_rnd_buffer_size = 128M
- myisam_sort_buffer_size = 512M
- thread_cache_size = 512
- query_cache_size = 2048M
- tmp_table_size = 512M
- max_connections = 16000
- max_connect_errors = 100
- open_files_limit = 65535
- expire_logs_days = 10
- slow_query_log=1
- long_query_time=3
- innodb_buffer_pool_size = 55296M
- innodb_log_file_size = 8192M
- innodb_log_buffer_size = 512M
- innodb_flush_log_at_trx_commit = 1
- innodb_lock_wait_timeout = 50
- innodb_max_dirty_pages_pct = 90
- innodb_read_io_threads = 56
- innodb_write_io_threads = 56
复制代码
|