Re: How analyze the system bottleneck using shell tools



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
.



Relevant Pages

  • Re: X performance
    ... >> under my linux X. ... But saving memory or CPU cycles are ... The memory it nominally consumes will be reclaimed pretty soon as it ... Red Hat 8or 9 may have increased memory needs. ...
    (comp.os.linux.misc)
  • Re: choices regarding where to place code - in the database or middletier
    ... now that we finally have the gear (CPU and memory) and network ... write text files and provides network interfaces can exchange XML ...
    (comp.lang.java.programmer)
  • Re: Odd performance problems after upgrade from 4.11 to 6.0-Stable
    ... After the upgrade, the system performs poorly. ... job produced minimal CPU utilization and little progress. ... My network link only ran at 3.4 Mbps (yes, that's bits, not ... runs out of memory and starts to use the swap file. ...
    (freebsd-stable)
  • Re: Much Anticipated?
    ... And, Windoze gets bigger, slower, and buggier at every ... I've seen performance for CPU, memory, and disk access go like ... Sorry, but for me, Linux is still not ready for prime time on ...
    (microsoft.public.windowsxp.general)
  • Re: [FC4] System locks up when booting installation DVD
    ... be of help if you'd describe your system (motherboard make, hard drives, ... Doesn't matter whether I boot 'linux' or 'linux text'. ... CPU: Athlon XP ... Memory: 256 MB ...
    (Fedora)