Sekedar Documentasi untuk Pelupa

Tuning MySQL with Huge MySQL version me


Jika sebuah server mempunyai melakukan load database dalam jumlah besar dan padat maka konfigurasi berikut dapat d pakai :


[client]
port        = 3306
socket        = /var/run/mysqld/mysqld.sock


[mysqld_safe]
socket        = /var/run/mysqld/mysqld.sock
nice        = 0
nice = -5
open_files_limit = 8192

[mysqld]

user        = mysql
pid-file    = /var/run/mysqld/mysqld.pid
socket        = /var/run/mysqld/mysqld.sock
port        = 3306
basedir        = /usr
datadir        = /var/lib/mysql
tmpdir        = /tmp
language    = /usr/share/mysql/english
skip-external-locking

#bind-address        = 127.0.0.1

# * Fine Tuning | by ariecc

back_log = 75
skip-innodb
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
skip-name-resolve
key_buffer        = 384M
max_allowed_packet    = 16M
thread_stack        = 128K
thread_cache_size    = 8
myisam-recover        = BACKUP
max_connections        = 500
table_cache            = 1800
thread_cache_size = 384
wait_timeout = 7200
connect_timeout = 10
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 64M
max_connect_errors = 1000
read_rnd_buffer_size = 524288
bulk_insert_buffer_size = 8M

#thread_concurrency     = 10

# * Query Cache Configuration
query_cache_limit       = 4M
query_cache_size        = 128M
query_cache_type = 1
query_prealloc_size = 65536
query_alloc_block_size = 131072
default-storage-engine = MyISAM

# * Logging and Replication
#log        = /var/log/mysql/mysql.log

# Error logging goes to syslog. This is a Debian improvement :)
# Here you can see queries with especially long duration
#log_slow_queries    = /var/log/mysql/mysql-slow.log
#long_query_time = 2
#log-queries-not-using-indexes


server-id        = 1
log_bin            = /var/log/mysql/mysql-bin.log
expire_logs_days    = 10
max_binlog_size         = 1000M
#binlog_do_db        = include_database_name
binlog_ignore_db    = mysql,information_schema

# * BerkeleyDB
# Using BerkeleyDB is now discouraged as its support will cease in 5.1.12.
skip-bdb

# * InnoDB
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.
# Read the manual for more InnoDB related options. There are many!
# You might want to disable InnoDB to shrink the mysqld process by circa 100MB.
#skip-innodb

# * Security Features

# Read the manual, too, if you want chroot!
# chroot = /var/lib/mysql/

# For generating SSL certificates I recommend the OpenSSL GUI "tinyca".

# ssl-ca=/etc/mysql/cacert.pem
# ssl-cert=/etc/mysql/server-cert.pem
# ssl-key=/etc/mysql/server-key.pem



[mysqldump]
quick
#quote-names
max_allowed_packet    = 16M

[mysql]
#no-auto-rehash

[isamchk]
key_buffer        = 16M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M

# * NDB Cluster
# [MYSQL_CLUSTER]
# ndb-connectstring=127.0.0.1


!includedir /etc/mysql/conf.d/

0 komentar: