Can someone give me several various ways to trace server load? It seems to be a mysql issue with me as I ran top -c and suspended exim to check, mysql seems to be using a lot of cpu resources
What I've done:
mysqladmin processlist (constantly shows eximstats), else is normal
/usr/sbin/lsof -p (which lists just about every account)
ps aux | grep mysql
lsof -p PROCESS-ID |more
Using mysql 5, centos 4 / cpanel stable version
I have about 400 accounts, mostly reseller sub accounts and about 30% disk usage.
Last edited by Zion Ahead; 11-29-2006 at 12:55 PM.
If mysql is taking lot of cpu resourses, you have to find out which database is eating up the resourses. You can use mysqladmin processlist for this
May be use mysqladmin processlist -i4
This will refresh in every 4 seconds. Then you will be able to see if it is any particular database which is causing the issue.
Also, what is your my.cnf file? Have you optimized it?
#DO NOT MODIFY THE FOLLOWING COMMENTED LINES!
#Created with ELS from www.servermonkeys.com
query_cache_size=128M ## 32MB for every 1GB of RAM
key_buffer=512M ## 128MB for every 1GB of RAM
sort_buffer_size=4M ## 1MB for every 1GB of RAM
read_buffer_size=4M ## 1MB for every 1GB of RAM
read_rnd_buffer_size=4M ## 1MB for every 1GB of RAM
thread_concurrency=8 ## Number of CPUs x 2