Re: How analyze the system bottleneck using shell tools
- From: Maxwell Lol <nospam@xxxxxxxxxxx>
- Date: 29 Sep 2007 07:08:57 -0400
Bo Yang <struggleyb@xxxxxxxxx> writes:
Hi,
I think the subject has something to do with Linux shells. I have a
Linux Debian system in which there is a bbs system running there. And
I find that when the online users is up to 4000, the system will slow
down. I am now just hoping to find a way to test which is the main
reason for this.
I know, the question description is too simple to have the concrete
anwsers. And I understand that finding the real problems is not an
easy thing. So, here, could you please tell me some cool tools used to
find the real problem?
There are several possible bottlenecks, and tools you can use to examine these issues.
I like "top" in general (for a text terminal) or "gkrellm" for a
graphic overview.
You have to determine if it's I/O, memory, network or CPU.
first - do "uptime" and look at the last three numbers. This is the
load average for 1, 5 and 15 minutes. If the numbers decrease, then
you have a spike in the number of jobs running. Learn what numbers are
typical, and what are high. Small spikes are okay. If the number of
jobs is large, everything will slow down.
For memory, run
vmstat 10
this will update every 10 seconds (the argument).
Look at the CPU, and see if the CPU is busy with system, user or idle.
If the CPU is busy, then you have to see what is happening. If the
time is high in system, then it's OS related, and not your
application. A typical thing is if it has to do a lot of virtual
memory management, or network stuff.
The "free" memory will always be low. Unix likes to be efficient, and
having memory and not using it is silly. What's more important is
"si" - swap in. If this jumps up, then you may be low in memory.
That says the system has to load pages from disk into memory a lot.
Memory is the cheapest way to upgrade a CPU.
Other values, like "cs" context switch - might also be an issue.
Next, look at the disk values. Drat. I don't see iostat on my linux box.
What's the equivalent?
For network issues, try netstat -s
But network issues is hard to diagnose.
Hope this helps
.
- References:
- How analyze the system bottleneck using shell tools
- From: Bo Yang
- How analyze the system bottleneck using shell tools
- Prev by Date: Re: compair multiple variable need more help..
- Next by Date: Re: compair multiple variable need more help..
- Previous by thread: Re: How analyze the system bottleneck using shell tools
- Next by thread: Re: How analyze the system bottleneck using shell tools
- Index(es):
Relevant Pages
|