Saturday, May 16, 2009

Link utilization


One of the basic tasks in monitoring network traffic is to accurately track the utilization of links in your network. A managed switch will provide a standard set of counters for each interface that can be retrieved retrieved periodically using SNMP and used to trend link utilization, packet rates, errors and discards.

sFlow provides an alternative to SNMP counter polling. The sFlow agent in the switch will periodically send, or "push" its own counters to the central collector. Pushing counters is much more efficient than than retrieving them using SNMP, requiring 10-20 times fewer network packets to retrieve the same information. The sFlow protocol uses XDR to encode the counters. XDR is much simpler to encode and decode than the ASN1 encoding that the SNMP protocol uses, so the CPU load on the switches and the collectors is also significantly reduced. Finally, distributing the counter polling task among the switches further reduces the load on the central collector.

The benefits of using sFlow to retrieve interface statistics become clear when you monitor large networks. Instead of requiring 5-10 servers dedicated to SNMP polling, a single sFlow analyzer can collect counters from all the interfaces in the network, providing a centralized view of utilization throughout the network, rapidly identifying any areas of congestion.

9 comments:

  1. Hi
    Please, i want to know what exactly do you mean "utilization of link "? Do you mean bandwidth utilization??
    And I want a link for that ( how to extract the bandwidth utilization for each link using sflow).
    Thank you

    ReplyDelete
    Replies
    1. Yes - "link utilization" is the same as "bandwidth utilization". You can calculate the bits per second by taking successive sFlow counter samples and subtracting the values of the ifinoctets/ifoutoctets counters * 8 / time between the counter samples. Calculate utilization by dividing the bits per second value by the speed of the port - the speed is included in the sFlow counter sample along with the other interface counters.

      You can use sflowtool to decode the sFlow data. The sFlow-RT analyzer performs the calculation for you.

      Delete
  2. Hi Peter, thank you for your response.
    Recently I used sflow-rt, with the application mininet-dashboard / scripts / metrics.js / metric / json. I found the statistics of each interface (port) in " trends" . Considering the eth2 port of switch s11 uses data=11234000 bits per sencod, then the bandwidth used by this port is calculated as follows:
    Utilization %=(data*100)/(bandwidth*interval)

    With the bandwidth (bits per second) is the value set when we create the link and the interval is the capture period
    is correct?

    ReplyDelete
    Replies
    1. The interval is the sFlow polling interval - set to 10 seconds by default if you are using the sflow-rt/extras/sflow.py script to configure sFlow in Mininet. Otherwise, your calculation looks correct.

      Delete
  3. Thank you very much for your help

    ReplyDelete
  4. Hi Peter,
    i exract value (bit per second) for each port, for example between Switch1 and Switch2, i have got X bits per second for port2-Switch1 and for port1-Switch2 is Y bits per second. How to calculate bandwidth utilization for this link (Switch1-Switch2)????
    Thank you Peter

    ReplyDelete
    Replies
    1. Each direction on the link has it's own bandwidth, so both numbers are needed. If you want to summarize the link bandwidth utilization, you could take the maximum of the two utilizations.

      Delete
  5. By sflowtool out put I saw that switches have ifinoctets and ifoutoctets for calculating the link utilizattion between switch2 and switch3 which of these are useful for me for calculating?

    ReplyDelete