Configuring Buffer Utilization Histogram

This chapter contains the following sections:

Information About the Buffer Utilization Histogram Feature

The Buffer Utilization Histogram feature enables you to analyze the maximum queue depths and buffer utilization in the system in real time. Instantaneous or real time buffer utilization information is supported by the hardware. You can use software to obtain the history of the buffer usage by polling the hardware at regular intervals. Obtaining an historic timeline of the buffer usage provides a better picture of the traffic pattern in the system and helps in traffic engineering. Ultimately, you are able to make better use of the hardware buffer resources.

On the Cisco Nexus device, every three ports of 40 Gigabit Ethernet or every 12 ports of 10 Gigabit Ethernet have access to a shared 25 Mb packet buffer. 15.6 Mb are reserved for ingress and 8.6 Mb are reserved for egress. The remaining space is used for SPAN and control packets.

The Buffer Utilization Histogram enables you to do the following:

  • Configure buffer utilization history measurements on the interested ports.

  • View buffer utilization over an interval of time.

  • Configure either a slow or a fast polling mode.

  • Copy collected statistics to the buffer_util_stats file on the bootflash drive every hour to allow for later analysis. The collected statistics are appended to the end of the file after an hour and a timestamp is placed in the header that has the interface name.

Guidelines and Limitations for Buffer Utilization Histogram

Buffer Utilization Histogram has the following configuration guidelines and limitations:

  • The data is not maintained across upgrades. The new statistics learning restarts after the switch comes online with the new release.

  • Unicast and multicast buffer usage can be found in the egress direction. In the ingress direction, buffer usage is combined.

  • This feature is supported only on the physical ports. This feature is not supported on virtual interfaces, sub interfaces, FEX Host Interface (HIF) ports, and port channels. Fabric Extender (FEX) fabric ports and port channel member ports are supported.

  • You can obtain XML output by using the show hardware profile buffer monitor {all | interface intf} history {brief | detail} | xml > filename.xml command.

    The previous command displays the XML file content on the CLI. You can redirect it to an XML file. The file can be fetched into any XML analyzer tool for further analysis. It is important to note that XML support is not available for the real time buffer usage. That is, using the command without the history option.

Fast Polling

By default, the software is polling the buffer usage every second. Fast polling allows for polling the buffer usage every 250 milliseconds. Changing the polling mode from slow (default value) to fast does not clear the older histogram records that were obtained when you used slow polling mode. When you use the fast polling mode, the older data traverses to the end of the table as the new data keeps coming in. The same scenario applies in the reverse case when the polling mode changes from fast to slow. Although the polling interval is 250 milliseconds for the fast polling mode, the CPU utilization was not affected.

Fast polling results in more granular data. Once the polling mode changes, the polling mode is applied to all the ports on which the Buffer Utilization Histogram feature is enabled.

Default Settings for Buffer Utilization Histogram

The following table lists the default setting for Buffer Utilization Histogram parameters:

Parameters Default

Buffer Utilization Histogram

Disabled

Polling Mode

Slow

Enabling Buffer Utilization Histogram

Procedure

  Command or Action Purpose
Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# interface [ethernet [chassis/]slot/port]

Enters the configuration mode for the specified interface.

Step 3

switch(config-if)# hardware profile buffer monitor

Enables the Buffer Utilization Histogram collection of statistics on a port.

Step 4

(Optional) switch(config-if)# copy running-config startup-config

(Optional)

Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.

Example

This example shows how to enable the Buffer Utilization Histogram Collection feature:

switch# configure terminal
switch(config)# interface ethernet 1/1 
switch(config-if)# hardware profile buffer monitor

Configuring Fast Polling

Procedure

  Command or Action Purpose
Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# hardware profile buffer monitor sampling fast

Configures fast polling at an interval of 250 milliseconds.

Step 3

(Optional) switch(config)# copy running-config startup-config

(Optional)

Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.

Example

This example shows how to configure fast polling:

switch# configure terminal
switch(config)# hardware profile buffer monitor sampling fast

Configuring Slow Polling

Procedure

  Command or Action Purpose
Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# no hardware profile buffer monitor sampling fast

Configures slow polling at an interval of one second.

Step 3

(Optional) switch(config)# copy running-config startup-config

(Optional)

Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.

Example

This example shows how to configure slow polling:

switch# configure terminal
switch(confg)# no hardware profile buffer monitor sampling fast

Disabling the Buffer Utilization Histogram Feature

Procedure

  Command or Action Purpose
Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# interface [ethernet [chassis/]slot/port]

