Optimizing MySQL For Speed

I am pretty much a rookie when it comes to server administration. But, I did just make a few changes that the box that runs this, and a few hundred other, sites. It is a dedicated linux box with a P4 processor and a gig of RAM. I just read through this “Optimizing MySQL” tutorial and made the following changes to my /etc/my.cnf file:

NOTE: This is tailored to the capabilities of my box, be sure you read through this stuff before you make any changes to your setup.

key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size = 32M

I then changed to the /usr/local/bin directory and shutdown the mysql daemon with mysqladmin -uroot -p[mypassword] shutdown. Then I restarted her up with ./mysqld_safe &

It is running significantly faster and I will be doing some more tweaking in the near future. Amazing how much of a difference these few changes made.

[tags]Admin, Administration, Linux, MySQL, Server[/tags]

Related posts:

  1. PHP MySQL Backup Script
  2. Clean up .htaccess Files to Speed up WordPress
  3. Recovering Debian Linux
  4. Dos2Unix Web Utility

Leave A Reply (1 comment So Far)