php - MYSQL overload -
i having problems mysql overloading , when busy server stop responding completely. know 1 of databases has loot of trafic how can deal this.do need better server or need different engion database. @ moment using myisam. of tables dealing have 420000 records(82.7 mib) there lot of inserts , selects , speed important much
i message on when @ status on whm
/usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/server.sy2.com.pid --skip-external-locking
the server load 180%-220% of time.
i typed on server
netstat -nat | awk '{print $6}' | sort | uniq -c | sort -n 1 established) 1 foreign 17 syn_recv 28 fin_wait1 30 listen 154 established 188 fin_wait2 1206 time_wait
apache status
current time: saturday, 25-jun-2011 19:00:34 bst restart time: friday, 24-jun-2011 20:41:36 bst parent server generation: 11 server uptime: 22 hours 18 minutes 58 seconds total accesses: 1866618 - total traffic: 12.2 gb cpu usage: u25.92 s20.03 cu1142.19 cs0 - 1.48% cpu load 23.2 requests/sec - 159.5 kb/second - 6.9 kb/request 206 requests being processed, 12 idle workers server spec linux - dual quad core intel xeon e5620 hard disk: 4x300gb sas 15k rpm ram: 12 gb ddr3 ram raid options: raid 10 (needs 4 identical drives) operating system: centos 5.x control panel: cpanel/whm bandwidth: 5000 gb
there no simple answer question. guidelines on how troubleshoot issue. may running peak load server can handle , may not able optimize much.
start show processlist
give idea how many connections open , ones might stuck due locking issues.
enable slow query log, responding queries , use explain
see execution plan. may missing indexes or have structural issues causing queries run slow.
you can tweak database server settings allow more data cached in memory. there tools mysqltuner can guide settings should at.
you may want take @ guide: http://www.fromdual.com/mysql-performance-tuning-key
Comments
Post a Comment