Analysis of the use of various hardware (a)---you can tell the bottleneck is memory, processor ordisk!

Source: Internet
Author: User

various hardwareUseanatomy (i)
The resources of each hardware, such as CPU,Memory, hard drive input and output, network bandwidth, and so on. Before actually looking at the schema, first emphasize an idea, whether it's usingsystemwhich resources, when the usage continues to exceed 80%, the system'sPerformanceis bound to fall sharply without showing a linear relationship, as shown in:

Response Time

Usage Rate 80%
the relationship between resource utilization and system response time
Note: from theOperationknowledge of the system to understand, if in manyUserwhen the CPU usage in the environment is greater than 80%, the processRunThe queue spends a lot of waiting time, and the response time and throughput decreases.
3.1, RAM memory
usually what happens in the systemproblemis due to insufficient memory, which is more common. So we should monitor the memory first and confirm that ourServerthere is enough memory. To perform IIS 5.0 on Windows 2000 (such as a mod Web service), the minimum capacity required for a dedicated web server is 128MB, but preferably 256MB to 1GB. Because "iisfilethe cache "defaults to using up to half of the available memory, so the more memory you have, the more"iis the file cache. "

notes:Windows Advanced Server can support up to 8GB of RAM, but the "iis file cache" will not take advantage of more than 4GB of RAM. "
All inWindowsSystem-ExecutedApplicationall thought that at least 2GB of contiguous memory (calledVirtualmemory), whenApplicationwhen the thread accesses memory, the operating system maps it (mapping) to a block of physical memory, and if there is not enough physical memory, the operating system writes some of the less-used chunks of physical memory to the hard disk to empty the physical memory to the currently needed program.
Available MBytes of available physical memory
Description: Available MBytes is the amount of physical memory available to a running process on the computer, in megabytes. obtained by calculating the total amount of memory space in clear 0, idle, and standby memory lists. Free memory can be used immediately; Clear 0 Memory is a memory page filled with 0 values to prevent subsequent processes from getting used by the old processDatastandby memory is the memory that is removed from the process working set (its physical memory) and then into the disk, but the memory can still be recovered. The counter displays only the last observed value; is not an average.
Technology: 10% of available memory is generally reserved. The lowest minimum can not be <4m, this value is too small may be low memory or memory leak;
cause: Because IIS uses up to 50% of the available memory for the file cache by default, it retains 10% of available memory (for peak time use).
Knowledge Points: physical memory, virtual memory, IIS file cache, clear 0 memory (errors that often occur in the program), standby memory.

       
page faults/sec, Pages input/sec, page reads/sec
Note (important): cause a serious delay cause: Hardware paging error.
Description:Page faults/secrefers to the overall rate at which the processor handles error pages. Count the number of pages/s in error. When the processor requests a space that is not in its working set (in physical memory)Codeor data, the page error occurs. 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 in the event of a large number of soft errors. However, a hard error can lead to noticeable delays.
Pages input/secrefers toSolvePage Error The number of pages read from disk. (A hard-page error occurs when you are processing code or data that needs to be retrieved from disk, regardless of its working set or physical memory).
Page reads/sec refers to theparsingthe number of times the disk was read by a hard page error. (A hard-page error occurs when the hard-page error processing the request is not in the working set and other parts of physical memory, but must be retrieved from disk). IfPage reads/sethe C ratio remains at 5, indicating that there may be insufficient memory (the threshold is >5. The smaller the better).

may causepagewrong operation: The application requests a paging to memory, but the system cannot find it in the desired location, which constitutes a page fault.
Technology:
General: May involve

1, due to the page exchange caused by insufficient memory;

2, the disk bottleneck caused by the page exchange;When these values are low, the server should be able to respond to requests quickly, and when these values are high, it is because you are spending too much memory on the cache processing and not leaving enough memory for other parts of the system to use. can increase memory or reduce the size of the cache RAM to resolve;
Details:
              page Faults/sec: Only indicates that the data cannot be used immediately in the specified working set of memory;
              page Input/sec: Page input/sec > Page reads/sec;
              page Reads/sec: The threshold value is >5. The smaller the better, the larger the value indicates that the disk reads instead of the cached read;
Page/sec: The number of pages (the sum of pages input/sec and pages output/sec) that are read from or written to disk for parsing hard page faults. Its valueRecommended00-20 This value will always be high if the server does not have enough memory to handle its workload. If it is greater than 80, indicating a problem (too many read-write data operations to access the disk, consider increasing the memory or optimizing the algorithm for reading and writing data), if the value is lower, the descriptionWebserver response requests are faster, or the server system memory shortage may be caused (or the cache is too large, resulting in too little system memory).

