程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> 關於MYSQL數據庫 >> 完美時空國內游戲服務器的mysql優化

完美時空國內游戲服務器的mysql優化

編輯:關於MYSQL數據庫

內存 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

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved