Optimizing MySQL For Speed
January 2nd, 2007 - One CommentI 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]







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