portbuffershow command gives the average Tx and average Rx frame size .
Which one should we take for buffer credit calculation ??
Thanks in Advance
I would use both, take the minimum. And also to own calculation of the frame size based on
4 * stat64_wtx / stat64_ftx = average frame size in bytes for transmitted frames
4 * stat64_wrx / stat64_frx = average frame size in bytes for received frames
The configured buffer credits on the switch are what we advertise as available credits so it is relevant to Rx buffers. Typically, BB credits are only adjusted on E-Ports (ISLs). Since Tx buffers on one end of the link is the same as Rx buffers on the remote end, you can use the Tx buffer information on the local switch to be representative of what the remote side is recieving.
Assuming you are interested in determining the right number of BB credits for an ISL, if traffic is truley bi-directional use the smallest frame size to ensure adequate BB credits to keep the link full. Often, traffic is really uni-directional. For example, tape backups almost always go from a production site to a backup site. In this example, there will be a handful of frames from the backup site to the production site. Those frames are generally small since they are usually carrying status information and not user data. This type of data is limited to a small number of frames not requiring much B/W so using this data in your calculation wouldn't make sense.
Login to your switch with the graphical user interface, consult the portstats of your intersite ISL port.
You have :
Out Bytes (expressed in MB) -> so *1024*1014 to convert it to bytes
Devide OutBytes by OutFrames
In my situation having Storage being replicated to the other site, and hence using the link at daytime operations only for storage replication, the Tx site is my primary site, the Rx Site is the recovery site. Of course Tx Avg payload on primary = Rx Payload on Secondary.
My TX Out on Primary is twice much higher as my RX In on Primary.
My storage is concerned about its round trip time (assumption : you have synchroneous replication) , so pushing out the data changes from primary to secondary (eventually in inappropriate order over the fabrics/DWDM links) is one aspect. My storage is also concerned about getting an ACK from the remote array that the write is complete.
So the highest B2B Credit value you assign based on the Avg Paylpad on either applies.
In Bytes (MB) 6255
Out Bytes (MB) 15220,4
In Frames 36673397
Out Frames 72942319
Avg Payload IN 178 bytes
Avg Payload Out 218 bytes
the smaller the payload the more payloads transit over the fixed length wire, the more buffers you need (1 buffer per payload).
In the end you just use the smallest payload of both.
then proceed with
portbuffercalc 1 -distance 21 -speed 8 -framesize 178
1 : portNumber
8 : speed in gbit
137 : framesize
1261 buffers required for 21km at 8G and framesize of 137bytes