Portal Home > Knowledgebase > Articles Database > my.cnf question


my.cnf question




Posted by Neso, 01-18-2010, 06:24 AM
This is my.cnf on my dedicated server, AMD Quad Core 9600, 6 GB RAM Cpanel/WHM, PHP 5.2.12, Apache 2.2, MySQL 5. My question is do you think that I should change something. #DO NOT MODIFY THE FOLLOWING COMMENTED LINES! #Created with ELS from www.servermonkeys.com #els-build=5.0 [mysqld] local-infile=0 datadir=/var/lib/mysql skip-locking skip-innodb skip-networking safe-show-database query_cache_limit=1M query_cache_size=32M ## 32MB for every 1GB of RAM query_cache_type=1 max_user_connections=256 max_connections=256 interactive_timeout=10 wait_timeout=20 connect_timeout=20 thread_cache_size=128 key_buffer=128M ## 128MB for every 1GB of RAM join_buffer=1M max_connect_errors=20 max_allowed_packet=16M table_cache=1024 record_buffer=1M sort_buffer_size=1M ## 1MB for every 1GB of RAM read_buffer_size=1M ## 1MB for every 1GB of RAM read_rnd_buffer_size=1M ## 1MB for every 1GB of RAM thread_concurrency=8 ## Number of CPUs x 2 myisam_sort_buffer_size=64M server-id=1 collation-server=latin1_general_ci #log_slow_queries=/var/log/mysql-slow.log #long_query_time=1 #log-queries-not-using-indexes [mysql.server] user=mysql [safe_mysqld] err-log=/var/log/mysqld.log pid-file=/var/lib/mysql/mysql.pid open_files_limit=8192 [mysqldump] quick max_allowed_packet=16M [mysql] no-auto-rehash #safe-updates [isamchk] key_buffer=64M sort_buffer=64M read_buffer=16M write_buffer=16M [myisamchk] key_buffer=64M sort_buffer=64M read_buffer=16M write_buffer=16M [mysqlhotcopy] interactive-timeout

Posted by madaboutlinux, 01-18-2010, 06:54 AM
Remove the following from my.cnf skip-innodb innodb tables won't work if you turn off innodb on your server. skip-networking Only if any client is accessing databases on stored on your server from a remote server. Change the following: max_user_connections Set it to 20-30 if you are planning to host hundreds of websites. If you are hosting a couple of websites then the current value is fine. wait_timeout it defines the number of seconds a mysql thread waits in idle state. If it is set to too low and if your queries has delays in executing, then Mysql will keep dropping the connection. I would recommend it to set to a higher value. Rest looks good. Don't forget to restart the mysql service once you make the changes.

Posted by fabin, 01-18-2010, 07:36 AM
The configuration looks like one which is optimized by els els uses a generic template. Try using a mysql tuner to get suggestions more suitable for your server.

Posted by shawn_linux, 01-18-2010, 10:57 AM
The current one looks good ..if any issues you just need to optimize the mysql-cache and the number of connection which will do.

Posted by bvsonline, 01-19-2010, 02:28 PM
If you still have problems, there are numerous mysql optimizer scripts available. Just google it and download one into your server and execute. Please note that it can give about accurate results if the mysql is running for the past 48 hours.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
VShost vs Sultanhost (Views: 471)
Server slowing down (Views: 493)