Today's Most Popular

Recent Comments

Incoming Search Referrals

Posts Recently Commented

Real Estate Investing and Finance

News

Politics

Linux How To

The Tech Blog




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

One Response to “Optimizing MySQL For Speed”

  1. RomiSatriaWahono.Net » Optimisasi Wordpress di Server Traffic Tinggi Says:

    […] http://www.golod.com/2007/01/optimizing-mysql-for-speed/ […]

Leave a Reply