• 欢迎访问magento4you博客,我们提供magento建站、技术咨询、IT运维、支持培训、二次开发服务及模板定制,联系QQ:283475615
  • Magento入门教程 二次开发 模板定制 联系QQ:283475615
  • magento运营 SEO SEM 数字营销 广告竞价 联系QQ:283475615
  • 如果您觉得本站对你有帮助,那么赶紧使用Ctrl+D 收藏吧!

Mysql性能优化配置参考

Magento网站加速 magento4you 4年前 (2017-04-01) 1017次浏览



#内存
innodb_use_sys_malloc=on
large_pages=off
join_bugger_size = 16MB
join_buffer_size = 16MB
sort_buffer_size = 16MB
max_prepared_stmt_count=500000

max_heap_table_size = 16MB
tmp_table_size = 512MB

# innodb
innodb_file_per_table = 1
innodb_buffer_pool_size = 54GB
innodb_buffer_pool_instances = 8

innodb_data_file_path = ibdata1:512M:autoextend
innodb_undo_directory = /data1/mysql/3306/data
innodb_undo_tablespaces = 4
innodb_undo_logs = 128

innodb_log_file_size = 2048MB
innodb_log_files_in_group = 2

innodb_stats_on_metadata = OFF
innodb_fast_shutdown = 1
innodb_open_files = 20000
innodb_sync_array_size = 800
innodb_io_capacity = 20000
innodb_purge_threads = 2
innodb_write_io_threads = 6
innodb_read_io_threads = 22
innodb_flush_method = O_DIRECT
innodb_sync_spin_loops = 0
innodb_spin_wait_delay = 0
innodb_flush_neighbors = 0

#performance_schema=OFF

host_cache_size = 1024
performance_schema_hosts_size = 1024

 

 

[mysql]
Port == 3306
Socket = data1/mysql/3306/data/mysql.sock
#innodb_use_native_aio=1
#character_set_server=utf8
#character_set_client=utf8

[mysqld]
#bind-address = 10.47.20.4
innodb_use_native_aio=1

datadir= /data1/mysql/3306/data/

#其他
query_cache_size = 0
query_cache_type = 0
Default-storage-engine  =innodb
default_tmp_storrage_engine  - innodb
character_set_server=uft8
character_set_client=utf8

#网络
back_log =  500
max_connections  = 8000
max_connect_errors  = 10000000000
net_buffer_length  =  1MB
max_allowed_packet  = 1GB
thread_cache_size. = 500
interactive_timeout =  300
wait_timeout   = 300

open_files_limit =  20000
table_definition_cache = -1
table_open_cache   = 20000
table_open_cache_instances = 10


Port  = 3306
Socket  = /data1/mysql/3306/data/mysql.sock
Pid. = /data1/mysql/3306/data/mysql.pid
Tmpdir = /data1/mysql/3306/data/
plugin_dir = /usr/local/webserver/mysql5.6.17/plugin

 


极客公园 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:Mysql性能优化配置参考
喜欢 (0)