Thursday, 29 July 2010
HomeLinuxTweaking MySQL for low memory usage
 

January 3rd 2009

Tweaking MySQL for low memory usage

I’m running MySQL on a VPS with limited memory and found the following settings gave slightly better performance. Edit /etc/mysql/my.cnf and change the settings as shown below. The old settings I’ve got are the default ones used by Ubuntu 8.04.

key_buffer		= 16M
max_allowed_packet	= 16M
thread_stack		= 128K
table_cache             = 64
key_buffer		= 16k
max_allowed_packet	= 1M
thread_stack		= 64k
table_cache             = 4
Old Settings New Settings

One Response to “Tweaking MySQL for low memory usage”

  1. JS says:

    Thanks man!

Leave a Reply