MySQL/mysqld
Aus SchnallIchNet
Performance Tuning
[mysqld] delay-key-write-for-all-tables skip-locking skip-innodb skip-networking set-variable = key_buffer=128M set-variable = max_allowed_packet=1M set-variable = table_cache=384 set-variable = sort_buffer=4M set-variable = record_buffer=1M set-variable = myisam_sort_buffer_size=16M set-variable = thread_cache=8 ####log = /var/log/mysql/mysql.log ####log-long-format ####log-slow-queries = /tmp/mysql.slow.queries.log ####set-variable = long_query_time = 5 ###log-bin ###server-id = 1
und alle halbe stunde ein cronJob wegen der Stabilitaet:
/usr/bin/mysql -u mysqlAdminUser --password=geheim --exec='FLUSH TABLES;'
Und dann einmal die woche wegen der Dicken Datenbank folgende 'hardlife' optimierung:
#!/bin/sh /etc/init.d/mysql stop cd /var/lib/mysql/$1 myisamchk --verbose --force --recover *.MYI myisamchk --verbose --sort-index *.MYI myisamchk --verbose --sort-records=1 *.MYI myisamchk --verbose --force --recover *.MYI myisamchk --verbose *.MYI /etc/init.d/mysql start
hotcopy backups
/usr/bin/mysqlhotcopy -u root -p My2Secure$Password sugarcrm /home/backup/database --allowold --keepold