Web Hosting Talk







View Full Version : Heavy CPU Usage on Raq3 32MB Ram


vladgur
10-12-2001, 02:33 PM
Hi guys.
I am running a Raq3 with 32mb ram, php, mysql db and site based on phpnuke. We have very few visitors right now, 11 concurent ones at the most, yet the cpu load in top seems to be jumping up and down everytime some1 connects
Control pannel showed 25% cpu load average over 15 minutes at one point.

What could be the problem. I will upgrade my RAM soon, but in the meanwhile 32mb should be more than enough

vladgur
10-12-2001, 02:34 PM
here is my recent top:

11:29am up 26 min, 3 users, load average: 0.48, 5.78, 13.23
66 processes: 65 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: 8.9% user, 1.3% system, 0.0% nice, 89.7% idle
Mem: 30708K av, 29300K used, 1408K free, 23112K shrd, 668K buff
Swap: 131536K av, 23892K used, 107644K free 8152K cached

PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
1531 httpd 17 0 5772 2712 1304 S 0 6.5 8.8 0:02 httpd
1048 admin 5 0 556 520 340 R 0 1.1 1.6 0:06 top
1716 httpd 3 0 6684 3908 1920 S 0 0.9 12.7 0:00 httpd
1543 root 2 0 2844 2044 1028 S 0 0.7 6.6 0:00 mysqld
1529 httpd 1 0 5840 2748 1480 S 0 0.1 8.9 0:02 httpd
1535 httpd 1 0 5708 1356 904 S 0 0.1 4.4 0:01 httpd
1538 httpd 1 0 5836 2956 1420 S 0 0.1 9.6 0:00 httpd
1737 httpd 1 0 4536 1500 1272 S 0 0.1 4.8 0:00 httpd
1739 httpd 1 0 4544 1508 1280 S 0 0.1 4.9 0:00 httpd
1 root 0 0 108 52 40 S 0 0.0 0.1 0:05 init
2 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 kflushd
3 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 kupdate
4 root 0 0 0 0 0 SW 0 0.0 0.0 0:00 kpiod
5 root 0 0 0 0 0 SW 0 0.0 0.0 0:02 kswapd
6 root -20 -20 0 0 0 SW< 0 0.0 0.0 0:00 mdrecoveryd
80 root 0 0 136 0 0 SW 0 0.0 0.0 0:00 safe_mysqld
122 root 0 0 124 52 44 S 0 0.0 0.1 0:00 syslogd

vladgur
10-12-2001, 02:34 PM
and here is my recent ps -axf

[root@www admin]# ps -axf
PID TTY STAT TIME COMMAND
1 ? S 0:05 init
2 ? SW 0:00 [kflushd]
3 ? SW 0:00 [kupdate]
4 ? SW 0:00 [kpiod]
5 ? SW 0:02 [kswapd]
6 ? SW< 0:00 [mdrecoveryd]
80 ? SW 0:00 [safe_mysqld]
123 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir=/usr/lo
169 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir=/us
170 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1534 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1536 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1540 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1543 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1564 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1584 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1649 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1712 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1713 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1736 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1738 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1742 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1782 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
1783 ? S 0:00 \_ /usr/local/mysql/libexec/mysqld --basedir
122 ? S 0:00 syslogd -m 0
133 ? SW 0:00 [klogd]
344 ? S 0:00 crond
356 ? SW 0:00 [inetd]
362 ? SW 0:00 [sshd]
466 ? SW 0:00 \_ [sshd]
487 pts/0 SW 0:00 | \_ [bash]
1168 pts/0 SW 0:00 | \_ [su]
1169 pts/0 SW 0:00 | \_ [sh]
790 ? S 0:00 \_ /usr/sbin/sshd
826 pts/1 SW 0:00 | \_ [bash]
996 pts/1 SW 0:00 | \_ [su]
1035 pts/1 S 0:00 | \_ sh
1785 pts/1 R 0:00 | \_ ps -axf
956 ? S 0:00 \_ /usr/sbin/sshd
994 pts/2 SW 0:00 \_ [bash]
1048 pts/2 S 0:06 \_ top
371 ? SW 0:00 [nlservd]
379 ? S 0:00 /usr/sbin/httpd -f /etc/admserv/conf/httpd.conf
401 ? SW 0:00 \_ [httpd]
622 ? SW 0:00 \_ [httpd]
415 ? SW 0:00 [postmaster]
481 ? S 0:00 perl /usr/local/sbin/poprelayd -d
525 ? SW 0:00 [smbd]
537 ? S 0:00 nmbd -D
544 ? S 0:00 /sbin/lcdsleep
564 ? SW 0:00 [nsrexecd]
565 ? S 0:00 \_ /usr/sbin/nsrexecd
595 ? SW 0:00 [getty]
1527 ? S 0:00 /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1529 ? S 0:02 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1530 ? S 0:01 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1531 ? S 0:03 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1532 ? S 0:02 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1533 ? S 0:01 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1535 ? S 0:02 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1537 ? S 0:02 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1538 ? S 0:00 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1539 ? S 0:01 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1541 ? S 0:01 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1714 ? S 0:00 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1715 ? S 0:00 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1716 ? S 0:00 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1737 ? S 0:00 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf
1784 ? S 0:00 \_ /usr/sbin/httpd -f /etc/httpd/conf/httpd.conf

