
|
View Full Version : Server Proccesses...
NiceRsx2002 08-26-2002, 09:07 AM My servers load average is running from 10-20... I know that is high but I'm not sure why it is so high as most of the sites are small ther is only about 100-220 proccesses at one time yet the load avergage is 10-20. My server is a Pentium III 1GHZ IBM and I have 1GB of RAM. Any idea what I can do to optimize my servers preformance. Or how I can find out which users are causing it to load so slow...
dandanfirema 08-26-2002, 09:39 AM top -c
paste the results here or PM me
NiceRsx2002 08-26-2002, 11:17 AM 10:25am up 2 days, 22:39, 5 users, load average: 23.86, 23.29, 22.76
194 processes: 192 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 21.9% user, 74.8% system, 0.0% nice, 3.1% idle
Mem: 1028864K av, 1023756K used, 5108K free, 468K shrd, 14204K buff
Swap: 2096472K av, 0K used, 2096472K free 476836K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
11843 root 15 0 680 680 304 R 32.7 0.0 11:12 gzip
11842 root 11 0 880 880 692 S 7.9 0.0 5:07 tar
17225 root 14 0 1128 1128 836 R 6.7 0.1 0:12 top
15866 apache 9 0 85308 83M 84232 S 3.1 8.2 0:06 httpd
17422 apache 9 0 84892 82M 84196 S 2.8 8.2 0:01 httpd
17429 apache 14 0 85092 83M 84420 S 2.5 8.2 0:00 httpd
15834 apache 9 0 85392 83M 84228 S 2.3 8.2 0:04 httpd
15874 apache 9 0 85304 83M 84236 S 2.3 8.2 0:08 httpd
17541 apache 9 0 84892 82M 84184 S 2.2 8.2 0:00 httpd
15864 apache 11 0 85320 83M 84180 S 2.0 8.2 0:05 httpd
16002 apache 9 0 85404 83M 84240 S 1.7 8.3 0:04 httpd
17553 qmailr 9 0 512 512 436 S 1.7 0.0 0:00 qmail-remote
17543 apache 9 0 84896 82M 84228 S 1.4 8.2 0:00 httpd
15795 root 8 0 84776 82M 84124 S 1.2 8.2 0:19 httpd
15868 apache 9 0 84904 82M 84080 S 1.2 8.2 0:04 httpd
17537 apache 9 0 84876 82M 84208 S 1.2 8.2 0:00 httpd
17542 apache 9 0 84876 82M 84212 S 1.2 8.2 0:00 httpd
Right now were doing a backup so that might slow it down a little bit, but here are the copied resluts, let me know thanks.
kktsang 08-26-2002, 11:21 AM I discovered that the CPU states on system is extremely high.
It may be the problem on the confiuration of hardware .
Do you have enable the use of dma ??
The problem may be there.
Gernot 08-26-2002, 11:28 AM Originally posted by kktsang
I discovered that the CPU states on system is extremely high.
It may be the problem on the confiuration of hardware .
Do you have enable the use of dma ??
The problem may be there.
He's mentioned he was performing a backup at that time so that explains the high CPU usage. You might want to repost the output of top when you're not doing any kind of backup because the output does not really help at this time.
What I did find though, is that Apache uses a LOT of memory according to this output. What modules do you have running there??
dandanfirema 08-26-2002, 11:56 AM 11843 root 15 0 680 680 304 R 32.7 0.0 11:12 gzip
11842 root 11 0 880 880 692 S 7.9 0.0 5:07 tar
These would be the backup components consuming ALOT of your cpu at the moment. Post another when you are done backing up.
2host.com 08-26-2002, 12:49 PM I'd also suggest that you stop Apache and see if the load drops significantly after a short (or long) duration. If not, restart it and take at look at some other services. It's likely Apache and some PHP or CGI script. You can check the server status and match up the PID (process ID) of the ones showing high usage in top or ps with the one's showing in the server-status page to determine the site and path to the offending script.
I would also suggest you look into setting limits (for processes, CPU and RAM) in your configuration file for Apache. That is a start and a potential solution. Limits are good to avoid these things, but finding the cause is also needed so one user doesn't use up all the allotted resources if you have to set global limits for things like mod_php, mod_perl, etc. Good luck.
BobFarmer 08-26-2002, 03:57 PM The problem isn't caused by your CPU usage. Did you notice each of your apache child processes are 83 MEGS? That's insane. Your memory is toast, and your machine is swapping like its stuck in quicksand, which is why your load average is so high.
Mem: 1028864K av, 1023756K used, 5108K free, 468K shrd, 14204K buff
Swap: 2096472K av, 0K used, 2096472K free 476836K cached
You've swapped out 2 gigs of data. You're running a 200% swap ratio, which is also insane. I'm sure your system would swap out even more, if it could keep up with itself. Although you can slap 4 gigs of RAM in your box, that won't solve the problem, just delay it. I suggest you figure out what's causing your apache processes to be so big. That's the largest I've ever seen.
Needless to say when you stop apache it will resolve your load problem (as previously suggested) but I thought you might want to know why it will.
2host.com 08-26-2002, 04:02 PM Looks closer, none of the swap is being used.
Lagniappe-labgeek 08-26-2002, 04:06 PM I tend to agree about the excess memory usage. I also notice that the apache processes are showing only a little usage. Had apache recently been restarted before this top was run? If not, notice that you have 5 httpd processes that have consumed no time. Try decreasing the number of apache servers started - it's not always better to have more... If these are sitting there not doing anything then they're just wasting space - 415MB worth!
edit -
Oops looking closer that seems to be the shared segment. The logic still applies though. Just not as drastic as first thought.
dandanfirema 08-26-2002, 04:10 PM Please paste another full top output.
neonlexx 08-26-2002, 04:37 PM Ive setup a new server and it has no accounts on it according to phpsysinfo it says im using 67% of my ram. how is that even possible...heres ps -aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.1 1388 524 ? S Aug25 0:06 init [3]
root 2 0.0 0.0 0 0 ? SW Aug25 0:00 [keventd]
root 3 0.0 0.0 0 0 ? SW Aug25 0:00 [kapm-idled]
root 4 0.0 0.0 0 0 ? SWN Aug25 0:00 [ksoftirqd_CPU0]
root 5 0.0 0.0 0 0 ? SW Aug25 0:00 [kswapd]
root 6 0.0 0.0 0 0 ? SW Aug25 0:00 [kreclaimd]
root 7 0.0 0.0 0 0 ? SW Aug25 0:00 [bdflush]
root 8 0.0 0.0 0 0 ? SW Aug25 0:00 [kupdated]
root 9 0.0 0.0 0 0 ? SW< Aug25 0:00 [mdrecoveryd]
root 13 0.0 0.0 0 0 ? SW Aug25 0:00 [kjournald]
root 89 0.0 0.0 0 0 ? SW Aug25 0:00 [khubd]
root 212 0.0 0.0 0 0 ? SW Aug25 0:00 [kjournald]
root 213 0.0 0.0 0 0 ? SW Aug25 0:00 [kjournald]
root 214 0.0 0.0 0 0 ? SW Aug25 0:00 [kjournald]
root 215 0.0 0.0 0 0 ? SW Aug25 0:00 [kjournald]
root 216 0.0 0.0 0 0 ? SW Aug25 0:00 [kjournald]
root 547 0.0 0.0 0 0 ? SW Aug25 0:00 [eth0]
root 743 0.0 0.1 1452 596 ? S Aug25 0:00 syslogd -m 0
root 748 0.0 0.2 1972 1112 ? S Aug25 0:00 klogd -2
nobody 1048 0.0 0.2 3056 1276 ? S Aug25 0:00 proftpd (accepting connections)
root 1066 0.0 0.2 2664 1260 ? S Aug25 0:01 /usr/sbin/sshd
root 1099 0.0 0.1 2252 952 ? S Aug25 0:00 xinetd -stayalive -reuse -pidfile /var/run/xinetd.pi
root 1117 0.0 0.2 2836 1344 ? S Aug25 0:00 antirelayd
root 1135 0.0 0.5 3976 2628 ? S Aug25 0:02 chkservd
root 1169 0.0 0.6 4460 3164 ? SN Aug25 0:00 cpanellogd - sleeping for logs
root 1171 0.0 0.6 4656 3104 ? S Aug25 0:00 cpaneld - listening port 2082
root 1186 0.0 0.7 5328 3820 ? S Aug25 0:00 cppop - accepting on port 110
nobody 1191 0.0 0.4 3360 2024 ? S Aug25 0:00 entropychat
root 1205 0.0 0.3 2800 1540 ? S Aug25 0:00 ./stunnel-3.22local -r 127.0.0.1:110 -d 995 -p /usr/
root 1207 0.0 0.3 2800 1540 ? S Aug25 0:00 ./stunnel-3.22local -r 127.0.0.1:25 -d 465 -p /usr/l
cpanel 1209 0.0 0.3 2800 1540 ? S Aug25 0:00 ./stunnel-3.22local -r 127.0.0.1:2082 -d 2083 -p /us
cpanel 1211 0.0 0.3 2800 1540 ? S Aug25 0:00 ./stunnel-3.22local -r 127.0.0.1:2086 -d 2087 -p /us
cpanel 1213 0.0 0.3 2800 1536 ? S Aug25 0:00 ./stunnel-3.22local -r 127.0.0.1:2095 -d 2096 -p /us
root 1218 0.0 0.9 8452 4692 ? S Aug25 0:07 /usr/local/apache/bin/httpd -DSSL
root 1228 0.0 0.6 4728 3176 ? S Aug25 0:00 whostmgrd
root 1254 0.0 0.2 4352 1416 ? S Aug25 0:00 /usr/sbin/exim -bd -q1h
root 1274 0.0 0.1 1588 688 ? S Aug25 0:00 crond
root 1340 0.0 0.2 2228 1020 ? S Aug25 0:00 /bin/sh /usr/bin/safe_mysqld --datadir=/var/lib/mysq
mysql 1411 0.0 0.3 11900 1548 ? S Aug25 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysq
named 1516 0.0 0.5 10592 2684 ? S Aug25 0:00 named-wrapper -u named
mysql 1523 0.0 0.3 11900 1548 ? S Aug25 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysq
mysql 1524 0.0 0.3 11900 1548 ? S Aug25 0:00 /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysq
named 1538 0.0 0.5 10592 2684 ? S Aug25 0:00 named-wrapper -u named
named 1539 0.0 0.5 10592 2684 ? S Aug25 0:00 named-wrapper -u named
named 1540 0.0 0.5 10592 2684 ? S Aug25 0:00 named-wrapper -u named
named 1541 0.0 0.5 10592 2684 ? S Aug25 0:00 named-wrapper -u named
root 1571 0.0 0.1 1400 508 ? S Aug25 0:00 /usr/sbin/portsentry -tcp
root 1584 0.0 0.0 1364 428 tty1 S Aug25 0:00 /sbin/mingetty tty1
root 1585 0.0 0.0 1364 428 tty2 S Aug25 0:00 /sbin/mingetty tty2
root 1586 0.0 0.0 1364 428 tty3 S Aug25 0:00 /sbin/mingetty tty3
root 1588 0.0 0.0 1364 428 tty4 S Aug25 0:00 /sbin/mingetty tty4
root 1589 0.0 0.0 1364 428 tty5 S Aug25 0:00 /sbin/mingetty tty5
root 1590 0.0 0.0 1364 428 tty6 S Aug25 0:00 /sbin/mingetty tty6
root 1617 0.0 0.5 4384 2852 ? S Aug25 0:00 webmaild
cpanel 1725 0.0 4.2 22724 21272 ? S Aug25 0:00 interchange
root 20346 0.0 0.3 3528 1916 ? S 16:37 0:00 /usr/sbin/sshd
root 20347 0.0 0.2 2488 1344 pts/0 S 16:37 0:00 -bash
nobody 20395 0.0 0.3 3296 1924 ? S 16:37 0:00 proftpd: connected: localhost (127.0.0.1:37174)
nobody 20407 0.0 0.9 8500 4756 ? S 16:38 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 20408 0.0 0.9 8500 4756 ? S 16:38 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 20409 0.0 0.9 8500 4816 ? S 16:38 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 20410 0.0 0.9 8520 4976 ? S 16:38 0:00 /usr/local/apache/bin/httpd -DSSL
nobody 20411 0.0 0.9 8500 4776 ? S 16:38 0:00 /usr/local/apache/bin/httpd -DSSL
root 20462 0.0 0.1 2780 844 pts/0 R 16:40 0:00 ps -aux
NiceRsx2002 08-26-2002, 04:40 PM The backup is still proccessing so I'll post it soons as it's done.. What I don't get is I have an Ensim 3.1 server heres the output for that:
4:43pm up 3:11, 1 user, load average: 2.65, 2.56, 2.47
556 processes: 555 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 2.9% user, 17.9% system, 0.0% nice, 79.0% idle
Mem: 524288K av, 338560K used, 185728K free, 53180K shrd, 0K buff
Swap: 1048576K av, 0K used, 1048576K free 174028K cached
it has about 5x's the proccess and is X10's faster.. Less memory I don't get it :( ?? hmm.....
NiceRsx2002 08-26-2002, 04:43 PM oh yeah one last thing... How do I display the full list of proccesses (when running top) I can only see a screen full and it won't let me scroll down...
Gernot 08-26-2002, 04:46 PM Don't use top if you want all processes to be displayed. Use ps aux instead.
Wazeh 08-26-2002, 08:30 PM NiceRsx2002,
Your apache processes seem rather large. Do you have any idea why apache is using 83MB per process?! Try to kill apache and watch the load.
Wazeh 08-26-2002, 08:34 PM Originally posted by NiceRsx2002
The backup is still proccessing so I'll post it soons as it's done.. What I don't get is I have an Ensim 3.1 server heres the output for that:
4:43pm up 3:11, 1 user, load average: 2.65, 2.56, 2.47
556 processes: 555 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 2.9% user, 17.9% system, 0.0% nice, 79.0% idle
Mem: 524288K av, 338560K used, 185728K free, 53180K shrd, 0K buff
Swap: 1048576K av, 0K used, 1048576K free 174028K cached
it has about 5x's the proccess and is X10's faster.. Less memory I don't get it :( ?? hmm.....
How big are apache processes on that server -- on average?
Umm, 555 processes?! :eek: I'm on a desktop which is very lightly-loaded when it comes to hits (it's "technically" a webserver, but I don't really use it anymore), and I've never seen the process limit go over 100. If it climbs to 75 I start to wonder what's up.
500 processes, unless you're hosting a really busy site, is insane.
BTW, run "ps aux | grep httpd | wc -l" I get 11, but that includes the "grep httpd" output, so I have 10 sessions of httpd going. How many do you have? (Again, this is a server under NO load at all, I haven't gotten hits in weeks.)
NiceRsx2002 08-28-2002, 01:49 AM Okay here's the updated output (without the backup running):
12:58am up 1 day, 2:37, 1 user, load average: 0.07, 0.16, 0.11
143 processes: 141 sleeping, 1 running, 1 zombie, 0 stopped
CPU states: 2.9% user, 4.2% system, 0.0% nice, 92.8% idle
Mem: 1028864K av, 981812K used, 47052K free, 468K shrd, 64028K buff
Swap: 2096472K av, 0K used, 2096472K free 376484K cached
PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
21139 root 14 0 1100 1100 836 R 2.7 0.1 0:00 top
21092 grossqui 10 0 1332 1332 1036 S 1.5 0.1 0:00 proftpd
20032 apache 9 0 87480 85M 85236 S 0.3 8.5 0:00 httpd
953 bind 9 0 4372 4372 1476 S 0.1 0.4 0:38 named
11498 apache 9 0 89916 87M 84508 S 0.1 8.7 0:05 httpd
13085 mysql 9 0 15616 15M 2252 S 0.1 1.5 0:00 mysqld
20433 apache 9 0 86512 84M 85472 S 0.1 8.4 0:00 httpd
20446 apache 9 0 88028 85M 85020 S 0.1 8.5 0:00 httpd
1 root 8 0 520 520 452 S 0.0 0.0 0:04 init
2 root 8 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 9 0 0 0 0 SW 0.0 0.0 0:00 kapm-idled
4 root 19 19 0 0 0 SWN 0.0 0.0 0:00 ksoftirqd_CPU0
5 root 9 0 0 0 0 SW 0.0 0.0 0:10 kswapd
6 root 9 0 0 0 0 SW 0.0 0.0 0:00 kreclaimd
7 root 9 0 0 0 0 SW 0.0 0.0 0:24 bdflush
8 root 9 0 0 0 0 SW 0.0 0.0 0:00 kupdated
9 root -1 -20 0 0 0 SW< 0.0 0.0 0:00 mdrecoveryd
I guess it calmed down quite a bit :).... .07 load average for a 1GB Memory/CPU server hosting 750+ domains not bad huh? LOL
|