[j-nsp] Accuracy of interface stats

Richard A Steenbergen ras at e-gerbil.net
Sun Sep 27 14:55:24 EDT 2009


On Sun, Sep 27, 2009 at 01:17:54PM -0400, Stefan Fouant wrote:
> 64 Byte IP packet + 8 Byte Ethernet Preamble + 18 Byte Ethernet header = 90
> Bytes * 8 bits per byte = 720 bits per frame
> 
> 10,000,000,000 bps GigE / 720 bits per frame = 13,888,888 fps
> 
> Have my calculations been incorrect all these years?  What am I missing?

You're a little off, but not much. The minimum IP payload size is
actually 46 not 64, anything smaller (such as a 40 byte TCP ACK, a 28
byte UDP packet, etc) will be padded to 46. The 64 byte minimum you're
thinking of comes from the 46 byte payload + 14 byte ethernet header + 4
byte FCS = 64 bytes. You also forgot the Inter-Frame Gap, which is
another 12 bytes of layer 1 overhead.

Basically every packet on Ethernet contributes at least 38 bytes in
L1+L2 overhead (plus padding up to 46, for IP payloads less than 46
bytes), regardless of the size. This is really really bad when the frame
size is small (worse than ATM infact), a 46 byte IP packet burns 84
bytes * 8 = 672 bits giving you a max rate of 14,880,952 fps. It's been
a while since I did the math on SONET overhead but I seem to recall the
number for OC192 being something more like 26-28Mpps for small packets. 
Of course, the exact opposite is true once the packet sizes get bigger,
SONET overhead is worse than Ethernet at 1500 bytes.

-- 
Richard A Steenbergen <ras at e-gerbil.net>       http://www.e-gerbil.net/ras
GPG Key ID: 0xF8B12CBC (7535 7F59 8204 ED1F CC1C 53AF 4C41 5ECA F8B1 2CBC)


More information about the juniper-nsp mailing list