Msg#: 3832504 posted 8:22 pm on Jan 22, 2009 (gmt 0)
hi i have a server with 4 gb of ram and its linux i have this server since 3-4 months and was running fine but before one day i got the load issue --- root@host [~]# w 14:18:46 up 27 days, 22:21, 1 user, load average: 11.73, 6.96, 5.48 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 MY.MY.MY.MY 14:18 0.00s 0.02s 0.01s w --- i just don't no whats the issue because i am not the server admin but i have checked some --- root@host [~]# netstat -an ¦grep :80 ¦wc -l 313 --- --- root@host [~]# mysqladmin processlist ¦wc -l 21 ---
both are normal but when i checked # CPU/Memory/MySQL Usage from WHM so its showing MYSQL in RED
... any idea what the issue is and how do i check if mysql is taking much load so which database is ?
Msg#: 3832504 posted 8:37 pm on Jan 22, 2009 (gmt 0)
first thing would be to actually look at the processlist in mysql so you can see what's running (and how long it's running. if it's heavy, you usually have a couple of seconds to see the processes). if you don't find the problem, ask your administrator to enable the mysql-slow-log, so that all slow queries will be logged to a special log file.
Msg#: 3832504 posted 9:11 pm on Jan 22, 2009 (gmt 0)
since you're already using
, just don't pipe it's output into wc. you'll see what's running in mysql right now.
as for optimization of mysql and apache: that may fix the issue. unfortunately, you cannot just set "optimize = 1" in some config file, you will have to tune the system and the configuration to fit your special situation and needs.
Msg#: 3832504 posted 10:21 pm on Jan 27, 2009 (gmt 0)
ok i got the issue but i am still lookinh for solution the issue is apache + mysql is making much load on server but when i checked port80 so its root@host [/home/threezee/public_html]# netstat -an ¦grep :80 ¦wc -l 329
i have tried the basic optimize of mysql+httpd.
please give me other ways with details and command lines i am new ;) its important for me :S
Msg#: 3832504 posted 6:31 pm on Jan 28, 2009 (gmt 0)
You will want to use sysstat to start tracking disk/cpu/memory metrics. Then have an external tool poll certain pages on your site to generate a baseline of response. This way you can clearly track your progress.
I typically start with MySQL.
There is a tool called mysqltuner.pl that can give you some initial indications of problems but it is no substitute for having handle on MySQL tuning.
Sysstat is very useful in spotting hardware resource limits and depending on the limits being hit, there are different tuning paths.