Enters the configuration mode for the specified interface.

Step 3

switch(config-if)# no hardware profile buffer monitor

Disables the Buffer Utilization Histogram collection of statistics on a port.

Step 4

(Optional) switch(config-if)# copy running-config startup-config

(Optional)

Saves the change persistently through reboots and restarts by copying the running configuration to the startup configuration.

Example

This example shows how to disable the Buffer Utilization Histogram feature:

switch# configure terminal
switch)config)# interface ethernet 1/1
switch(config-if)# no hardware profile buffer monitor

Clearing the Buffer Utilization Histogram History

Procedure

  Command or Action Purpose
Step 1

switch# configure terminal

Enters global configuration mode.

Step 2

switch(config)# clear hardware profile buffer monitor [interface ifid]

Clears the Buffer Utilization Histogram information on a port or all ports based on the parameters supplied. Entering the command without an interface clears the buffer utilization statistics on all ports.

Example

This example shows how to clear the Buffer Utilization Histogram history:

switch# configure terminal
swtich(config)# clear hardware profile buffer monitor

Verifying the Buffer Utilization Histogram Feature

Use one of the following commands to verify the configuration:

Command Purpose

show hardware profile buffer monitor {all | interface intf}

Displays the buffer usage statistics for all the unicast and multicast queues on each port and the total global free and used buffer statistics. This command is used to retrieve buffer usage statistics on the basis of instantaneous time (current time).

show hardware profile buffer monitor {all | interface intf} history {brief | detail}

Displays the buffer usage historical statistics for all the ports or a specified port. This command supports brief and detailed representations. The brief representation is used to display only average usages over time, but the detailed representation displays the maximum, minimum, and average usages over time.

Output Examples for Buffer Utilization Histogram

This example shows the output when the polling mode is set to slow. Buffer utilization data is obtained every second. No minimum/maximum/average available for the data in the 1 sec column. Five samples from the 1 sec column make the first entry of the 5 sec column (min/max/avg are calculated from the five samples present in the 1 sec column). Twelve samples from the 5 sec column make the first entry in the 1 min column. Five samples from the 1 min column make the first entry in the 5 min column. Twelve samples from the 5 min column make the first entry in the 1 hour column. This information is copied to the file on the bootflash. Data propagates in the table in a circular fashion.

switch(config)# show hardware profile buffer monitor interface ethernet 1/1 history detail
--------------------------------------------------------------------------------
                                        Interface : Eth1/1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                                 Sampling Mode : Slow (1 second)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
           Ingress Buffer Utilization Detected(Min|Max|Avg)(in KB)
                 Per asic Ingress Total Usage (15.628800MB)
--------------------------------------------------------------------------------
     1 sec     |     5 sec     |     1 min     |     5 min     |     1 hour    |
--------------------------------------------------------------------------------
16.3|  -  | -  |12.5|18.9| 14.9| 9.3|22.7| 15.7| 0.0|23.0| 13.7|      N/A      |
21.4|  -  | -  |13.4|22.7| 17.5| 0.0|22.1|  5.8| 6.7|23.0| 16.3|      N/A      |
12.5|  -  | -  |10.2|21.4| 15.0| 0.0| 0.0|  0.0| 9.3|23.0| 15.8|      N/A      |
13.8|† -  | -  | 9.9|22.1| 13.0| 0.0|22.7|  5.5|      N/A      |      N/A      |
12.8|† -  | -  |10.2|15.4| 12.4| 9.3|23.0| 15.7|      N/A      |      N/A      |
      N/A      |10.9|20.5| 17.4|      N/A      |      N/A      |      N/A      |
      N/A      | 9.3|22.1| 18.0|      N/A      |      N/A      |      N/A      |
      N/A      |14.7|22.4| 17.7|      N/A      |      N/A      |      N/A      |
      N/A      | 9.9|21.1| 16.5|      N/A      |      N/A      |      N/A      |
      N/A      |11.2|20.8| 15.9|      N/A      |      N/A      |      N/A      |
      N/A      | 9.9|18.2| 14.7|      N/A      |      N/A      |      N/A      |
      N/A      |10.2|22.7| 16.1|      N/A      |      N/A      |      N/A      |
--------------------------------------------------------------------------------
         Egress Unicast Buffer Utilization Detected(Min|Max|Avg)(in KB)
                    Per asic Egress Total Usage (8.611850MB)
