Saturday, 17 March 2012

How to calculate Throughput for Ethernet Frames

Ethernet Frame and Calculation of Throughput

Ethernet Speed and throughput is one topic which i see many people getting confused and searching for answers.

When we say Ethernet speed is 100Mbps, this does not mean that it's data throughput is 100Mbps, it is to convey that the maximum link capacity is 100Mbps , including header and everything else like Inter frame gap.

The RFC 1242 and 2544 talks about what is throughput and how we should test it.

We have many Devices using which we can calculate the throughput for Ethernet frames. Smartbits and IXIA are mostly used devices.

These devices generally gives data in packets/sec and we should know how it calculates the packets/sec

Ethernet Frame :

TDM frame rate frequency 8000 Hz

Fast Ethernet LAN capacity 100 Mbit/s

Ethernet Frame
Preamble---------------->7 bytes
Start Frame------------->1 bytes
Destination MAC Address->6 bytes
Source MAC Address------>6 bytes
Type/Length Field------->2 bytes
Minimum payload size---->46 bytes
Frame Check Sequence (FCS)->4 bytes
Frame inter-packet gap---->12 bytes

Minimum Ethernet frame size 64 bytes
Minimum Ethernet frame total 84 bytes

For every Ethernet packet of 46 byte payload, the total byts on wire is 84 bytes.


Calculate throughput:

For 100 Mbps, 64 byte, : 100000000 / ((64+20)*8) =148809.5 Frames per second.

For 100 Mbps, 1518 byte : 100000000/((1518+20)*8)= 8127.43 Frames per second .

So Ethernet payload data rates are :

1518 / (18+20+1500+4)  = 98.4435 % without VLAN tags.

8 comments:

  1. Hi,

    the Smartbits from Spirent is a discontiued model.
    The successor is called Spirent TestCenter.

    Regards.
    Ron.

    ReplyDelete
    Replies
    1. Yes, the new model is Spirent TestCenter.Still, I did not get chance to work on it, but am sure the calculation for throughput used should be same.

      Delete
  2. if the frame size (1500 or jumbo) is larger then the through will be less and if the frame size(64) is small then the throughput will be large , what is the main reason behind this , can you please anybody help

    ReplyDelete
    Replies
    1. Actually the throughput for higher frame sizes will be more compared to lower frame sizes.

      The reason is the processor has to process more number of packets if packet size is smaller.

      For 1500 packet sizes the packet sent out per second is 8223.6 but for 64 packet sizes the no of packets sent is 148809.5 , which is large. The time taken adds up ,"take each packet" and "send out," so processor has to be capable enough to handle those many packets per sec. If they are not the throughput drops.

      Delete
  3. why is 1500 set as default MTU ? Is there any reason ?

    ReplyDelete
    Replies
    1. The requirement is defined in RFC 894 , https://tools.ietf.org/html/rfc894. (Standard for the Transmission of IP Datagrams over Ethernet Networks).

      As per this RFC:
      The maximum length of an IP datagram sent over an Ethernet is 1500 octets

      As per IP header field MTU can take max value as 65535 its mentioned in RFC 791.

      PAth MTU is defined in https://www.ietf.org/rfc/rfc1191.txt , here you can see other MTU sizes defined for other type of networks.

      Delete
  4. For the throughput calculation, should the frame size be 1518 instead?

    For 100 Mbps, 1500 byte : 100000000/((1500+20)*8)= 8223.6 Frames per second .

    ReplyDelete
    Replies
    1. yes, correct, thanks it should be as below:

      For 100 Mbps, 1518 byte : 100000000/((1518+20)*8)= 8127.43 Frames per second .

      64 byte ==46 (min payload) + 6 SRC MAC+ 6 DST MAC+ 2 Type + 4 (FCS) ==64

      1518 byte = 1500 (max payload for Ethernet header)+ 6 SRC MAC+ 6 DST MAC+ 2 Type + 4 (FCS)

      Delete

Related Posts Plugin for WordPress, Blogger...