Tunning my.cnf

By 6 de julio de 2009 MySQL No Comments

Un ejemplo más de los mil que puedes encontrar en la red para darle un poco de vitaminas a tu servidor MySQL.

[mysqld]
datadir=/var/lib/mysql
safe-show-database
old_passwords
back_log = 15
skip-innodb
max_connections = 200
key_buffer = 256M
myisam_sort_buffer_size = 128M
join_buffer_size = 1M
read_buffer_size = 16M
sort_buffer_size = 32M
table_cache = 2048
thread_cache_size = 784
wait_timeout = 15
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 8M
max_connect_errors = 10
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M
query_cache_limit = 2M
query_cache_size = 712M
query_cache_type = 1
query_prealloc_size = 163840
query_alloc_block_size = 32768
default-storage-engine = MyISAM

[mysqld_safe]
# err-log=/var/log/mysqld.log
# pid-file=/var/lib/mysql/mysql.pid
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

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

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

Para comprobar que no se te descalabra el server echa un vistazo con estás tres instrucciones:

ps aux | grep -c mysql
ps aux | grep -c httpd
free -m

Si no tira mucho o nada de SWAP es que vamos bien 😉

ps aux | grep -c mysql
94

ps aux | grep -c httpd
98

free -m
total used free shared buffers cached
Mem: 2020 1357 662 0 128 770
-/+ buffers/cache: 458 1562
Swap: 0 0 0

ソルサン。

Leave a Reply

Your email address will not be published.