Top
- 1 o'clock, see if each CPU is balanced, see if the usage distribution of each CPU is reasonable
- See load average (average of 1 minutes, 5 minutes, 15 minutes ago to present)
- Look at the use of memory
- See number of processes running, sleep
- M look at the memory footprint of each process
Iostat-x 1
Look at the CPU iowait and idle.
The key is r/s,w/s per second read and write frequency and volume
Average data size and Io Queue Length (reference only)
In combination with Await_time, the service time of SVCTM each IO operation, the former is much larger than the latter problem.
Vmstat 2
The number of R in Procs is greater than the number of CPUs, note
b indicates the number of blocked processes, that is, the number of processes waiting on the resource, such as waiting for I/O, or memory exchange, etc.
If the value of SWPD is not 0, or larger, for example, more than 100m, as long as si, sothe value of long-term 0, system performance or normal
If the cache is large, it indicates that there are more files using the cache, if the bi is small in IO, the file system is more efficient .
Si reads the size of the virtual memory from the disk per second, if the value is greater than 0, the physical memory is not enough or the memory leaks, to find the consuming memory process to solve
The number of blocks received by BI block devices per second, where the block device refers to all the disks and other block devices on the system, the default block size is 1024byte
In CPU interrupts per second, including time
CS per second The number of context switches, for example, we call the system function, we need to do context switching, thread switching, but also the process context switch
Tcp
Cat/proc/net/snmp | grep TCP:
Tcp:rtoalgorithm rtomin rtomax maxconn activeopens passiveopens attemptfails estabresets CurrEstab InSegs OutSegs Retrans Segs Inerrs outrsts
Tcp:1 200 120000-1 78447 413 50234 221 3 5984652 5653408 156800 0 849
Retransmission rate = Retranssegs/outsegs
Internet
Netstat-tan | grep ': 80 ' | awk ' {print $6} ' | Sort | Uniq-c
Netstat-nt | awk '/^tcp/{++state[$NF]} END {for (key in) print key, "\ T", State[key]} '
Linux Server Performance Analysis