mysql server tuning

VPS with 726M ram

—- starting my.cnf —

[safe_mysqld]
err-log=/var/lib/mysql/mysqld.log

[mysqld]
skip-networking
skip-innodb
skip-locking

log-slow-queries
long_query_time=3

#log-bin=fmrbinlog
#binlog-do-db=fmr_fmr

key_buffer = 128M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 16M
thread_concurrency = 2

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

—- ending my.cnf —-Â

Note: key_buffer and table_cache are shared by all connections; read_buffer is for each thread.

further adjusted key_buffer down to 128M based on the tuning-primer.sh recommendation.

show some settings:

mysql>show variables;

mysql>show status;

This entry was posted in mysql. Bookmark the permalink.