debian 4.0 - High CPU

totomcs

Verified User
Joined
Apr 27, 2008
Messages
18
I have one question.

I have a server with the specifications that you see below.
It makes a lot of CPU and Load. But it has yust a few clients and there are only 30 to 40 clients.

What is the best way to optimalitions for mysql?
I have tried the optimalisation that directadmin advices. http://help.directadmin.com/item.php?id=44 But this doesnt help.

Are there any other options anyone can tell me?

HTML:
2 x Xeon Quadcore 2.3 GHz
1 TB Sata disk,
24 GB ram
model name : Intel(R) Xeon(R) CPU E5410 @ 2.33GHz cache size : 6144 KB


top - 23:46:24 up 1:08, 2 users, load average: 24.10, 4.16, 5.21
Tasks: 198 total, 3 running, 180 sleeping, 14 stopped, 1 zombie
Cpu(s): 25.5%us, 1.7%sy, 0.0%ni, 72.0%id, 0.7%wa, 0.0%hi, 0.2%si, 0.0%st
Mem: 24958432k total, 4421164k used, 20537268k free, 131828k buffers
Swap: 2650684k total, 0k used, 2650684k free, 3610036k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
14251 apache 15 0 121m 89m 4640 S 20 0.4 0:01.36 /usr/sbin/httpd -k start -DSSL
14095 apache 15 0 134m 102m 4604 S 17 0.4 0:11.65 /usr/sbin/httpd -k start -DSSL
14078 apache 15 0 126m 94m 4704 S 14 0.4 0:18.97 /usr/sbin/httpd -k start -DSSL
14252 apache 16 0 134m 101m 4260 S 13 0.4 0:01.16 /usr/sbin/httpd -k start -DSSL
14253 apache 15 0 121m 88m 3928 S 13 0.4 0:00.67 /usr/sbin/httpd -k start -DSSL
14258 apache 15 0 121m 89m 4252 S 12 0.4 0:01.10 /usr/sbin/httpd -k start -DSSL
2879 mysql 15 0 226m 112m 5440 S 12 0.5 20:45.83 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql --datadir=/us
14260 apache 15 0 121m 88m 3992 R 11 0.4 0:00.65 /usr/sbin/httpd -k start -DSSL
14142 apache 15 0 134m 101m 4472 S 11 0.4 0:08.57 /usr/sbin/httpd -k start -DSSL
14267 apache 15 0 121m 88m 4192 S 10 0.4 0:00.36 /usr/sbin/httpd -k start -DSSL
14229 apache 15 0 122m 90m 4288 S 10 0.4 0:03.80 /usr/sbin/httpd -k start -DSSL
14230 apache 15 0 121m 89m 4300 R 9 0.4 0:03.51 /usr/sbin/httpd -k start -DSSL
14143 apache 15 0 134m 101m 4328 S 9 0.4 0:09.83 /usr/sbin/httpd -k start -DSSL
14145 apache 15 0 122m 90m 4328 S 7 0.4 0:09.09 /usr/sbin/httpd -k start -DSSL
13996 apache 15 0 123m 91m 4912 S 5 0.4 0:17.19 /usr/sbin/httpd -k start -DSSL
14261 apache 15 0 120m 87m 3880 S 5 0.4 0:00.45 /usr/sbin/httpd -k start -DSSL
14111 apache 15 0 0 0 0 Z 5 0.0 0:12.47 [httpd] <defunct>
14139 apache 15 0 122m 90m 4332 S 5 0.4 0:09.90 /usr/sbin/httpd -k start -DSSL
14167 apache 15 0 121m 89m 4268 S 5 0.4 0:03.73 /usr/sbin/httpd -k start -DSSL
14234 apache 15 0 121m 88m 4220 S 4 0.4 0:01.07 /usr/sbin/httpd -k start -DSSL
13968 apache 15 0 122m 90m 4480 S 3 0.4 0:21.89 /usr/sbin/httpd -k start -DSSL
14181 apache 15 0 126m 94m 4324 S 2 0.4 0:06.81 /usr/sbin/httpd -k start -DSSL
14062 apache 15 0 126m 95m 5288 S 2 0.4 0:19.88 /usr/sbin/httpd -k start -DSSL
14138 apache 16 0 126m 94m 4716 S 2 0.4 0:09.06 /usr/sbin/httpd -k start -DSSL
14054 apache 15 0 122m 90m 4324 S 2 0.4 0:19.03 /usr/sbin/httpd -k start -DSSL
14158 apache 15 0 123m 90m 4320 S 2 0.4 0:06.99 /usr/sbin/httpd -k start -DSSL
14228 apache 15 0 121m 89m 4240 S 2 0.4 0:02.36 /usr/sbin/httpd -k start -DSSL
14116 apache 15 0 123m 91m 5180 S 1 0.4 0:10.96 /usr/sbin/httpd -k start -DSSL
14259 apache 15 0 120m 87m 3516 S 1 0.4 0:00.28 /usr/sbin/httpd -k start -DSSL
14007 apache 18 0 135m 103m 4960 S 1 0.4 0:25.04 /usr/sbin/httpd -k start -DSSL
14239 apache 15 0 121m 88m 4008 S 1 0.4 0:01.34 /usr/sbin/httpd -k start -DSSL

Kind regards,
Walt
 
It doesn't seem to be a MySQL problem but Apache, and also even if all the processes are using at the moment 25% of the CPU the system load for the last minute is a huge 24.10...

My guess is that it's not the CPU load that keeps your processes from running smoothly, but the disk IO. You may have a huge bottleneck related to disk access or non-cached transfer speed.
Are those disks SATA or SATAII? Is there a different disk for the system (/, /usr, /var) and web data (/home) paths or is there just one disk? Are you using more than one partition or just one? Are them on journalized file systems or normal ones?

Use hdparm to test your disks speed, check that S.M.A.R.T. is active and test them for errors with smartctl.
Use low-level programs like vmstat and iostat to check what's going on.

If this is too much for you, hire a consultant to check your system.
 
either your sites are very busy or your under an attack....
 
How can I make programs use more RAM and less CPU? A lot of the time when I play certain games, or sometimes even use big programs my CPU fan goes crazy (I'm on a laptop). The temperature goes up to 80 degrees Celsius, but my ram is only at 35% usage (out of 2gigs so about 700mb). So, how can I make programs generally use more RAM and less CPU, if possible?
_________________
external keyword tool ~ keyworddiscovery.com ~ keycompete.com ~ compete.com ~ webmasterworld.com
 
Last edited:
@sujanne:

Playing games on a desktop system has nothing to do with how we run our linux and unix webservers; you'd probably get better help on a forum specializing in desktop system problems.

But if I had to give a one sentence answer, I'd say that to run most recent game releases these days you need both high power CPUs and lots of Memory. If I could add a second sentence, I'd add that in most cases your laptop's graphics won't give you the best gaming experience.

Jeff
 
Back
Top