10
« เมื่อ: สิงหาคม 10, 2013, 16:06:49 PM »
server dell power Edge R710 Intel Xeon E5620 2.4 GHz
Ram 8 GB ครับ เนื่องจากผมมาดูต่อจากคนเก่า ที่เอาคอนฟิกเดิมๆ เเล้วพอมี transection เเล้วมันช้าเเล้วอีกอย่างที่ไช้อยู่เป็น engine ของ MyIsam ครับไม่ได้ enable InnoDB เเต่อย่างใด เครื่องลง 32 bits ไว้ครับเเละใช้ MySql 5.1.42
config เก่าครับเดิมๆเลย my.cnf ของเก่า
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
interactive_timeout=100
wait_timeout=100
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 32M
max_allowed_packet = 1M
table_cache = 64
sort_buffer_size = 1M
net_buffer_length = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 8M
set-variable=max_connections=640
tmp_table_size = 32M
max_tmp_tables = 32M
query_cache_size=32M
old_passwords
log-slow-queries
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
แล้วผมได้คอนฟิกไหม่ไปเเต่ยังไม่ได้เปลี่ยนนะครับ
################################################################################
#DESCRIPTION: MySQL config 5.0.x, 5.1.x, 5.5.x
#RAM: 6GB RAM dedicated server
#Connections: 350 connections
################################################################################
[mysqld]
interactive_timeout=1000
wait_timeout=1800
#character-set-server = tis620
#collation-server = tis620_thai_ci
## Files
#back_log = 300
#open-files-limit = 8192
#open-files = 1024
port = 3306
socket = /tmp/mysql.sock
#pid-file = /tmp/mysql.pid
skip-external-locking
#skip-name-resolve
## Logging
datadir = /usr/local/mysql/var/
old_passwords
log_bin = mysql-bin
long_query_time = 10
log-slow-queries
server-id =1
max_binlog_size = 256M
expire_logs_days = 7
## Per-Thread Buffer memory utilization equation: (read_buffer_size + read_rnd_buffer_size + sort_buffer_size + thread_stack + join_buffer_size + binlog_cache_size) * max_connections
thread_stack = 32K
sort_buffer_size = 1024K
read_buffer_size = 1024K
read_rnd_buffer_size = 4096K
join_buffer_size = 1024K
binlog_cache_size = 64K
## Query Cache
query_cache_size = 64M
query_cache_limit = 64M
query_cache_type = 1
## Connections
max_connections = 350
max_connect_errors = 100
connect_timeout = 30
max_allowed_packet = 32M
## Default Table Settings
#sql_mode = NO_AUTO_CREATE_USER
## Table and TMP settings
max_heap_table_size = 512M
bulk_insert_buffer_size = 512M
tmp_table_size = 512M
## Table cache settings
table_cache = 64M
table_open_cache = 64M
table_definition_cache = 64M
## Thread settings
thread_concurrency = 16
thread_cache_size = 100
## MyISAM Engine
key_buffer = 256M
myisam_sort_buffer_size = 256M
myisam_max_sort_file_size = 2G
#myisam_repair_threads = 2
#myisam_recover = QUICK,BACKUP
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqldump]
max_allowed_packet = 128M