Long Distance Fibre Channel Link Tuning
In this video I talk about some of the variables involved in long distance link tuning of fibre-channel distance links. In this blog post I'll detail some of the tools that are available. I will also provide an example of estimating the number of buffer credits you will need. Note that this tuning is only for fibre-channel links. This does not apply to FCIP tunnels or circuits. One critical piece of information that you will need to calculate buffer credits is the frame size. Smaller frames means more of them can fit in the link, so you would need more buffer credits. Of the variables that go into the formula, this is the only unknown. Everything else is either known or is a constant.
Brocade has the 'portbuffershow' command that can tell you the average frame size for a link. You would look at the Framesize columns for TX and RX in the portbuffershow output to get the frame size. The portbuffershow output is organized by logical switch and then by port.
On a Cisco fabric, you can calculate the frame size using one of the 'show interface' commands:
switch# show interface fc1/1 counters
………
14079632456 frames input, 18624775031572 bytes
………
Note that the above values are the rate in the last 5 minutes, so you should run this when replication is running. If traffic were not moving across the link the numbers would be skewed low and you would end up under-allocating buffer credits.
The average Frame Size = Bytes/Frames, so from the above Cisco example output:
18624775031572 (bytes) / 14079632456 (frames) = 1323 bytes/frame or about 1.3KB per frame
If the values above are changed to use fewer frames then we get:
18624775031572 (bytes) / 10000032456 (frames) = 1862 bytes/frame or about 1.8KB per frame. Note that the maximum frame size is 2112 bytes. If you are in doubt, you can use this as your value, but know that you may under-allocate the required credits if your frame size is too large.
Once we know the average frame size, we can calculate the number of buffer credits with the following formula:
Required Buffer Credits = ((distance * rate * 1000) / average_frame_size) + 6
Where:
- Distance is measured in km
- Rate is the speed (1, 2, 4, 8, 16, 32)
- Average_frame_size is in bytes (max is 2112)
- 6 credits added for Fibre-channel overhead for F_Class traffic
Comments
Post a Comment