Hompy项目现使用2台数据服务器,主从数据库内存分别为8G和6G。
开始老是down机,以my-huge为基础配了很多次,都不行,
后来,借用了mail.sanook.com的配置,撑了一断时间,还是不理想。
再借用网易(163.com)一个子项目的my.cnf试了一下,几个月没down,先用它撑一下。
注:网易使用的是2G内存的。
共享一下:
# Example MySQL config file for very large systems.
#
# This is for a large system with memory of 1G-2G where the system runs mainly
# MySQL.
#
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is /var/lib/mysql) or
# ~/.my.cnf to set user-specific options.
#
# In this file, you can use all long options that a program supports.
# If you want to know which options a program supports, run the program
# with the "--help" option.
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
skip-innodb
skip-bdb
#back_log=100
back_log=200
#key_buffer=500M
key_buffer=512M
#key_buffer = 384M
#max_allowed_packet = 2M
#max_allowed_packet = 1M
ma