In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1 introduction to Perfmon
Perfmon (Performance Monitor) is a performance monitoring tool that comes with Windows, which provides graphical real-time system performance monitor, performance log and alert management. Hundreds of metrics of CPU, memory, network, disk, process and other objects can be monitored by adding performance counters (Performance Counter). Among them, the performance log can define the output format as binary files, text files, SQLSERVER records, etc., to facilitate the subsequent use of third-party tools for analysis.
2 Perfmon usage
Perfmon supports selective monitoring of performance counters of interest, with a wide range of metrics, fine granularity, and persistence of monitoring data. Of course, if you only focus on key performance metrics (cpu, mem, io, net), you can also look at Resource Manager (Resmon.exe) directly. This article mainly introduces the general method of using Perfmon for performance monitoring. For more details, please refer to other documents, such as Microsoft official documentation or Perfmon help documentation:
Https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc749249(v=ws.11)
2.1 how to use Perfmon
Perfmon is a tool that comes with windows. You do not need to install it and type the command to open the tool. The specific steps are as follows:
1. Start-> search for programs and files, enter perfmon, and enter to open the tool.
two。 Double-click performance Monitor on the left navigation bar, then right-click or "+" in the right pane, and select add counter, as shown in the figure:
3. In the "performance object" list, select the counter to be monitored, and then add it for real-time monitoring. As shown in the figure, select the counter to monitor cpu:
After the monitoring counter is added, you can view the real-time changes in the graph. For example, the counter% Processor Time represents the utilization of cpu. From the chart, you can see the latest, average, minimum and maximum values, as well as the monitoring duration, where the duration refers to the time span of the current configuration displayed in the chart, not the time that has been monitored. The configuration can be configured in the right-click icon-> Properties-> General-> duration. In addition, by right-clicking on the monitoring chart, you can operate the calculator, such as add, delete, hide, save, change properties and so on.
2.2 Perfmon monitoring objects and metrics
As described in the previous section, you can now use Perfmon for real-time monitoring, and you may still be confused about the performance objects and performance counters in the description. Generally speaking, performance objects are the resource objects you want to monitor directly, such as cpu,mem, etc., and some metrics are needed to measure the performance of these objects, that is, performance counters. Perfmon supports monitoring a variety of performance objects, each of which provides a more comprehensive performance counter. Performance objects, common performance objects, and counters, as shown in the following table:
Table 1 performance object description
Performance object
Information provided
Browser
Browser performance object consists of counters that measure notifications, enumerations, and other browser transfer rates
Cache
Cache performance object includes supervising file system caching (the portion of physical memory that stores recently used data for as long as possible so that it no longer needs to be read from disk when accessing that data.) The counter of. Because the application only uses the cache, the cache can be used as an indicator of the application's Icano operation. The cache can grow when there is enough memory, but when there is not enough memory, the cache becomes too small to be used.
Distributed Transaction Coordinator
Microsoft Distributed Transaction Coordinator performance counter
ICMP
ICMP performance object includes counters that measure the speed at which messages are sent and received using the ICMP protocol. It also includes counters that monitor ICMP protocol errors.
IP
IP performance object includes counters that measure the speed of IP datagrams sent and received using the IP protocol. It also includes monitoring IP protocol error counters.
Job object
A report of account and processor usage data collected by the job object named by each activity.
Job object Detail
Job object Detail displays detailed operational information about activity processing in the job object.
Logical Disk
Logical Disk performance object contains counters that monitor the logical partition of a hard disk or fixed disk drive. Performance Monitor uses the drive letter of the logical disk (such as: C) to identify the logical disk.
Memory
Memory performance object consists of counters that describe the behavior of physical and virtual memory on a computer. Physical memory refers to the number of random access memories on a computer. Virtual memory consists of physical memory and space on disk. Many memory counters monitor page scheduling (the movement of code and data pages between disk and physical memory). Excessive page scheduling (a manifestation of insufficient memory) can cause procrastination and affect the processing efficiency of the entire system.
NBT Connection
NBT Connection performance object includes counters that measure the rate at which bytes are sent and received over an NBT connection between a local computer and a remote computer. The connection is identified by the name of the remote computer.
Network Interface
Network Interface performance object includes counters that measure the rate at which bytes and packets are sent and received over an TCP/IP network connection. It includes counters that monitor connection errors.
Objects
Object performance object contains counters that supervise logical objects in the system, such as processing, threads, multi-user terminal execution programs, and semaphores. This information can be used to detect unnecessary consumption of computer resources. Each object requires memory to store basic information about the object.
Paging File
Paging File performance object includes counters that monitor paging files on your computer. A paging file refers to the disk space reserved for backing up physical memory used on your computer.
Physical Disk
Physical Disk performance object contains counters that monitor hard drives or fixed disk drives on your computer. The disk is used to store files, programs, and paging data and retrieve these items by reading and changing them through record writes. The value of the physical disk counter is the sum of the values of the logical disk (divided by disks).
Print Queue
Displays the operation statistics of a print queue.
Process
Process performance object contains counters that monitor running applications and system processing. All threads in one process share the same address space and can access the same data.
Processor
Processor performance object contains counters that measure aspects of processor activity. A processor is the part of a computer that performs arithmetic and logical calculations, initiates operations in accessories, and runs processing threads. A computer can have multiple processors. The processor object uses each processor as an example of the object.
Processor performance
Processor information
PSched Pipe
Pipeline statistics in the packet scheduler
RAS Port
The RAS Port performance object includes counters that monitor each remote access service port of the RAS device on the computer.
RAS Total
RAS Total performance object contains counters that add up the values of all ports of the remote access Service (RAS) device on your computer.
Redirector
Redirector performance object includes counters that monitor network connections on the local computer.
RSVP
RSVP service performance counters.
System
System performance object contains counters that apply to more than one component processor example on a computer.
TCP
TCP performance object contains counter variables that measure the rate of sending and receiving TCP Segment using the TCP protocol. It contains counter variables that monitor the number of TCP connections per TCP connection state.
Telephony
Telephone service system
Terminal Services
Terminal Services information.
Terminal Services Session
Resource supervision for each Terminal Services session.
Thread
Thread performance object includes counters that measure thread behavior. A thread is the basic object that executes instructions on a processor. All running processes have at least one thread.
UDP
UDP performance object contains counters that measure the rate at which UDP datagrams are sent and received using the UDP protocol. It includes counters that monitor UDP protocol errors.
WMI Objects
WMI high-performance provider returned by the WMI adapter
The performance objects in the above table have as many as hundreds of performance metrics, and if you install the .NET Framework, you will see more .NET-starting objects. When we pay attention to the performance of the system or application, it is impossible and unnecessary to pay attention to so many indicators, we just need to select the necessary indicators according to the actual situation. Generally speaking, for Windows system or applications running on it, key objects such as CPU, Memory, Disk, Network and so on are indispensable.
Table 2 Common performance objects and counters
Performance object
Counter
Information provided
Processor
% Idle Time
% Idle Time is the percentage of time that the processor is idle during the sampling period
Processor
% Processor Time
% Processor Time is the percentage of time that the processor spends executing non-idle threads. The method of calculation is to measure the time of non-idle thread activity in the sample interval and subtract the value from the sample interval. This counter is the main illustrator of processor activity, showing the average percentage of busy hours observed during the sample interval.
Processor
% User Time
% User Time refers to the percentage of time that the processor is in user mode. User mode is a limited processing mode designed for applications, environment subsystems, and integer subsystems.
Memory
Available Bytes
Available Bytes shows the total amount of physical memory currently free. When this value becomes smaller, Windows starts calling disk page files frequently. If this number is small, for example, less than 5 MB, the system will spend most of its time manipulating the page file.
Memory
% Committed Bytes in Use
% Committed Bytes In Use is the ratio between Memory: Committed Bytes and Memory: Commit Limit. (Committed memory refers to physical memory in use that has reserved space in the paging file if you need to write to disk. Commit Limit is determined by the size of the paging file. If the paging file is enlarged, the ratio will be reduced. This counter shows only the current percentage; not an average.
Memory
Page Faults/sec
Page Faults/sec is the overall rate at which the processor processes error pages. Calculated with the number of error pages per second. A page error that occurs when a processor requests code or data that is not in its working set (space in physical memory). This counter includes hard errors (those that require disk access) and soft errors (error pages found elsewhere in physical memory). Many processors can continue to operate with a large number of soft errors. However, hard errors can lead to significant procrastination. This counter displays the value obtained by dividing the difference between the values observed in the previous two instances by the duration of the instance interval.
Network Interface
Bytes Total/sec
Bytes Total/sec is the rate at which bytes are sent and received, including frame characters.
Network Interface
Packets/sec
Packets/sec is the rate at which packets are sent and received.
Physical Disk
% Busy Time
% Busy Time is the percentage of time that the disk drive is busy servicing read or write requests.
Physical Disk
Avg. Disk Queue Length
Avg. Disk Queue Length is the average length of the disk queue. The time it takes for a disk to complete the processing of read and write requests is an external manifestation of disk data throughput.
Physical Disk
Current Disk Queue Length
Current Disk Queue Length refers to the number of requests that were outstanding on disk when collecting operational data. It includes requests that are being serviced when the memory is snapped. This is an average of immediate length rather than regular intervals. A multi-spindle disk device can have multiple request operations at a time, but other simultaneous requests are waiting services. This counter may reflect a temporary high or low queue length, but if there is a continuous load on the disk drive, the possible value will always be high. The request wait time is proportional to the length of the queue minus the spindle on disk. This difference should be less than 2 to maintain good performance.
2.3 use counter Log
Section 2.1 introduces the use of Perfmon performance Monitor, which is mainly used for real-time monitoring of specified performance indicators (similar to nmon interaction mode), but it can not save the monitored data. If you need to continuously monitor the specified performance indicators of the system, you need to use the counter log function of Perfmon (analogy nmon background monitoring mode). The counter log can save the monitoring data in a specified way, and it is also convenient for subsequent analysis with third-party tools.
Next, take monitoring CPU\ MEM as an example to introduce how to use the Perfmon counter log.
1. In the right navigation pane of Perfmon, expand data Collector set, right-click user defined, point to New, and then click data Collector set, which will launch the create New data Collector set wizard
two。 Enter the name of the collector, select "manually create (Advanced)", and click next to enter the Select data Type Wizard, as shown in the figure:
3. Select "performance counter", click next to enter the performance counter selection interface, and add the performance counter of CPU\ MEM by clicking the "add" button. At the same time, you can customize the sampling interval according to the collection time. The default is 15s, as shown in the figure:
4. If you need to customize the location of the log, you can click "next", otherwise you can directly click "finish" to end the configuration.
5. In addition, you can right-click the collector set name, select Properties, and configure the start and stop conditions for monitoring tasks, such as configuring scheduled tasks or exit conditions. As shown in the figure, stop after 30 seconds of collection:
6. If you need to adjust the monitoring performance metrics, log format, sampling time, etc., you can right-click the data collection task, select attributes, and edit it. You can add and delete counters, modify the log format (default binary .blg), and modify the sampling interval, as shown in the figure:
7. Finally, click the toolbar to start the data collector
8. After the results are collected, you can select reports on the right navigation bar and expand user customization to view the report, or you can select the log file to load through the View Log data of the performance Monitor.
3 Perfmon performance analysis method
This section mainly introduces the general ideas and methods of using Perfmon to monitor and analyze the performance of CPU, MEM, disk I\ O and NET.
1. CPU analysis method
According to Section 2.2, the main performance counters involved in CPU monitoring are% Processor Time,% User Time, and System:Processor Queue Length. Among them, the value of the% Processor Time performance counter shows the use of the server CPU. If the value continues to exceed 90%, it means that the whole system is facing a CPU bottleneck and needs to increase CPU to improve performance. The value of the% User Time performance counter shows the CPU utilization of the user space process. If the value is large, it is necessary to analyze which user process and what actions caused the CPU increase. The value of the System:Processor Queue Length counter shows the length of the queue that CPU is waiting to be processed, and when the value of the counter is > (the total number of CPU + 1), processor blocking occurs. In general, when the Processor:%Process Time is very high, it will be accompanied by processor blocking, but when processor blocking occurs, the value of the Processor:%Process Time counter is not necessarily very high, so it is necessary to analyze the cause of processor blocking.
2. MEM analysis method
The performance counters involved in MEM monitoring are mainly% Commitued Bytes in Use and Available Bytes. If the value displayed by the% Commitued Bytes in Use counter is relatively large, the system may have a memory bottleneck. You can further judge according to the value of the Available Bytes counter. If the value is small, it indicates that there is insufficient available memory and there is a performance bottleneck. In addition, you need to pay attention to the values of Pages/sec, Pages Read/sec, and Page Faults/sec, which reflect the frequency of disk swapping by the operating system. If the value of Pages/sec remains high (such as hundreds of values), there may be a memory bottleneck, but it does not rule out that it may be caused by the program's use of memory-mapped files; if the value of Page Faults/sec is high, the page failure frequency is higher, and the operating system reads more times to memory; in general, the value of Pages Read/sec counter is not more than 5, otherwise there is likely to be a memory bottleneck.
3. Disk IO analysis method
The main performance counters involved in disk IPUBO monitoring are% Busy Time, Avg. Disk Queue Length, Current Disk Queue Length, if the value of the% Busy Time performance counter is relatively large, the hard disk may have a bottleneck. In addition, for sequential read-write applications, the IOPS needs to be calculated. If the actual IOPS is equal to or exceeds the nominal IO capacity of the disk, there is a performance bottleneck on the disk.
4. NET analysis method
The performance counter involved in NET monitoring is mainly Bytes Total/sec. By comparing the counter value with the network bandwidth value, we can judge whether there is a bottleneck in the network link speed.
4 other resources
About python learning, sharing and exchange, the author opened the official account of Wechat [Little Python Community]. Interested friends can follow, welcome to join, establish our own small circle and learn python together.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.