LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Server Load Times High, help? (https://www.linuxquestions.org/questions/linux-newbie-8/server-load-times-high-help-551314/)

Networks 05-04-2007 01:43 PM

Server Load Times High, help?
 
Code:

top - 11:38:33 up  9:16,  1 user,  load average: 5.68, 6.34, 6.83
Tasks: 139 total,  12 running, 127 sleeping,  0 stopped,  0 zombie
Cpu(s): 87.1% us,  8.3% sy,  0.0% ni,  0.0% id,  0.0% wa,  0.0% hi,  4.6% si
Mem:  1033080k total,  891624k used,  141456k free,    60136k buffers
Swap:  2096472k total,        0k used,  2096472k free,  565424k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
17646 apache    16  0 31832  12m 4540 R 10.2  1.2  0:03.52 httpd
17673 apache    16  0 32124  12m 4204 R  9.6  1.2  0:01.32 httpd
17648 apache    16  0 32132  12m 4204 R  8.9  1.2  0:02.88 httpd
17537 apache    16  0 32780  13m 5048 R  8.3  1.4  0:06.08 httpd
17661 apache    16  0 31480  11m 4208 R  7.3  1.2  0:01.44 httpd
17045 apache    16  0 31784  12m 5060 R  5.6  1.3  0:14.25 httpd
17663 apache    15  0 31476  11m 4204 S  5.3  1.2  0:02.59 httpd
17635 apache    15  0 31164  11m 4532 S  4.6  1.2  0:05.39 httpd
17674 apache    16  0 31692  12m 4204 R  4.3  1.2  0:02.17 httpd
17700 apache    16  0 31628  11m 3988 R  4.0  1.2  0:00.12 httpd
17609 apache    15  0 31424  12m 4540 S  3.0  1.2  0:04.44 httpd
17477 apache    15  0 31176  12m 5048 S  2.6  1.2  0:10.32 httpd
17632 apache    15  0 31400  11m 4208 S  2.3  1.2  0:02.89 httpd
17400 apache    15  0 31376  12m 5036 S  2.0  1.3  0:14.24 httpd
17525 apache    15  0 31824  12m 5036 S  2.0  1.3  0:07.22 httpd
17594 apache    15  0 31536  12m 4536 S  1.7  1.2  0:03.30 httpd
17606 apache    15  0 31152  11m 4220 S  1.7  1.2  0:06.25 httpd
17669 apache    15  0 31220  11m 4204 S  1.7  1.2  0:01.76 httpd
17289 apache    15  0 31400  12m 5040 S  1.3  1.3  0:11.29 httpd
17529 apache    15  0 31524  12m 5036 S  1.3  1.3  0:07.43 httpd
17642 apache    15  0 31828  12m 4528 S  1.3  1.2  0:02.91 httpd
17522 apache    15  0 31184  12m 5016 S  1.0  1.2  0:05.38 httpd
17539 apache    15  0 32052  12m 5048 S  1.0  1.3  0:04.42 httpd
17634 apache    16  0 31192  11m 4528 R  1.0  1.2  0:02.75 httpd
17662 apache    15  0 31428  11m 4204 S  1.0  1.2  0:03.36 httpd
17666 apache    15  0 30920  11m 4528 S  1.0  1.2  0:01.69 httpd
17670 apache    15  0 31392  11m 4204 S  1.0  1.2  0:02.03 httpd
17526 apache    15  0 31408  12m 4992 S  0.7  1.3  0:07.59 httpd
17538 apache    15  0 30940  12m 5032 S  0.7  1.2  0:04.60 httpd
17546 root      15  0  2024 1060  804 R  0.7  0.1  0:01.95 top
17568 apache    15  0 30880  11m 4528 S  0.7  1.2  0:04.64 httpd
17574 apache    15  0 31264  12m 4532 S  0.7  1.2  0:05.89 httpd
17639 apache    15  0 31136  11m 4204 S  0.7  1.1  0:02.19 httpd
17671 apache    15  0 31592  12m 4528 S  0.7  1.2  0:02.76 httpd
17152 root      16  0  1720  684  584 R  0.3  0.1  0:06.02 portsentry
17154 root      15  0  1580  324  252 S  0.3  0.0  0:00.58 portsentry
    1 root      15  0  1740  576  500 S  0.0  0.1  0:00.72 init
    2 root      RT  0    0    0    0 S  0.0  0.0  0:00.00 migration/0
    3 root      34  19    0    0    0 R  0.0  0.0  0:00.00 ksoftirqd/0
    4 root      RT  0    0    0    0 S  0.0  0.0  0:00.00 watchdog/0
    5 root      10  -5    0    0    0 S  0.0  0.0  0:00.00 events/0

Any clue what I can do to make those lower? I do host a 6 network PHP proxy site script that is known to be at least bandwidth intensive and perhaps resource intensive. Anything I can do?

Tinkster 05-04-2007 05:55 PM

Hi, and welcome to LQ!

The CPU is high, indeed, as is the load average. What kind of
hardware are we looking at? The load could easily be created
by I/O wait, so the HDD or the network card could be the bottle-
neck, for example.


Cheers,
Tink

Networks 05-04-2007 06:44 PM

Quote:

Originally Posted by Tinkster
Hi, and welcome to LQ!

The CPU is high, indeed, as is the load average. What kind of
hardware are we looking at? The load could easily be created
by I/O wait, so the HDD or the network card could be the bottle-
neck, for example.


Cheers,
Tink

2.0 GHz Intel CPU
1 GB RAM
60 GB Hard Drive
2000 GB Data Transfer

I think the CPU is a Celeron not sure. Any linux command to tell?

Tinkster 05-04-2007 07:59 PM

cat /proc/cpuinfo

syg00 05-04-2007 09:04 PM

So ...
you've got a truckload of apache tasks. Twelve of which (at that time) are on the runqueue - for (presumably) just one CPU.
Then there's likely to be (pending) disk I/O.

All of which contributes to the load averages.

With a CPU% like that, I'd say you're over-committed, but that depends on your work goals.

Networks 05-04-2007 09:13 PM

Well I don't understand why I have so many apache tasks. I am assuming it doesn't have to do with the traffic I get?

What should I do? What's the solution?

Code:

processor      : 0
vendor_id      : GenuineIntel
cpu family      : 15
model          : 2
model name      : Intel(R) Celeron(R) CPU 2.00GHz
stepping        : 9
cpu MHz        : 2000.064
cache size      : 128 KB
fdiv_bug        : no
hlt_bug        : no
f00f_bug        : no
coma_bug        : no
fpu            : yes
fpu_exception  : yes
cpuid level    : 2
wp              : yes
flags          : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe up cid xtpr
bogomips        : 4005.24


Tinkster 05-05-2007 12:37 AM

Upgrade the hardware? Get a real CPU and maybe SCSI disks?

You could look at the output of vmstat for a while to establish
whether the bottleneck is indeed the disk-I/O, or whether the
CPU just can't cope with what's being thrown at it.


Cheers,
Tink


All times are GMT -5. The time now is 10:18 PM.