upupw的mysql主机配置文件优化my.ini
0级别
port=3306
default-character-set=utf8
port=3306
server_id=1
character-set-server=utf8
default-storage-engine=MYISAM
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
slow_query_log=0
long_query_time=2
local-infile=0
skip-external-locking
#skip-innodb
#log-bin=mysql-bin
#binlog_format=mixed
max_connections=500
key_buffer_size=32M
sort_buffer_size=128kb
read_buffer_size=256kb
join_buffer_size=1M
read_rnd_buffer_size=1M
max_allowed_packet=16M
table_open_cache=128
tmp_table_size=32M
max_heap_table_size=32M
thread_cache_size=16
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=8M
innodb_buffer_pool_size=32M
innodb_log_file_size=8M
innodb_log_buffer_size=1M
innodb_file_per_table=1
innodb_flush_log_at_trx_commit=1
innodb_thread_concurrency=0
innodb_lock_wait_timeout=50
quick
max_allowed_packet=16M
no-auto-rehash
key_buffer_size=10M
sort_buffer_size=10M
read_buffer=1M
write_buffer=1M
interactive-timeout
open-files-limit=8192
1级别
port=3306
default-character-set=utf8
port=3306
server_id=1
character-set-server=utf8
default-storage-engine=MYISAM
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
slow_query_log=0
long_query_time=2
local-infile=0
skip-external-locking
#skip-innodb
#log-bin=mysql-bin
#binlog_format=mixed
max_connections=1000
key_buffer_size=64M
sort_buffer_size=256kb
read_buffer_size=512kb
join_buffer_size=2M
read_rnd_buffer_size=2M
max_allowed_packet=16M
table_open_cache=256
tmp_table_size=64M
max_heap_table_size=64M
thread_cache_size=16
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=32M
innodb_buffer_pool_size=64M
innodb_log_file_size=16M
innodb_log_buffer_size=2M
innodb_file_per_table=1
innodb_flush_log_at_trx_commit=1
innodb_thread_concurrency=0
innodb_lock_wait_timeout=50
quick
max_allowed_packet=16M
no-auto-rehash
key_buffer_size=20M
sort_buffer_size=20M
read_buffer=2M
write_buffer=2M
interactive-timeout
open-files-limit=8192
2级别
port=3306
default-character-set=utf8
port=3306
server_id=1
character-set-server=utf8
default-storage-engine=INNODB
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
slow_query_log=0
long_query_time=2
local-infile=0
skip-external-locking
#log-bin=mysql-bin
#binlog_format=mixed
max_connections=2000
key_buffer_size=256M
sort_buffer_size=1M
read_buffer_size=2M
join_buffer_size=4M
read_rnd_buffer_size=4M
max_allowed_packet=32M
table_open_cache=512
tmp_table_size=128M
max_heap_table_size=128M
thread_cache_size=16
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=64M
innodb_buffer_pool_size=256M
innodb_log_file_size=64M
innodb_log_buffer_size=8M
innodb_file_per_table=1
innodb_flush_log_at_trx_commit=1
innodb_thread_concurrency=0
innodb_lock_wait_timeout=50
quick
max_allowed_packet=16M
no-auto-rehash
key_buffer_size=40M
sort_buffer_size=40M
read_buffer=4M
write_buffer=4M
interactive-timeout
open-files-limit=8192
3级别
port=3306
default-character-set=utf8
port=3306
server_id=1
character-set-server=utf8
default-storage-engine=INNODB
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
slow_query_log=0
long_query_time=2
local-infile=0
skip-external-locking
#log-bin=mysql-bin
#binlog_format=mixed
max_connections=3000
key_buffer_size=512M
sort_buffer_size=1M
read_buffer_size=4M
join_buffer_size=8M
read_rnd_buffer_size=8M
max_allowed_packet=64M
table_open_cache=1024
tmp_table_size=256M
max_heap_table_size=256M
thread_cache_size=16
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=128M
innodb_buffer_pool_size=512M
innodb_log_file_size=128M
innodb_log_buffer_size=16M
innodb_file_per_table=1
innodb_flush_log_at_trx_commit=1
innodb_thread_concurrency=0
innodb_lock_wait_timeout=50
quick
max_allowed_packet=16M
no-auto-rehash
key_buffer_size=80M
sort_buffer_size=80M
read_buffer=8M
write_buffer=8M
interactive-timeout
open-files-limit=8192
一般来说table_open_cache 是最终影响CPU性能的,可以适当调大,比如说2048,值越大时内存使用量越高
页:
[1]