3.2,processor
Fast , efficient processor usage is needed as users request fast response times from the Web site, as well as increased dynamic content on those sites. Bottlenecks occur when one or more processes are almost depleted of all processors, forcing the process threads that are ready to execute to wait for processor time in the queue.
(web side) The maximum performance gain for Windows 2000 and IIS 5.0 comes from resolving memory issues. Before you decide to change the number of processors on the Web server, first troubleshoot the memory issue, and then monitor the following performance counters.
% Processor timethe percentage of time that the processor executes a non-idle thread; In a popular sense, CPU usage. This is the primary indicator for monitoring processor activity. It measures the time that the processor uses to execute idle processing threads in each sample interval, and subtracts the merit out of 100%. (Each processor has an idle thread that consumes cycles when no other thread can run). It can be considered as a percentage of the sample interval used to do useful work.
normal <90, this value is too large to indicate that the performance of the processor can not meet the requirements of the program, to replace the faster processor. The value continues to exceed 90%, indicating that theTestof theLoadtoo heavy for the current hardware. If the memory factor is excluded, the CPU bottleneck can be determined if the value of the counter is larger and the value of the NIC and the hard disk is lower at the same time.

Processor Queue Length:refers to the number of threads in a queue that is processed. Shows the number of threads waiting to be executed in a queue shared by all processors of the Web server. If there are always more than 2 threads in the processor queue, it usually indicates a processor jam.
Reference value:less than 2. A processor bottleneck causes the value to continue to be greater than 2.


3.3, physical Disk:
because the MoD's Web (IIS 5.0) writes the record file to disk, there are even up to 100 client cache accesses in general disk activity. In general, if there is a large amount of disk read activity other than logging, it means that there are other areas on the system that need to be adjusted. For example, hardware paging errors can cause a large amount of disk activity, but they represent insufficient ram.

%disk time%:Refers to the percentage of time that the selected disk drive is busy servicing a read or write request. If the three counters are larger, then the hard drive is not a bottleneck. If only%disk time is larger and the other two are relatively moderate, the hard disk may be a bottleneck. Before you log this counter, run Diskperf-yd in the Windows 2000 command-line window. Normal <10, this value is too large to take too much time to access the disk, consider increasing memory, replacing faster drives, and optimizing the algorithms for reading and writing data. If the value continues to exceed 80 (this time the processor and networkConnectionis not saturated), it could be a memory leak.

Pages per second: Number of pages retrieved per second. The number should be less than one page per second.


If these three counters (processor:% Processor Time, network interface connection:

bytes Total/sec and PhysicalDisk:% Disk time ) is high, the hard disk does not cause a site bottleneck.

Add:
Avg. Disk Queue Length refers to the average number of read and write requests (queued in the instance interval for the selected disk ). Normal <0.5, this value is too large to indicate that the disk IO is too slow to replace a faster hard drive.
disk transfers/sec refers to the read/write operation rate on this disk. Normal <(disk bytes/sec)/3, this value is too large to indicate that the system requires the IO speed is close to the maximum speed of the hard disk, to replace the faster hard disk.
Disk usage counters and memory counters (disk bottlenecks or insufficient memory?) :
Physical Disk\% Disk time

physical disk\ avg.disk Queue Length  

For example, include Page reads/sec and% Disk time and Avg.Disk Queue Length. If the page read operation rate is low and the value of% Disk Time and Avg.Disk Queue length is high, there may be a disk bottle diameter. However, if the queue length increases at the same time that the page read rate is not reduced, there is insufficient memory.

3.4, network capacity, wait time and bandwidth
test target: After the system trial run, need to know in time exactly what is happening on the network, what application is running,How toHow many PCs are accessing the LAN or WAN, which applications are causing system bottlenecks or competing for resources
function
1. Analyze the performance of critical applications
2, the root of the problem is whether the client, server, application, or network
3, which applications consume a large amount of bandwidth
Basically, the network is the line that the client sends the request to the server. The time it takes to pass these requests and responses back and forth on your server is one of the biggest constraints on server performance that users can perceive. This request-response cycle time is called the wait time, waiting time for the Web serverManagementis almost beyond the control of the staff. For example, you can handle a slow router on the Internet or a physical distance between a client and a server.
on a site that is primarily composed of static content, network bandwidth is most likely the source of the performance bottleneck. Even a typical server may be connected with a full T3 connection (45mbps) or 100mbps Fast Ethernet. The simplest measure of effective bandwidthMethodis to determine at what speed your server is transmitting and receivingInformationthe.
Network Interface Bytes total/sec: The rate at which bytes are sent and received, including frame characters. Determine if the network connection has a bottleneck. To leave some space in the throughput for peak time use, you should not use more than 50% of the capacity. This connection can also be a problem if the number is very close to the capacity of the connection and the processor and memory are used very moderately.

Reference value: The value of this counter divides the bandwidth of the current network, and the result should be less than 50%.
If other services that you are performing on your computer also use a network connection, monitor the "web service:maximum connections" and "web service:total connection attempts" counters to Check whether your Web server is able to use as many connections as it needs. Remember to compare these numbers with memory and processor usage to make sure that the connection is a problem, not another component.
Connection the frequency at which the Attempts/sec:web service tries to connect.
Maximun Connections: The maximum number of connections is the maximum number of connections that are established at the same time as the Web service.

Analysis of the use of various hardware (a)---you can tell the bottleneck is memory, processor ordisk!

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.