linux - Overload due to apache process and Mysql process -
i have small site running , 20 suppliers used access sites queries. server running on high load during peak hours. please find output below:
top - 10:15:42 32 days, 20:08, 4 users, load average: 2.20, 2.06, 1.94 tasks: 500 total, 1 running, 498 sleeping, 0 stopped, 1 zombie cpu(s): 7.1%us, 2.3%sy, 0.0%ni, 90.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st mem: 32931056k total, 3124852k used, 29806204k free, 49508k buffers swap: 3999740k total, 0k used, 3999740k free, 1364836k cached pid user pr ni virt res shr s %cpu %mem time+ command 10130 mysql 20 0 6207m 567m 5468 s 232 1.8 14306:04 mysqld 27534 worldsto 20 0 307m 20m 5364 s 5 0.1 0:01.97 apache2 29237 worldsto 20 0 299m 12m 3696 s 2 0.0 0:00.07 apache2 29003 worldsto 20 0 299m 13m 3716 s 1 0.0 0:00.12 apache2 root@server70:~# ps -ef | grep apache | wc 434 2368 17756 cpu(s): 24 ram size: 32 gb
from have seen apache logs, connections coming suppliers , company ip addresses. sure there wrong apache process mysql using more cpu load. please me identify , fix problem.
the best troubleshooting step can this:
connect mysql server process, , type:
show full processlist
that show every query that's running. see same query showing multiple times, perhaps different id's - maybe like:
select * foo fooid='1' select * foo fooid='2' ...etc...
that means need index on 'fooid'.
Comments
Post a Comment