Contiguous Buffers
are fixed-size buffers where different units of data (frame, packet, and so on) are placed in separate buffers. This has the advantage of creating easily addressed blocks where data can quickly be both stored and accessed efficiently. In general, contiguous buffers are easy to manage. But there is also a disadvantage in that considerable space can be wasted if, for example, a 64-byte frame has to be placed into a 1500-byte buffer. On Cisco switches (and routers) that use this method, the contiguous buffers are created in a variety of fixed sizes at startup of the switch. The size of the contiguous buffers is designed to be suitable for a variety of frames/packets of common sizes to be properly stored with the minimum of wasted space. The contiguous buffering allocation can be most wasteful on routers, where the need to create buffers to support the maximum transmission unit (MTU) of all interfaces may mean that some buffers as large as 18 kilobytes may be reserved (FDDI or high-speed Token Ring, for example). Under these circumstances, very few frames or packets may demand a buffer this large, but once created, the memory is not available for other purposes. And the maximum memory on switches and routers may be quite limited. Figure 21.5 shows the disadvantages of the contiguous buffering system. Despite the differentsized buffers that have been created, there is always going to be waste.
Contiguous buffering Waste! 64 300 1000 Input Stream 64 64 300 512 1000 1500
Shown next is the output of the show buffers command executed on a WS-C2950-24 switch. You can see the sizes of the system buffers and the default number that are created at startup by this particular switch.
Terry_2950# show buffers Buffer elements: 500 in free list (500 max allowed) 58 hits, 0 misses, 0 created Public buffer pools: Small buffers, 104 bytes (total 52, permanent 25, peak 52 @ 00:16:09): 52 in free list (20 min, 60 max allowed) 50 hits, 9 misses, 0 trims, 27 created 0 failures (0 no memory) Middle buffers, 600 bytes (total 30, permanent 15, peak 39 @ 00:16:09): 30 in free list (10 min, 30 max allowed) 24 hits, 8 misses, 9 trims, 24 created 0 failures (0 no memory) Big buffers, 1524 bytes (total 5, permanent 5): 5 in free list (5 min, 10 max allowed) 4 hits, 0 misses, 0 trims, 0 created 0 failures (0 no memory) VeryBig buffers, 4520 bytes (total 0, permanent 0): 0 in free list (0 min, 10 max allowed) 0 hits, 0 misses, 0 trims, 0 created 0 failures (0 no memory) Large buffers, 5024 bytes (total 0, permanent 0): 0 in free list (0 min, 5 max allowed) 0 hits, 0 misses, 0 trims, 0 created 0 failures (0 no memory) Huge buffers, 18024 bytes (total 0, permanent 0): 0 in free list (0 min, 2 max allowed) 0 hits, 0 misses, 0 trims, 0 created 0 failures (0 no memory) Interface buffer pools: Calhoun Packet Receive Pool buffers, 1560 bytes (total 512, permanent 512): 480 in free list (0 min, 512 max allowed) 56 hits, 0 misses Terry_2950#
Warning: You can change the buffer allocations by using the buffers buffer_size buffer_setting number command, but this is a skilled task with considerable ramifications. If too much memory is allocated to buffers, performance will suffer. If you think you need to alter the default buffer allocations, either liaise with the Cisco TAC or, at the very least, model the impact on a non-production switch.
266 times read
|