mhrlive |
10-01-2012 07:58 AM |
help, resource usage problem :(
Hello,
I own two VPS, first one with 384MB RAM and the second one with 256MB RAM, the two servers has the same OS Centos 5.8 and the same packages ( LAMP) using just the same website, same DB, same httpd.conf and same my.cnf, the problem that annoying me and blows my mind is on the first server with 384MB its using only 80 to 95 MB of RAM but the second one with 256 its using all the RAM causing server to stop, tried to optimize tables, do anything found on google with no result.
top on the 256MB server currently show and it will goes up by the time:
Code:
top - 08:56:07 up 16:49, 1 user, load average: 19.67, 6.95, 4.43
Tasks: 38 total, 1 running, 36 sleeping, 0 stopped, 1 zombie
Cpu(s): 12.7%us, 37.9%sy, 0.0%ni, 45.8%id, 1.7%wa, 0.0%hi, 2.0%si, 0.0%st
Mem: 262144k total, 227536k used, 34608k free, 3788k buffers
Swap: 0k total, 0k used, 0k free, 0k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17283 apache 20 0 39992 6616 2656 S 7.3 2.5 0:01.60 httpd
16799 apache 20 0 40344 7228 3044 S 3.7 2.8 0:01.07 httpd
16798 apache 20 0 40344 7164 3012 S 2.3 2.7 0:02.39 httpd
12052 apache 20 0 40132 7272 3012 S 0.7 2.8 0:00.16 httpd
12056 apache 20 0 40424 7248 3004 S 0.3 2.8 0:00.06 httpd
15544 apache 20 0 40432 7448 3072 S 0.3 2.8 0:00.15 httpd
15549 apache 20 0 40332 7424 3096 S 0.3 2.8 0:00.07 httpd
16354 apache 20 0 40140 7296 3044 S 0.3 2.8 0:00.04 httpd
16704 apache 20 0 40424 7268 3016 S 0.3 2.8 0:00.10 httpd
16705 apache 20 0 40124 7284 3016 S 0.3 2.8 0:00.08 httpd
16758 apache 20 0 40124 7268 3004 S 0.3 2.8 0:00.06 httpd
16760 apache 20 0 40124 7260 3004 S 0.3 2.8 0:00.05 httpd
16797 apache 20 0 40424 7264 3016 S 0.3 2.8 0:00.09 httpd
1 root 20 0 8356 728 676 S 0.0 0.3 30:00.42 init
1105 apache 20 0 39640 4368 708 S 0.0 1.7 0:00.00 httpd
12053 apache 20 0 40712 7608 3084 S 0.0 2.9 0:00.40 httpd
12711 apache 20 0 40432 7428 3068 S 0.0 2.8 0:00.11 httpd
13312 apache 20 0 40424 7372 3076 S 0.0 2.8 0:00.24 httpd
14408 apache 20 0 40432 7524 3144 S 0.0 2.9 0:00.27 httpd
14425 apache 20 0 0 0 0 Z 0.0 0.0 0:00.10 httpd <defunct>
14461 apache 20 0 40132 7272 3016 S 0.0 2.8 0:00.12 httpd
15035 apache 20 0 40432 7500 3116 S 0.0 2.9 0:00.15 httpd
15367 apache 20 0 40432 7472 3096 S 0.0 2.9 0:00.21 httpd
15499 apache 20 0 40124 7468 3200 S 0.0 2.8 0:00.08 httpd
16091 apache 20 0 40432 7568 3072 S 0.0 2.9 0:00.06 httpd
16278 apache 20 0 40332 7392 3072 S 0.0 2.8 0:00.05 httpd
16353 apache 20 0 40432 7484 3044 S 0.0 2.9 0:00.03 httpd
16677 apache 20 0 40124 7264 3008 S 0.0 2.8 0:00.06 httpd
16757 apache 20 0 40432 7516 3048 S 0.0 2.9 0:00.05 httpd
16759 apache 20 0 40124 7236 3004 S 0.0 2.8 0:00.01 httpd
16796 apache 20 0 40344 7160 3012 S 0.0 2.7 0:01.68 httpd
17109 root 20 0 2300 1040 828 R 0.0 0.4 0:00.02 top
httpd:
Code:
<IfModule prefork.c>
StartServers 1
MinSpareServers 1
MaxSpareServers 3
ServerLimit 2000
MaxClients 1200
MaxRequestsPerChild 9000
</IfModule>
<IfModule worker.c>
StartServers 2
MaxClients 1600
MinSpareThreads 25
MaxSpareThreads 150
ThreadsPerChild 450
MaxRequestsPerChild 0
</IfModule>
Please help me to figure the cause .
|