Forum Moderators: phranque

Message Too Old, No Replies

Trying to Understand My Server

What is TOP saying to me?

         

carfac

3:12 am on Apr 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HI:

Dangerous situation- relative noob to FreeBSD running his own servers....

That said, I am trying to understand whay my server is telling me in Top. Right now, I show a load average of 1.21 .86 .96, which is a bit bad, as I am understanding LA (that over 1 is bad...)

What is confusing me is the CPU usage... 20-35% user, 2-3 %system and 70-85% idle. I NEVER see more than 50% idle. This would seem to be good.

I have a boat load of mem, it never hits swap.

I usually see 100-120 processes, 2-3 running, 90 or so sleeping, and an ocassional Zombie.

I am running an Apache front, and two Mod_perl Back servers- usually 80 or so front servers, 5 or so on each back.

So why is my LA high? SHould I be worried? What should I do?

Thanks!

Dave

bxbase

3:28 am on Apr 8, 2006 (gmt 0)

10+ Year Member



Hi carfac

you probably allready know this but many things have a man page
type man top
for info on top it might not answer your question but you might learn a bit more about it.

for a good site about freebsd google freebsd diary.

Whats the amount of traffic you do per month and maybe i can compare it to my freebsd box.

I am far from an expert on freebsd.

You can type i while in top to not display idle process maybe you can see which process is using the cpu.
You can also type u and the user to just display that user, standerd setup probably has www as the httpd user.

carfac

3:43 am on Apr 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you- yes, my first stop is the man pages... then google! I guess I was just hoping someone knew more about how they interrelate...

sja65

3:41 pm on Apr 9, 2006 (gmt 0)

10+ Year Member



Think of your load average as the number of processes waiting to run. If you are running at 0, everything always runs immediately, the bigger the number, the more you are waiting for other processes to finish before new processes can be run.

Your CPU usage stats show 70-85% idle, so you are probably not waiting for your CPU. Instead, some other piece of hardware is in use. As an example take a really big file and copy it to another location on the harddrive while watching top. You will probably see your load average increase but your CPU load decrease. Another thing that could cause numbers like this is a piece of hardware that frequently checks interrupts.

carfac

5:06 pm on Apr 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



saj:

Thanks! Now I have to figure out what that is... but I have a better feel for what is going on- thanks!

dave

dmorison

5:31 pm on Apr 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My understanding is that Load Average is "ok" up to around (10 * number of processors). The following is the "top" output from one of my servers that is handling around 150 hits per second, and to visit the site you wouldn't have any reason to believe it was under "stress".


top - 17:29:31 up 20 days, 21:48, 1 user, load average: 13.58, 13.18, 12.97
Tasks: 109 total, 12 running, 96 sleeping, 0 stopped, 1 zombie
Cpu(s): 70.9% us, 28.1% sy, 0.0% ni, 0.0% id, 0.3% wa, 0.7% hi, 0.0% si
Mem: 483688k total, 473136k used, 10552k free, 8348k buffers
Swap: 2096472k total, 30416k used, 2066056k free, 369020k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4143 mysql 15 0 56232 19m 1960 S 13.1 4.1 3530:47 mysqld-max
23823 mysql 17 0 56232 19m 1960 R 10.5 4.1 0:00.36 mysqld-max
17576 apache 16 0 34040 18m 7108 S 9.6 4.0 0:00.59 httpd
31056 apache 15 0 24952 9.9m 7108 S 2.6 2.1 0:02.77 httpd
1229 apache 15 0 24980 9.9m 7108 S 2.6 2.1 0:02.41 httpd
12941 apache 15 0 25024 9.9m 7108 S 2.6 2.1 0:01.40 httpd
21994 apache 16 0 25024 9.9m 7132 S 2.2 2.1 0:04.57 httpd
6947 apache 16 0 25020 9.9m 7108 S 2.2 2.1 0:01.78 httpd
13518 apache 15 0 25040 9.9m 7108 S 2.2 2.1 0:01.15 httpd
4140 mysql 21 0 56232 19m 1960 R 1.9 4.1 192:51.56 mysqld-max
31057 apache 16 0 24980 9.8m 7108 S 1.9 2.1 0:02.71 httpd
7059 apache 15 0 25048 9.9m 7120 S 1.9 2.1 0:01.68 httpd
11635 apache 16 0 24980 9.9m 7108 S 1.9 2.1 0:01.82 httpd
12225 apache 15 0 25024 9.9m 7108 S 1.9 2.1 0:01.60 httpd
16456 apache 16 0 24980 9.9m 7108 S 1.9 2.1 0:00.95 httpd
21479 apache 15 0 25072 9.9m 7108 S 1.9 2.1 0:00.53 httpd
1498 apache 15 0 25868 10m 7108 S 1.6 2.3 0:02.33 httpd