Sunday, October 9, 2011

Buffer Tuning for all Cisco Routers


This is copied from Cisco.com

Buffer tuning allows you to modify the way a router allocates buffers from its available memory, and helps prevent packet drops during a temporary burst of traffic.
To determine whether your router needs to have its buffer tuned, use the show interfaces and show buffers commands.
If you have the output of the show interfaces and show buffers commands, or the output of the show technical-support (from enable mode) from your Cisco device, you can use Output Interpreter to display potential issues and fixes. To use Output Interpreter , you must be a registered customer, be logged in, and have JavaScript enabled.
Below is an example of the show interfaces command output:
Output queue 0/40, 1041 drops; input queue 0/75, 765 drops 
35252345 packets input, 547082589 bytes, 940 no buffer 
  • The input and output drops are due to the input and output queues being overrun by a burst of traffic. This is not related to a buffer problem, but rather to a process switching performance limitation.
  • "No buffer" represents the number of packets dropped because there is no free buffer to copy the packet.
Using the show buffers command, look at the buffer size corresponding to the maximum transmission unit (MTU) of the interface:
Middle buffers, 600 bytes (total 150, permanent 25):
  147 in free list (10 min, 150 max allowed) 
  61351931 hits, 137912 misses, 51605 trims, 51730 created
  91652 failures (0 no memory)
The table below explains the output:
Keyword
Description
total
The total number of buffers in the pool, including both used and unused buffers.
permanent
The permanent number of allocated buffers in the pool. These buffers are always in the pool, and cannot be trimmed away.
in free list
The number of buffers currently available in the pool that are free for use.
min
The minimum number of buffers that the router should attempt to keep "in free list." If the number of buffers "in free list" falls below the "min" value, the router should attempt to create more buffers for that pool.
max allowed
The maximum number of buffers allowed "in free list." If the number of buffers "in free list" is greater than the "max allowed" value, the router should attempt to trim buffers from the pool.
hits
The number of buffers successfully allocated from the free list.
misses
The number of times a buffer has been requested, but no buffers are available in the free list, or when there are fewer than "min" buffers in the free list.
trims
The number of buffers that have been trimmed from the pool when the number of buffers "in free list" exceeds the number of "max allowed" buffers.
created
The number of buffers that have been created in the pool when the number of buffers "in free list" was less than "min."
no memory
The number of times the router tried to create new buffers, but could not due to insufficient free memory in the router.
failures
The number of failures to grant a buffer to a requester under interrupt time (remember that the router can create new buffers at process switching level, so "failure" does not occur unless there is "no memory"). The number of "failures" represents the number of packets that have been dropped due to buffer shortage.

How Buffers Are Handled by the Router

The number of buffers "in free list" is the number of available buffers. When a buffer request comes in, a buffer from the "in free list" is allocated.
The IOS buffers are used for two major reasons:
  • To handle traffic terminating at the router.
  • When packets are being process switched.
If there are no buffers available, and fast switching is enabled, there is a buffer failure and the packet is dropped. When the buffer pool manager process detects a buffer failure, it "creates" a new buffer to avoid future failures.
The router does not create a new buffer if the number "in free list" equals the "max allowed" value. If there is not enough memory in the router to create a new buffer, this is recorded as "no memory". If the number "in free list" is greater than the "max allowed" number, the router "trims" some excess buffers.
The number of "failures" and "no memory" are the only areas of concern. Failures may occur, but these should stabilize after a while. The router creates or trims buffers as necessary to stabilize the number of failures. If the number of failures continues to increase, buffer tuning might be necessary.
If there is not enough memory to create new buffers, look for a buffer leak, or a more general memory problem. Buffers are not created in the fast-switching path, so if the router tries to fast-switch a packet and there is no buffer available, the packet is dropped, and a failure is reported. A new buffer is created the next time the buffer pool manager is run.

Ref: http://www.cisco.com/en/US/products/hw/routers/ps133/products_tech_note09186a00800a7b80.shtml
http://www.cisco.com/en/US/products/hw/iad/ps397/products_tech_note09186a00800a7b85.shtml

No comments:

Post a Comment