A real production my.cnf file for MySQL Server
This is a copy of the mysql config files ( /etc/my.cnf ) I use for my production servers, this same configuration has been tested on a high traffic site, a forum server on vbulletin php software with over 1.2 million posts and over 2,000 concurrent users 24 hours a day. Also ive used this same configuration on another production server that manages over 15 high traffic and high data volume mysql databases.
I hope it helps, please notice this has been tested on MySQL server versions 4 and up.
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
skip-innodb
max_connections = 500
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 64
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1[mysqld_safe]
err-log=/var/log/mysqld.log
open_files_limit = 8192[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M[mysql.server]
user=mysql
Tags: buffer_size, cache_size, cnf, concurrent_users, config_files, data_volume, forum_server, ive, lib, mysqldump, mysql_databases, mysql_server, php_software, production_server, production_servers, server_versions, timeout, traffic





Source Tips - the world of Information Technology on 31 Jan 2007 at 4:44 pm #
This is a copy of the mysql config files ( /etc/my.cnf ) I use for my production servers, this same configuration has been tested on a high traffic site, a forum server on vbulletin php software with over 1.2 million posts and over 2,000 concurrent users 24 hours a day. Also ive used this same configuration on another production server
Urban Clothing on 14 Apr 2008 at 6:46 pm #
I used this on my MySQL server and it reduced CPU load considerably. Thank you.
Raja Sethuraman on 17 Feb 2009 at 3:06 pm #
Jason
can you tell me approx. how much of RAM is required to set the above setting in my database?
Jason on 18 Feb 2009 at 9:36 am #
2-4 gb ram