dektong
10-12-2001, 02:36 PM
you are using your swap memory already ... you may need to upgrade your memory ...

cheers,
:beer:

vladgur
10-12-2001, 03:03 PM
The question is, why is the server using the swap so heavily for very few users and is this in fact what takes up most cpu.
I want to get to the root of the problem

vladgur
10-12-2001, 04:37 PM
Something is terrribly wrong:
<pre>
1:34pm up 2:32, 2 users, load average: 34.54, 32.94, 28.32
145 processes: 143 sleeping, 2 running, 0 zombie, 0 stopped
CPU states: 95.3% user, 4.6% system, 0.0% nice, 0.0% idle
Mem: 30708K av, 30220K used, 488K free, 16640K shrd, 652K buff
Swap: 131536K av, 107568K used, 23968K free 12040K cached

PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND
3970 httpd 13 0 4236 24 16 R 0 94.4 0.0 35:05 httpd
5718 admin 6 0 568 532 316 R 0 2.3 1.7 0:00 top
5 root 0 0 0 0 0 SW 0 0.3 0.0 0:17 kswapd
3739 httpd 0 0 5256 1264 428 D 0 0.3 4.1 0:03 httpd
3992 httpd 0 0 5284 668 116 D 0 0.3 2.1 0:06 httpd
5738 root 0 0 304 304 236 D 0 0.3 0.9 0:00 sh
2730 httpd 0 0 5984 520 480 D 0 0.1 1.6 0:10 httpd
3636 httpd 0 0 5352 856 288 D 0 0.1 2.7 0:04 httpd
3640 httpd 0 0 5060 936 336 D 0 0.1 3.0 0:06 httpd
3742 root 0 0 4516 1156 824 S 0 0.1 3.7 0:00 mysqld
3744 httpd 1 0 4672 728 188 D 0 0.1 2.3 0:06 httpd
3777 httpd 0 0 5816 1024 672 D 0 0.1 3.3 0:01 httpd
3864 httpd 0 0 5556 596 480 D 0 0.1 1.9 0:06 httpd
3902 httpd 0 0 5312 652 300 D 0 0.1 2.1 0:02 httpd
3905 httpd 0 0 4716 1016 652 D 0 0.1 3.3 0:02 httpd
4142 httpd 0 0 5424 516 476 D 0 0.1 1.6 0:02 httpd
1 root 0 0 108 52 40 S 0 0.0 0.1 0:05 init
</pre>

skylab
10-13-2001, 03:45 AM
3970 httpd 13 0 4236 24 16 R 0 94.4 0.0 35:05 httpd



whoa. that doesn't look quite right.