Tuesday, July 20, 2010

mysql optimization

so I had a mysql server that was getting a bit weighed down and needed a touch more performance customization than the default my.cnf provided for. So here's the fun, it seems pretty snappy and efficient so far, but over the next few days we'll see if anything explodes:

thread_concurrency=16
thread_cache_size=8

query_cache_type=1
query_cache_limit=3M
query_cache_size=128M

tmp_table_size=256M
max_heap_table_size=256M

read_rnd_buffer_size=3M

max_connections=100
key_buffer_size=512M
max_allowed_packet=32M
table_cache=512
sort_buffer_size=3M
read_buffer_size=3M
join_buffer_size=3M

figures are based on just over 2GB optimal memory usage by mysql, and a system with 8 processing cores.

This script helped alot: http://mysqltuner.pl

0 comments:

Post a Comment