Detailed introduction to linux performance monitoring

Source: Internet
Author: User

Networks are the most difficult to monitor in all subsystems. First, because the network is abstract, and more importantly, many factors that affect the network are not within our control. Introduction to Linux performance monitoringPerformance TuningThe purpose is to findSystemAnd adjust the system to eliminate these bottlenecks.
In Linux performance monitoring, we focus on monitoring the system at once:
1. CPU
2. Memory
3. IO
4. Network
However, these systems are dependent on each other and cannot only look at one of them. When a system is overloaded, it may cause problems of other subsystems, for example:
-> A large number of IO requests (page-in IO) read into the memory will use up the memory queue;
-> A large amount of network traffic may overload the CPU;
-> High CPU usage may be processing idle memory queues;
-> A large number of disk reads and writes consume CPU and IO resources.
WeTestIn general, it can be divided into two types:
First, IO Bound, this type of system will consume a lot of memory and the underlying storage system, it does not consume too much CPU and network resources (unless the system is network ). the IO bound system consumes CPU resources to accept IO requests and then enters the sleep state.DatabaseIt is generally regarded as an IO bound system.
Second, CPU Bound: these systems consume a lot of CPU resources. They often perform a lot of mathematical computing. High-throughput Web servers and Mail servers are generally considered as CPU Bound systems.
InPerformance TestingThe first thing to do is to establish Baseline, so that subsequent adjustments will have a reference standard. it is worth noting that the system must work normally when testing the baseline.
Common Linux performance monitoring tools include:
ToolDescription
BaseRepository
VmstatAll purposePerformanceTool
Yes
MpstatProvides statistics per CPU
No yes
SarAll purpose performance monitoring tool
No yes
IostatProvides disk statistics
No yes
NetstatProvides network statistics
Yes
DstatMonitoring statistics aggregator
No in most distributions
IptrafTraffic monitoring dashboard
No yes
EthtoolReports on Ethernet interface configuration
Yes
These tools can be installed during Linux installation.
The following is an example of the baseline generated by vmstat:
# Vmstat 1
Procs memory swap io system cpu
R B swpd free buff cache si so bi bo in cs us sy wa id
1 0 138592 17932 126272 214244 0 0 1 18 109 19 2 1 96
0 0 138592 17932 126272 214244 0 0 0 105 46 0 1 0 99
0 0 138592 17932 126272 0 0 0 214244 62 40 14 0 45
0 0 138592 17932 126272 0 0 0 214244 49 0 0 117
0 0 138592 17924 126272 214244 0 0 176 220 3 4 13 80
0 0 138592 17924 126272 214244 0 0 0 358 8 17 0 75
1 0 138592 17924 126272 214244 0 0 0 368 4 24 0 72
0 0 138592 17924 126272 214244 0 0 0 352 9 12 0 79
# Vmstat 1
Procs memory swap io system cpu
R B swpd free buff cache si so bi bo in cs us sy wa id
2 0 145940 17752 118600 215592 0 1 1 18 109 19 2 1 96
2 0 145940 15856 118604 215652 0 0 468 789 86 14 0 0
3 0 146208 13884 118600 214640 0 360 360 71 91 9 0 0
2 0 146388 13764 118600 213788 0 340 340 41 87 13 0 0
2 0 147092 13788 118600 212452 0 740 1324 61 92 8 0 0
2 0 147360 13848 118600 211580 0 720 720 41 96 4 0 0
2 0 147912 13744 118192 210592 0 720 720 605 44 95 5 0 0
2 0 148452 13900 118192 209260 0 372 372 639 45 81 19 0 0
2 0 149132 13692 117824 208412 0 372 372 47 90 10 0 0

  1. About Swap space management in Linux
  2. Partition Rules for swap in linux
  3. 2 GB virtual memory Linux swap restrictions
  4. In-depth exploration of Linux SNMP-Managed Devices
  5. There are two methods for collecting data in Linux SNMP:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.