bonjour,
j'ai mon application qui prend 100 % de la cpu
j'uitlise le script mysqltuner.pl pour améliorer les requetes sql
le résultat :
General recommendations:
Add skip-bdb to MySQL configuration to disable BDB
Run OPTIMIZE TABLE to defragment tables for better performance
Reduce your overall MySQL memory footprint for system stability
Enable the slow query log to troubleshoot bad queries
Temporary table size is already large - reduce result set size
Reduce your SELECT DISTINCT queries without LIMIT clauses
Variables to adjust:
*** MySQL's maximum memory usage is dangerously high ***
*** Add RAM before increasing MySQL buffer variables ***
query_cache_size (> 16M)
sort_buffer_size (> 1M)
read_rnd_buffer_size (> 256K)
comment peut-on améliorer le temps de réponse sans augmenter la mémoire ?
mon my.cnf
cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
query_cache_size = 16M
tmp_table_size = 256M
max_heap_table_size = 512M
innodb_buffer_pool_size = 3G
table_cache= 512M
thread_cache_size = 10
key_buffer_size = 600M
sort_buffer_size =1M
read_rnd_buffer_size=256K
open_files_limit = 65535
max_connections = 100
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Partager