Tech Support > Operating Systems > Linux / Variants > Very high system load with Apache and Mysql
Very high system load with Apache and Mysql
Posted by Mike Dross on February 18th, 2004


Hi,

I am running Red Hat 8 on 933MHZ Intel system 512 mb of ram. I am also
running a Vbulletin Board software package. We average about 200 concurrent
users. I am having a strange problem with the load on the system. It will
be fine around 1 or 2 but will shoot up to over 50 at times. I can't figure
out what is causing this. Below is a snapshot of 'top' when the load was high.
Is there something I need to adjust with apache or mysql?

---------------------------------------------------------------------------
12:15am up 1 day, 1:35, 1 user, load average: 53.59, 28.80, 17.11
303 processes: 257 sleeping, 45 running, 1 zombie, 0 stopped
CPU states: 50.7% user, 31.6% system, 0.0% nice, 17.5% idle
Mem: 505916K av, 443744K used, 62172K free, 0K shrd, 2484K buff
Swap: 1020116K av, 821860K used, 198256K free 117048K cached

PID USER PRI NI SIZE RSS SHARE STAT %CPU %MEM TIME COMMAND
21710 root 15 0 6856 5280 5044 S 99.9 1.0 11:16 httpd
24037 mysql 15 0 27708 16M 2500 S 41.4 3.3 0:48 mysqld
28352 root 15 0 1244 1216 808 R 2.1 0.2 0:13 top
28943 mailman 15 0 2768 2768 1660 R 1.0 0.5 0:00 python
28942 mailman 15 0 2924 2924 1700 R 0.8 0.5 0:00 python
1042 wxp 16 0 16204 11M 640 R 0.6 2.3 36:51 pqact
27939 apache 15 0 0 0 0 Z 0.6 0.0 0:02 httpd <defunct>
1 root 15 0 472 436 420 S 0.0 0.0 0:13 init
2 root 15 0 0 0 0 SW 0.0 0.0 0:00 keventd
3 root 15 0 0 0 0 SW 0.0 0.0 0:13 kapmd
4 root 34 19 0 0 0 SWN 0.0 0.0 1:11 ksoftirqd_CPU0
5 root 15 0 0 0 0 SW 0.0 0.0 0:27 kswapd
6 root 15 0 0 0 0 SW 0.0 0.0 0:00 bdflush
7 root 15 0 0 0 0 RW 0.0 0.0 0:50 kupdated
8 root 16 0 0 0 0 SW 0.0 0.0 0:00 mdrecoveryd
13 root 15 0 0 0 0 SW 0.0 0.0 0:35 kjournald
106 root 17 0 0 0 0 SW 0.0 0.0 0:00 raid1d
109 root 15 0 0 0 0 SW 0.0 0.0 0:00 kjournald
110 root 15 0 0 0 0 DW 0.0 0.0 0:48 kjournald
111 root 15 0 0 0 0 SW 0.0 0.0 0:50 kjournald
412 root 15 0 0 0 0 SW 0.0 0.0 0:00 eth0
463 root 15 0 580 544 496 D 0.0 0.1 0:05 syslogd
467 root 15 0 408 360 356 S 0.0 0.0 0:00 klogd
484 rpc 15 0 508 440 436 S 0.0 0.0 0:00 portmap
503 rpcuser 15 0 684 600 596 S 0.0 0.1 0:00 rpc.statd
569 root 15 0 456 412 408 S 0.0 0.0 0:00 apmd
607 root 15 0 1188 948 944 S 0.0 0.1 0:01 sshd
621 root 15 0 744 612 608 S 0.0 0.1 0:00 xinetd
635 root 17 0 500 436 432 S 0.0 0.0 0:00 rpc.rquotad
639 root 15 0 0 0 0 SW 0.0 0.0 0:00 nfsd
640 root 15 0 0 0 0 SW 0.0 0.0 0:00 nfsd
641 root 15 0 0 0 0 SW 0.0 0.0 0:00 nfsd
642 root 15 0 0 0 0 SW 0.0 0.0 0:00 nfsd
643 root 15 0 0 0 0 SW 0.0 0.0 0:00 nfsd
644 root 15 0 0 0 0 SW 0.0 0.0 0:00 nfsd
645 root 15 0 0 0 0 SW 0.0 0.0 0:00 nfsd
646 root 15 0 0 0 0 SW 0.0 0.0 0:00 nfsd
647 root 17 0 0 0 0 SW 0.0 0.0 0:00 lockd
648 root 18 0 0 0 0 SW 0.0 0.0 0:00 rpciod
654 root 17 0 536 456 452 S 0.0 0.0 0:00 rpc.mountd

Posted by Michael Heiming on February 18th, 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike Dross <supercell@carolina.rr.com> wrote:
[..]

Already tried the M$ solution?


What are those running, probably httpd childes?

Never saw apache, with 99.9% CPU unless some .cgi or alike
freaked out and was probably buggy. I'd check those after
restarting apache. You want to look at disk I/O (iostat/vmstat)
system CPU usage is a bit high. Perhaps there's an update for
the sw you are running, the app smells.

Good luck

- --
Michael Heiming (GPG-Key ID: 0xEDD27B94)

Remove +SIGNS and www. if you expect an answer, sorry for
inconvenience, but I get tons of spam.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAM+D8AkPEju3Se5QRAj3XAKC/yoO0i1bwHsXBbSuAB1QEwhZhqQCgyCli
zz7A9oIigLo8qCb6N8MYmro=
=a231
-----END PGP SIGNATURE-----

Posted by Christopher Browne on February 18th, 2004


Centuries ago, Nostradamus foresaw when Michael Heiming <michael+USENET@www.heiming.de> would write:
This also seems as though it may be consistent with MySQL's handling
of large numbers of concurrent connections.

MySQL may be quicker than other options if you only have 1 update
process at a time, and maybe a _few_ concurrent query processes. But
it very much likes to lock resources, which sets you up for slowdowns
and deadlocks when the number of users rises higher than, well, 1...
--
"cbbrowne","@","acm.org"
http://cbbrowne.com/info/advocacy.html
"I don't mean to alarm you, but your pants are talking to you..."
-- Catherine, Babylon 5

Posted by Nick Landsberg on February 19th, 2004




Michael Heiming wrote:

Is this a multi-CPU system? The %CPU reported for
httpd is then percentage of a single CPU.

The totals reported just above this
indicate that the total system is about
82% utilized (still very high, way too high
for my liking).

This would mean that httpd was taking up 100% of
a single CPU and, assuming 2 CPU's, the other
one is running about 60%.


--
Ñ
"It is impossible to make anything foolproof because fools are so
ingenious" - A. Bloch



Similar Posts