My.cnf sobre tuning de Mysql! | DeServ – Info
Lomadee, uma nova espcie na web. A maior plataforma de afiliados da Amrica Latina.

My.cnf sobre tuning de Mysql!

By Flávio Silva

Configuração do arquivo my.cnf (arquivo principal de configuração do Mysql) recomendado para um servidor realmente grande (4 CPUs, 64 bit, 8 Gb de RAM somente para Mysql) em termos de performance e utilização:


#password = [your_password]
port = 3306
socket = /var/lib/mysql/mysql.sock

[mysqld]
#DESCR: 8GB RAM, InnoDB only, ACID, few connections, heavy queries
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
user = mysql
skip-locking
port = 3306
back_log = 50
#log
#log_bin
max_connections = 2048
max_connect_errors = 512
table_cache = 1024
max_allowed_packet = 16M
binlog_cache_size = 1M
max_heap_table_size = 64M
sort_buffer_size = 8M
max_sort_length = 256M
join_buffer_size = 8M
thread_cache_size = 128
thread_concurrency = 20
max_delayed_threads = 40
query_cache_type = 1
query_cache_size = 256M
query_cache_limit = 8M
ft_min_word_len = 4
default_table_type = InnoDB
thread_stack = 192K
transaction_isolation = REPEATABLE-READ
tmp_table_size = 64M
log_slow_queries
long_query_time = 2
log_long_format
tmpdir = /tmp

# Timeouts options
connect_timeout = 360
interactive_timeout = 720
wait_timeout = 720
net_read_timeout = 360
net_retry_count = 10
net_write_timeout = 360
slave_net_timeout = 720

#*** MyISAM Specific options
key_buffer_size = 32M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_max_extra_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover
skip-bdb
#skip-innodb
innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 2G
innodb_data_file_path = ibdata1:10M:autoextend
innodb_data_home_dir = /var/lib/mysql
innodb_file_io_threads = 4
#innodb_force_recovery=1
innodb_thread_concurrency = 8
innodb_flush_log_at_trx_commit = 1
#innodb_log_archive = ON
innodb_log_arch_dir = /var/lib/mysql
#innodb_fast_shutdown
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 3
innodb_log_group_home_dir = /var/lib/mysql
innodb_max_dirty_pages_pct = 90
innodb_flush_method = O_DIRECT
innodb_lock_wait_timeout = 120
innodb_doublewrite = 0
[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Only allow UPDATEs and DELETEs that use keys.
#safe-updates

[isamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M

[myisamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M

[mysqlhotcopy]
interactive-timeout

[mysqld_safe]
open-files-limit = 8192
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

A maioria dos items são bastante auto-explicativos, acho que agora você tem material suficiente para começar seu próprio Mysql-tuning!

Fonte: http://www.hitk.com.br

Nenhum Post Relacionado.

Artigos parecidos fornecidos por Yet Another Related Posts Plugin.

Tags: , , , , , , , , , , , , , , , ,

Deixe uma Resposta