mysql etc_mysql /etc/my.cnf

[client]

port=3306

socket = /tmp/mysql.sock

default-character-set=utf8

[mysqld]

# 1 general config

port=3306

socket = /tmp/mysql.sock

datadir = /u02/mysql

binlog_cache_size = 1M

default-storage-engine = innodb

event_scheduler = 1

federated

join_buffer_size = 16M

local-infile=1

#log-slow-queries=/u02/mysql/aslowquery.log

long_query_time = 10

slow_query_log

lower_case_table_names=1

max_heap_table_size = 256M

max_length_for_sort_data = 2048

open-files-limit = 16384

#mem 16G-32G 1 64G-512G 2

query_cache_size = 32M

query_cache_type= 1

skip-name-resolve

#table_cache=1024

thread_cache=1024

thread_cache_size = 1024

thread_stack = 256K

tmp_table_size = 512M

sort_buffer_size = 32M

large-pages=1

# 2 network config

back_log = 1000

max_connect_errors = 500

max_connections = 10000

max_user_connections=10000

max_delayed_threads = 200

max_prepared_stmt_count = 65528

max_allowed_packet = 256M

net_read_timeout = 36000

net_write_timeout = 36000

wait_timeout = 43200

# 3 myisam config

#myisam insert select,insert values,load data infile perf 16G 1,32G 2 64G-512G 4

bulk_insert_buffer_size = 128M

concurrent_insert=2

#use myisam fulltext only

ft_min_word_len = 4

#60% mem 1/3,other 2/3 innodb_buffer_pool_size

key_buffer_size = 512M

#low-priority-updates=1

max_write_lock_count=1

myisam_max_sort_file_size = 1G

myisam_recover

myisam_repair_threads = 1

#myisam perf 16G 1 32G-512G 2

myisam_sort_buffer_size = 256M

read_buffer_size = 32M

read_rnd_buffer_size = 32M

skip-external-locking

# 4 innodb config

innodb_file_per_table

innodb_additional_mem_pool_size = 16M

#60% mem 2/3, other 1/3 myisam key_buffer_size

innodb_buffer_pool_size = 256M

innodb_data_file_path = ibdata1:1000M:autoextend

innodb_flush_log_at_trx_commit = 0

innodb_lock_wait_timeout = 120

innodb_log_buffer_size = 8M

innodb_log_file_size = 256M

innodb_log_files_in_group = 3

innodb_max_dirty_pages_pct = 90

innodb_read_io_threads = 8

innodb_thread_concurrency = 16

innodb_write_io_threads = 8

innodb_data_home_dir = /u02/mysql

innodb_log_group_home_dir = /u02/mysql

innodb_old_blocks_time=1000

#Only FIO Disk

innodb_flush_method = O_DIRECT

# 5 replication config

expire_logs_days = 7

#log-slave-updates

slave-skip-errors = all

slave_net_timeout = 36000

server-id = 105240

replicate_wild_do_table=wms.%

replicate_wild_ignore_table=mysql.%

log-bin=mysql-bin

log-slave-updates

[mysql]

no-auto-rehash

[mysqldump]

quick

max_allowed_packet = 128M

[myisamchk]

key_buffer = 4096M

sort_buffer_size = 512M

read_buffer = 8M

write_buffer = 8M

[mysqlhotcopy]

interactive-timeout

[mysqld_safe]

malloc-lib=tcmalloc

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值