mysql小内存配置文件优化建议


512m-my.ini
[mysqld]
basedir=C:/APMServ5.2.6/MySQL5.1
datadir=C:/APMServ5.2.6/MySQL5.1/data
port=3306
key_buffer=64M
max_allowed_packet=1M
table_cache=256
thread_cache=16
join_buffer_size=4M
sort_buffer=4M
record_buffer=4M
max_connections=500
wait_timeout=120
interactive_timeout=120
max_connect_errors=6000
long_query_time=1
max_heap_table_size=32M
tmp_table_size=16M
thread_concurrency=8
myisam_sort_buffer_size=16M

1g-my.ini
[mysqld]
basedir=C:/APMServ5.2.6/MySQL5.1
datadir=C:/APMServ5.2.6/MySQL5.1/data
port=3306
key_buffer=256M
max_allowed_packet=2M
table_cache=512
thread_cache=32
join_buffer_size=16M
sort_buffer=16M
record_buffer=16M
max_connections=500
wait_timeout=120
interactive_timeout=120
max_connect_errors=30000
long_query_time=1
max_heap_table_size=128M
tmp_table_size=64M
thread_concurrency=8
myisam_sort_buffer_size=64M

2g-my.ini
[mysqld]
basedir=C:/APMServ5.2.6/MySQL5.1
datadir=C:/APMServ5.2.6/MySQL5.1/data
port=3306
key_buffer=384M
max_allowed_packet=4M
table_cache=1024
thread_cache=64
join_buffer_size=32M
sort_buffer=32M
record_buffer=32M
max_connections=500
wait_timeout=120
interactive_timeout=120
max_connect_errors=30000
long_query_time=1
max_heap_table_size=256M
tmp_table_size=128M
thread_concurrency=8
myisam_sort_buffer_size=128M

4g-my.ini
[mysqld]
basedir=C:/APMServ5.2.6/MySQL5.1
datadir=C:/APMServ5.2.6/MySQL5.1/data
port=3306
key_buffer=512M
max_allowed_packet=8M
table_cache=2048
thread_cache=128
join_buffer_size=64M
sort_buffer=64M
record_buffer=64M
max_connections=500
wait_timeout=120
interactive_timeout=120
max_connect_errors=30000
long_query_time=1
max_heap_table_size=256M
tmp_table_size=128M
thread_concurrency=8
myisam_sort_buffer_size=128M


文章作者: 三月天
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 三月天 !
评论
  目录