General Calculation Method of network bandwidth utilization

Source: Internet
Author: User
Tags snmp

 

Generally
When calculating the CPU usage of a vro.
When calculating the utilization rate of a half-duplex 10 M interface, you can select the variable -- use the variable of mib ii (rfc2233) or the variable provided by a specific vendor. In the case of mib ii variables, the application calculates the percentage manually according to the following steps:
1. Calculate the (difference) between the two samples of iflnoctects and iflnoctets)
2. Add these values together
3. Convert the total value to the number of bytes per second * 8/sampling cycle quality
4. divide the number of bytes by ifspeed (interface speed in bytes)
5. Multiply the result by 100 to get the percentage.

If it is a Cisco device, you can also use the following value for calculation.
There are also Cisco dedicated variables in the site http://www.cisco.com/public/mibs/v1/OLD-XISCO-INTEFACES-MIB.my called locifinbitssec and 1ocifoutbitssec that do not need the first step in the previous example. Note that this MIB does not always support sub-interfaces.

Criteria for Evaluating Utilization
Because there are multiple ways to collect utilization, we recommend the following rules when selecting which type of variables to use:
1. Select a public domain MIB object before turning to the MIB of a specific enterprise. If you stick to the public domain MiB, it is very likely that these MIB objects will be implemented across vendor platforms; you can reuse your code to other device types with the same features
2. When storing collected data, raw data is used instead of the average data generated by the device or calculated by NMS. For analysis of long-term trends, data is as primitive as possible and important-merging or summarizing previously calculated or smooth data will produce inaccurate results.
In addition, note that these variables only report traffic seen by specific interfaces.
With regard to utilization, the empirical rule is that you should not assume that 0% must be good, but 100% must be bad. Theoretically, the maximum utilization rate does not always reflect the problem threshold. You must use benchmarking to determine which thresholds your organization cares about.
For example, it is not necessarily a bad thing that the CPU usage of a vro occasionally reaches the highest point of 100%. This indicates that the device has no spare time. However, if a CPU usage rate is 100% for a period of time, it may indicate packet loss. In this case, you should check other information, such as packet discard.
The opposite example is the half-duplex, 10 BaseT Ethernet utilization of shared media. Even if the maximum theoretical capacity of 10 BaseT is 10 MB, in some cases, reaching half of the capacity may make the media unavailable. In this special case, the reason is that when the utilization rate increases, the Ethernet collision rate also increases. Based on the benchmark analysis, you can confirm that a specific shared Ethernet network segment should set the Event threshold to 30% to indicate a high water mark.
Interface utilization is the main indicator of network utilization. The following formula should be used to determine whether the connection is half-duplex or full-duplex. Shared LAN connections are often half-duplex, mainly because competition detection requires the device to listen before sending. WAN connections are usually full-duplex because the connection is a point-to-point connection; two devices can send and receive the connection at the same time because they now know that only one other device is sharing the connection.
Because the mib ii variables are stored in the form of counters, you must perform two rounds of Round Robin and calculate the difference between the two (that is, in the formula ).
The difference between the two polling cycles of the ifinoctets object in collecting SNMP ifinoctets, which indicates the number of bytes of the input traffic.
Ifoutoctets indicates the difference between the two polling cycles of the SNMP ifoutoctets object, which indicates the number of bytes of output.
Ifspeed is the interface speed reported by the SNMP ifspeed object.

For half duplex, the formula (ifinoctets +? Ifoutoctets)/(seconds) ifspeed) × 8 × 100

For full duplex, more techniques are required for computing utilization. For example, for full T-1 serial port connection, the line speed is 1.544 Mbps. This means that a T-1 interface can receive and transmit 1.544 Mbps, possibly with a total bandwidth of 3.088 Mbps! When calculating the bandwidth of the full-duplex connection interface, the more accurate method is to measure the input and output utilization respectively, as shown in the following formula:

Input utilization = (ifinoctets × 8 × 100)/(seconds) * ifspeed)
Output utilization = (ifoutoctets × 8 × 100)/(seconds) * ifspeed)

 

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.