--------------------------------------------------------------------------------
     1 sec     |     5 sec     |     1 min     |     5 min     |     1 hour    |
--------------------------------------------------------------------------------
0.0|  -  | -  | 0.0|19.8|† 7.9| 0.0|19.8| 13.0| 0.0|19.8| 10.6|      N/A       |
1.0|  -  | -  | 0.0|19.8| 11.9| 0.0|19.8|  0.4| 0.0|19.8| 12.2|      N/A       |
0.0|  -  | -  | 0.0|19.8| 15.9| 0.0| 0.0|  0.0| 0.0|19.8| 11.9|      N/A       |
19.8|  -  | -  | 0.0|19.8| 15.9| 0.0|19.8| 4.0|      N/A      |      N/A      |
0.0|  -  | -  |19.8|19.8| 19.8| 0.0|19.8| 13.0|      N/A      |      N/A      |
      N/A      | 0.0|19.8| 11.9|      N/A     |      N/A      |      N/A      |
      N/A      | 0.0|19.8| 15.9|      N/A     |      N/A      |      N/A      |
      N/A      | 0.0|19.8| 11.9|      N/A     |      N/A      |      N/A      |
      N/A      | 0.0|19.8|  7.9|      N/A     |      N/A      |      N/A      |
      N/A      | 0.0|19.8| 15.9|      N/A     |      N/A      |      N/A      |
      N/A      | 0.0|19.8|  8.6|      N/A     |      N/A      |      N/A      |
      N/A      |19.8|19.8| 19.8|      N/A     |      N/A      |      N/A      |
--------------------------------------------------------------------------------
         Egress Multicast Buffer Utilization Detected(Min|Max|Avg)(in KB)
                    Per asic Egress Total Usage (8.611850MB)
--------------------------------------------------------------------------------
     1 sec     |     5 sec     |     1 min     |     5 min     |     1 hour    |
--------------------------------------------------------------------------------
0.0|  -  | -  | 0.0| 0.0|  0.0| 0.0| 0.0|  0.0| 0.0| 0.0|  0.0|      N/A      |
0.0|  -  | -  | 0.0| 0.0|  0.0| 0.0| 0.0|  0.0| 0.0| 0.0|  0.0|      N/A      |
0.0|  -  | -  | 0.0| 0.0|  0.0| 0.0| 0.0|  0.0| 0.0| 0.0|  0.0|      N/A      |
0.0|  -  | -  | 0.0| 0.0|  0.0| 0.0| 0.0|  0.0|      N/A      |      N/A      |
0.0|  -  | -  | 0.0| 0.0|  0.0| 0.0| 0.0|  0.0|      N/A      |      N/A      |
      N/A      | 0.0| 0.0|  0.0|      N/A      |     N/A      |      N/A      |
      N/A      | 0.0| 0.0|  0.0|      N/A      |     N/A      |      N/A      |
      N/A      | 0.0| 0.0|  0.0|      N/A      |     N/A      |      N/A      |
      N/A      | 0.0| 0.0|  0.0|      N/A      |     N/A      |      N/A      |
      N/A      | 0.0| 0.0|  0.0|      N/A      |     N/A      |      N/A      |
      N/A      | 0.0| 0.0|  0.0|      N/A      |     N/A      |      N/A      |
      N/A      | 0.0| 0.0|  0.0|      N/A      |     N/A      |      N/A      |
--------------------------------------------------------------------------------

This example contains only the average buffer usage values for the appropriate timelines. This output is only the first row of the detail output.

switch# show hardware profile buffer monitor interface e1/1 history brief
--------------------------------------------------------------------------------
                              Interface : Eth1/1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                       Sampling Mode : Slow (1 second)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
                      Ingress Buffer Utilization Detected(in KB)
                      Per asic Ingress Total Usage (15.628800MB)
--------------------------------------------------------------------------------
     1 sec     |     5 sec     |     1 min     |     5 min     |     1 hour    |
--------------------------------------------------------------------------------
            0.0|            0.0|            0.0|            0.0|            0.0|
--------------------------------------------------------------------------------
        Egress Buffer Utilization Detected(Unicast|Multicast)(in KB)
                    Per asic Egress Total Usage (8.611850MB)
--------------------------------------------------------------------------------
     1 sec     |     5 sec     |     1 min     |     5 min     |     1 hour    |
--------------------------------------------------------------------------------
    0.0|    0.0|    0.0|    0.0|    0.0|    0.0|    0.0|    0.0|    0.0|    0.0|
--------------------------------------------------------------------------------