Magento 1.7 my.cnf优化

时间:2013-06-25 11:59:21

标签: mysql performance magento magento-1.7 pagespeed

我目前正在云服务器上运行,使用ukfast

CPU GenuineIntel,Intel(R)Xeon(R)CPU E5-2620 0 @ 2.00GHz 版本Parallels Plesk Panel v11.0.9_build110120608.16 os_CentOS 6 OS CentOS 6.3(最终版)64位 内存:6GB

我有12,000个SKU,但网站上一直没有超过30个游客,我正在尝试优化my.cnf文件:

这就是我目前所拥有的:

log_slow_queries = /var/log/mysql-slow.log
long_query_time = 5


key_buffer = 32M
max_allowed_packet = 16M
table_cache = 1024
sort_buffer_size = 48M
read_buffer_size = 92M
read_rnd_buffer_size = 100M
myisam_sort_buffer_size = 100M
myisam_max_sort_file_size = 1G
myisam_max_extra_sort_file_size = 1G
myisam_repair_threads = 1
thread_cache_size = 32
query_cache_type = 1
query_cache_size = 200M
query_cache_limit = 2M
max_connections=50
wait_timeout=120
tmp_table_size = 256M
max_heap_table_size = 64M
innodb_buffer_pool_size = 650M
innodb_additional_mem_pool_size = 24M 

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid}

我有什么遗漏或任何我应该增加或减少的东西吗?

任何想法/建议都会很棒。

1 个答案:

答案 0 :(得分:1)

我以前遇到过这个问题。 请试试这个

key_buffer = 32M
max_allowed_packet = 16M
table_cache = 1024
sort_buffer_size = 48M
read_buffer_size = 92M
read_rnd_buffer_size = 104M
myisam_sort_buffer_size = 100M
myisam_max_sort_file_size = 1024m
myisam_max_extra_sort_file_size = 1024m
myisam_repair_threads = 1
thread_cache_size = 32
query_cache_type = 1
query_cache_size = 256M
query_cache_limit = 2M
max_connections=50
wait_timeout=60
tmp_table_size = 256M
max_heap_table_size = 64M
innodb_buffer_pool_size = 650M
innodb_additional_mem_pool_size = 24M 

或者您必须将主机更改或升级到VPS服务器。 Houp这个帮助。 ^ ^