News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

100% Cpu usage

Started by Goosemoose, March 10, 2005, 12:20:20 AM

Previous topic - Next topic

Goosemoose

I have 256mb of ram on my server, which is a P4 3ghz machine running fedora core 1 with PLESK. According to plesk I am using 100% of the cpu and all the ram. But when I run top, and status and show full processlist in mysql I do not see that much usage going on. I'm averaging about 40 users right now, no more than usual. But my usage has been 100% for over 5 hours, usually its around 60%. I've tried rebooting. I am using php 4.3.8 and mysql 4.0.23. Here are my stat pages:
http://www.goosemoose.com is the site
http://www.goosemoose.com/phpinfo.php
http://209.216.209.81/wistatus has apache stats
here is a recent top while maxed at supposedly at 100%
Quote
52 processes: 48 sleeping, 2 running, 2 zombie, 0 stopped
CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
           total   22.0%    0.0%    6.4%   0.0%     0.0%    0.0%  370.8%
           cpu00   10.7%    0.0%    4.0%   0.0%     0.0%    0.0%   85.2%
           cpu01    2.2%    0.0%    0.2%   0.0%     0.0%    0.0%   97.5%
           cpu02    5.1%    0.0%    1.4%   0.0%     0.0%    0.0%   93.4%
           cpu03    3.3%    0.0%    0.7%   0.0%     0.0%    0.0%   95.9%
Mem:  8275180k av, 7762648k used,  512532k free,       0k shrd, 2159116k buff
      2936816k active,            3792868k inactive
Swap: 16386292k av, 1122200k used, 15264092k free                 2143924k cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
7122 apache    18   0     0    0     0 Z     1.7  0.0   0:00   0 httpd <defunct>
13282 root      13   0  1072 1072   740 R     1.1  0.0   0:06   0 top
20631 mysql      9   0 32628  31M  3444 S     0.1  0.3   0:19   0 mysqld
    1 root       8   0   460  460   412 S     0.0  0.0   0:04   1 init
21529 root       9   0   544  544   468 S     0.0  0.0   0:01   0 syslogd
21893 named      9   0  2520 2516  1940 S     0.0  0.0   0:01   1 named
22259 root       9   0  1524 1524  1392 S     0.0  0.0   0:01   3 sshd
25401 root       9   0  4984 4980  4828 S     0.0  0.0   0:03   2 httpsd
25811 root       8   0   580  580   508 S     0.0  0.0   0:01   3 crond
26003 root       9   0   684  684   588 S     0.0  0.0   0:00   0 saslauthd
28666 root       0   0 10904  10M 10748 S     0.0  0.1   1:11   1 httpd
20600 root       9   0   948  944   816 S     0.0  0.0   0:00   0 safe_mysqld
7698 psaadm     9   0     0    0     0 Z     0.0  0.0   0:00   3 httpsd <defunct>
3232 root       9   0  2296 2292  1856 S     0.0  0.0   0:00   0 sshd
3980 root       9   0  1168 1168   972 S     0.0  0.0   0:00   3 bash
7595 qmailr     9   0   344  340   260 S     0.0  0.0   0:00   1 qmail-rspawn
12929 qmailr     9   0   956  952   772 S     0.0  0.0   0:00   3 qmail-remote

Here is mysql status
Quote
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6206 to server version: 4.0.23a

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> status;
--------------
mysql  Ver 12.22 Distrib 4.0.23a, for pc-linux-gnu (i686)

Connection id:          6206
Current database:
Current user:           dmaricic@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Server version:         4.0.23a
Protocol version:       10
Connection:             Localhost via UNIX socket
Client characterset:    latin1
Server characterset:    latin1
UNIX socket:            /var/lib/mysql/mysql.sock
Uptime:                 5 hours 54 min 8 sec

Threads: 1  Questions: 219050  Slow queries: 99  Opens: 2055  Flush tables: 1  Open tables: 64  Queries per second avg: 10.309

Here is SHOW FULL PROCESSLIST (it pretty much stays like this 99% of the time)
Quote
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6232 to server version: 4.0.23a

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> SHOW FULL PROCESSLIST;
+------+----------+-----------+-----------------+---------+------+-------+-----------------------+
| Id   | User     | Host      | db              | Command | Time | State | Info                  |
+------+----------+-----------+-----------------+---------+------+-------+-----------------------+
| 6231 | dmaricic | localhost | goosemoose3_com | Sleep   | 5    |       | NULL                  |
| 6232 | dmaricic | localhost | NULL            | Query   | 0    | NULL  | SHOW FULL PROCESSLIST |
| 6234 | dmaricic | localhost | goosemoose3_com | Sleep   | 0    |       | NULL                  |
+------+----------+-----------+-----------------+---------+------+-------+-----------------------+
3 rows in set (0.00 sec)


Anyone understand what here could be causing 100% usage of cpu and memory?

Thanks

[Unknown]

What are your load averages?

Full memory usage, especially with only 256 megs, is normal and not alarming.

-[Unknown]

Goosemoose

My current load averages are:
load average: 0.31, 0.90, 1.43
although they were averaging 3-6 earlier.

[Unknown]

That may be where it's getting it from.  Was this half an hour ago?  If so, it might have been midnight server time, which suggests many things might be scheduled for right them - e.g. updatedb.

-[Unknown]

Goosemoose

The 100% cpu and memory usage has been going on for about 5 hours. The machines are also pacific time so its only 9:30 here.

Goosemoose

Currently memory is only using 50%, but the cpu is still at 100%

[Unknown]

Well, 0.31 isn't that horrid or anything, but it's not awesome.

You do have defunct processes.  Try restarting Apache, MySQL, and etc.

-[Unknown]

Goosemoose

I've done all that. The problem resumes. How can you tell their are defunct process. And does the top seem to equal 100% usage? I look at things from a windows perspective since I'm a windows admin, and I was ripping into my host for things only adding up to 20% usage or so, even though plesk shows 100%.

[Unknown]

Quote from: goosemoose on March 10, 2005, 12:20:20 AM
52 processes: 48 sleeping, 2 running, 2 zombie, 0 stopped

Quote from: goosemoose on March 10, 2005, 12:20:20 AM
7122 apache    18   0     0    0     0 Z     1.7  0.0   0:00   0 httpd <defunct>

Zombies are not good things to be waltzing about.  However, the Apache status doesn't suggest that high of load:

http://209.216.209.81/wistatus

I do notice you're still on RC2..... but still, you shouldn't be having these sorts of server problems, especially with just 23 users online.

But, Windows isn't Linux.  Linux generally utilizes ram as well as possible, because swap is obviously slow.  I'm not the best expert on Linux, though, although I can guess from your specs that a bit more ram might help.

-[Unknown]

Goosemoose

I'm actually using 1.0.1 but I'm using an older mambo bridge and I haven't updated the files in the bridge.

Ben_S

What is it thats telling you your cpu useage is at 100%?

Your top output shows the cpu to be pretty nothing.
Liverpool FC Forum with 14 million+ posts.

Advertisement: