|
本帖最后由 cst4you 于 2012-11-13 01:10 编辑
对了分享下我们的mysql设置
可以根据你的内存适当减少一点- interactive_timeout = 30
- wait_timeout = 60
- connect_timeout = 60
- ft_min_word_len=2
- default-storage-engine=MyISAM
- skip-innodb
- ;skip-locking
- skip-name-resolve
- low-priority-updates
- key_buffer_size = 192M
- sort_buffer_size = 6M
- read_buffer_size = 4M
- read_rnd_buffer_size = 4M
- join_buffer_size = 3M
- table_cache = 2560
- table_definition_cache = 512
- max_connections = 500
- max_join_size = 4294967295
- myisam_sort_buffer_size = 4M
- thread_cache = 32
- thread_cache_size = 256
- query_cache_limit= 8M
- query_cache_size = 128M
- query_cache_type = 1
- max_connect_errors= 50
- max_allowed_packet= 16M
- tmp_table_size = 384M
- net_buffer_length = 32768
复制代码 1.3G内存下 日pv 40万的wordpress 负载从来不过2的
php-fpm进程32个
当然中间有memcache, 没有就是死路一条
在这里再次说一下, 一键包根本不适合高压力的环境, 某个的一键包, 默认的php-fpm才两个, 轻易就堵死了...这是喂猫呢?
不要再省内存了! 正常生产环境基本上内存是快吃满的, 别以为省那么点内存就以为好, 这不是windows啊亲
再来个现在的free情况- total used free shared buffers cached
- Mem: 1362 1318 43 0 20 350
- -/+ buffers/cache: 947 414
- Swap: 511 208 303
复制代码 |
评分
-
查看全部评分
|