Linux | c&cpp | Email | github | QQ群:425043908 关注本站

itarticle.cc

您现在的位置是:网站首页 -> 数据库 文章内容

游戏服务器的mysql优化 -itarticl.cc-IT技术类文章记录&分享

发布时间: 9年前数据库 121人已围观返回

内存 8G

[client]

port = 3306

socket = /home/mysql/mysql.sock

[mysqld]

port = 3306

socket = /home/mysql/mysql.sock

datadir = /home/mysql/var

server-id = 1

log-bin = /data/mysqllog/binlog/mysql-bin

skip-name-resolve

default-character-set = utf8

back_log = 50

max_connections = 1000

max_connect_errors = 32

max_allowed_packet = 16M

table_cache = 2048

binlog_cache_size = 1M

max_heap_table_size = 64M

tmp_table_size = 64M

key_buffer_size = 32M

read_buffer_size = 2M

read_rnd_buffer_size = 16M

bulk_insert_buffer_size = 64M

sort_buffer_size = 8M

join_buffer_size = 8M

thread_cache_size = 8

thread_concurrency = 8

thread_stack = 192K

query_cache_size = 64M

query_cache_limit = 2M

tmp_table_size = 64M

ft_min_word_len = 2

default_table_type = INNODB

transaction_isolation = REPEATABLE-READ

log_slow_queries

long_query_time = 2

log_long_format

myisam_sort_buffer_size = 128M

myisam_max_sort_file_size = 10G

myisam_max_extra_sort_file_size = 10G

myisam_repair_threads = 1

myisam_recover

innodb_additional_mem_pool_size = 16M

innodb_buffer_pool_size = 2G

innodb_data_file_path = ibdata1:2048M;ibdata2:2048M;ibdata3:2048M;ibdata4:2048M;ibdata5:2048M;ibdata6:1024M:autoextend

innodb_file_io_threads = 4

innodb_thread_concurrency = 16

innodb_flush_log_at_trx_commit = 1

innodb_log_buffer_size = 8M

innodb_log_file_size = 256M

innodb_log_files_in_group = 3

innodb_max_dirty_pages_pct = 90

innodb_lock_wait_timeout = 120

[mysqldump]

quick

max_allowed_packet = 16M

[mysql]

no-auto-rehash

[isamchk]

key_buffer = 512M

sort_buffer_size = 512M

read_buffer = 8M

write_buffer = 8M

[myisamchk]

key_buffer = 512M

sort_buffer_size = 512M

read_buffer = 8M

write_buffer = 8M

[mysqlhotcopy]

interactive-timeout

[mysqld_safe]

open-files-limit = 8192

发布时间: 9年前数据库121人已围观返回回到顶端

很赞哦! (1)

文章评论

  • 请先说点什么
    热门评论
    120人参与,0条评论

站点信息

  • 建站时间:2016-04-01
  • 文章统计:728条
  • 文章评论:82条
  • QQ群二维码:扫描二维码,互相交流