Performance testing server bottlenecks roadmap

Performance testing, the indicators for monitoring the server is also very important aspect. By monitoring the server performance analysis, you can locate performance bottlenecks.

Back-end performance indicators CPU, memory, network, disk I / O queues, etc.

Also we need to focus on back-end configuration of middleware, such as Tomcat redis message queue server load balancing ngnix  

Master configuration parameters from the database, you need to understand and monitor information and so on ......

 

Server bottleneck analysis need to understand the composition of the overall structure of the project is available to better analyze performance bottlenecks as well as things to be concerned about

 

 

Ideas analysis

  Overall system CPU utilization

  Memory Usage

  Disk I / O utilization and latency

  Network utilization

 

 

The following are commonly used command performance test environment server

CPU Positioning Analysis

CPU utilization is greater than 50%, need to pay attention; greater than 75%, need to pay close attention; more than 90% -95%, the situation is more serious;

Monitoring command: vmstat, sar, dstat, mpstat, top, ps

Types of Measurement Methods Metrics
Utilization

1, vmstat statistics 1-% idle

2, sar -u statistical 1-% idle

3, dstat statistical 1-% idl

4, mpstat -P ALL statistics 1-% idle

 

Note> = 50%

Alarm> = 70%

Serious> = 90%

Full  

1, vmstat the r values> cpu logical number of stars

2, SAR -q, " the runq-SZ "> logical CPU number of stars

 

 When the run queue is greater than 1, it has demonstrated a certain load

 

 

 

 

 

 

 

 

 

 

 

Memory location analysis

When the physical memory is not enough, it will use the swap partition, so the performance testing process need to focus on the use of swap and mem.

Not enough physical memory, replaced a lot of memory to swap space, and CPU bottlenecks could lead to I / O's.

Monitoring command: vmstat, sar, dstat, free, top, ps, etc.

Types of

Measurement Methods

Labeling measure

Occupancy rate

1, free view usage

2、vmstat

3 sar -r

4、ps

Note> = 50%

Alarm> = 70%

Serious> = 80%

Full

1, vmstat the si / so ratio, swapd accounting

2, sar -W view times missing pages

3、dmesg | grep killed

1, so a large value, and has high proportion swapd, memory has been saturated

2, sar command times mean missing pages and more memory is saturated

3, not enough memory OOM mechanism will trigger the kernel

 

 

 

 

 

 

 

 

 

 

 

Network location analysis

Monitoring command: sar, ifconfig, netstat, and dev rate view of the net.

Send and receive packets found by looking at the card throughput reaches the maximum limit, network data packets because of packet loss due to such reasons, blocking and other phenomena are likely to prove the current network bottlenecks.

To reduce the impact on network performance testing, we generally are tested to perform in the LAN.

Types of Measurement Methods Metrics
Usage

1, sar -n DEV transceiver count is greater than the upper limit of the card

2, ifconfig RX / TX card exceeds the upper limit Broadband

3, the rate of cat / proc / net / dev exceeds the upper limit

4, nicstat substantially the full load util

1, NIC throughput transceiving packets reaches an upper limit

2, there is a delay

3, packet loss

4, there is obstruction

Full

1, ifconfig dropped there count

2, netstat -s "segments retransmited" has counted

3, sar -n EDEV, rxdrop / s txdrop / s with a count

Packet loss statistics
error

1、ifconfig,“errors”

2、netstat -i,RX-ERR TX-ERR

3、sar -n EDEV,rxerr/s   txerr/s 

4、ip -s link, “errors”

There error count   

  

 

 

 

 

 

 

 

 

 

 

 

 

 

IO positioning analysis

I / O read and write frequently, when, if the I / O are not met will lead to blocking applications.

Need to consider the I / O of TPS, average I / O data, the average queue length, average service time, average wait time, IO utilization (Disk Busy Time%) and other indicators

Monitoring command: sar, iostat, iotop

Types of Measurement Methods Metrics
Usage

1、iostat -xz,“%util”

2 sar -d "% util"

3、cat /proc/pid/sched | grep iowait

Note> = 40%

Alarm> = 60%

Serious> = 80%

Full

1、iostat -xnz,“avgqu-sz ”>1

2、iostat await>70

IO疑似满载
错误

1、dmseg 查看io错误

2、smartctl /dev/sda

有错误信息
 
 

Guess you like

Origin www.cnblogs.com/mumulog/p/11455018.html