mysql 主库优化参数(亲自测试)测试环境为内存128G左右;版本5.5.3
2012-12-13 15:56
330 查看
[client]
port = 3306
socket = /tmp/mysql.sock
character-set=utf8
[mysqld]
port = 3306
socket = /tmp/mysql.sock
datadir=/opt/mysql_data
skip-name-resolve
character-set-server=utf8
lower_case_table_names=1
expire-logs-days=60
back_log = 500
max_connections = 5000
max_connect_errors =100000
table_open_cache = 2048
max_allowed_packet = 16M
binlog_cache_size = 1M
max_heap_table_size = 64M
sort_buffer_size = 8M
join_buffer_size = 8M
thread_cache_size = 8
query_cache_size = 64M
query_cache_limit = 2M
ft_min_word_len = 4
thread_stack = 192K
transaction_isolation = REPEATABLE-READ
tmp_table_size = 64M
log-bin=/opt/mysql_log/mysql-bin
binlog_format=mixed
slow_query_log_file=/opt/mysql_slow/localhost-slow.log
slow_query_log
long_query_time=1
#log-queries-not-using-indexes
#tmpdir = /tmp
relay-log=/opt/mysql_log/relay-bin
# *** Replication related settings
server-id = 101
#replicate-ignore-db=mysql
#replicate-ignore-db=test
key_buffer_size = 32M
myisam_repair_threads = 1
myisam_recover
# *** INNODB Specific options ***
#default_table_type = InnoDB
innodb_buffer_pool_size = 64G
innodb_data_file_path = ibdata1:10M:autoextend
innodb_file_per_table=1
innodb_file_io_threads = 4
#innodb_force_recovery=1
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 6
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_flush_method=O_DIRECT
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
#safe-updates
[myisamchk]
key_buffer_size = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
open-files-limit = 65535
log-error=/opt/mysql_log/error.log
pid-file=/opt/mysql_data/mysql.pid
port = 3306
socket = /tmp/mysql.sock
character-set=utf8
[mysqld]
port = 3306
socket = /tmp/mysql.sock
datadir=/opt/mysql_data
skip-name-resolve
character-set-server=utf8
lower_case_table_names=1
expire-logs-days=60
back_log = 500
max_connections = 5000
max_connect_errors =100000
table_open_cache = 2048
max_allowed_packet = 16M
binlog_cache_size = 1M
max_heap_table_size = 64M
sort_buffer_size = 8M
join_buffer_size = 8M
thread_cache_size = 8
query_cache_size = 64M
query_cache_limit = 2M
ft_min_word_len = 4
thread_stack = 192K
transaction_isolation = REPEATABLE-READ
tmp_table_size = 64M
log-bin=/opt/mysql_log/mysql-bin
binlog_format=mixed
slow_query_log_file=/opt/mysql_slow/localhost-slow.log
slow_query_log
long_query_time=1
#log-queries-not-using-indexes
#tmpdir = /tmp
relay-log=/opt/mysql_log/relay-bin
# *** Replication related settings
server-id = 101
#replicate-ignore-db=mysql
#replicate-ignore-db=test
key_buffer_size = 32M
myisam_repair_threads = 1
myisam_recover
# *** INNODB Specific options ***
#default_table_type = InnoDB
innodb_buffer_pool_size = 64G
innodb_data_file_path = ibdata1:10M:autoextend
innodb_file_per_table=1
innodb_file_io_threads = 4
#innodb_force_recovery=1
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 6
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_flush_method=O_DIRECT
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
#safe-updates
[myisamchk]
key_buffer_size = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
open-files-limit = 65535
log-error=/opt/mysql_log/error.log
pid-file=/opt/mysql_data/mysql.pid
相关文章推荐
- linux、mysql、nginx、tomcat 环境下压力测试的主要调试参数
- linux中mysql、nginx、tomcat 环境下压力测试的主要调试参数
- MySQL5.5以上版本优化参数
- 【MySql性能优化一】性能测试环境配置和慢查询日志的使用
- 阿里云 1G内存云主机mysql 配置参数优化
- MySQL内存及虚拟内存优化设置参数
- MySQL内存及虚拟内存优化设置参数
- 测试环境mysql参数max_allowed_packet自动更改的问题排查过程
- Mac下一键安装Apache/Nginx+MySQL+PHP开发环境 及各版本测试PHP探针
- mysql内存和IO优化一些重要参数
- MySQL配置文件my.cnf优化详解,注意MySQL 5.5版本和其他前版本有些不一样的参数
- MySQL 内存和CPU优化相关的参数
- linux、mysql、nginx、tomcat 环境下压力测试的主要调试参数
- MySQL my.cnf参数配置优化详解
- 【云和恩墨】性能优化:Linux环境下合理配置大内存页(HugePage)
- Git 命令参数及用法详解 & Linux编程环境下版本控制 Git使用
- (六) MYSQL性能优化 压力测试工具(ab.exe)
- CentOS LAMP环境搭建和测试php与mysql的连接
- mysql参数配置优化
- MySQL配置文件my.cnf参数优化和中文详解