Contents |
In ##FreeBSD we see lots of questions about setting up routers, bridges and firewalls using FreeBSD on commodity hardware.
Ethernet frames have the following structure:
The data payload must be at least 48 octets, if it is less than this then the frame must be padded with 0's to make the payload longer.
Based on this we can work out the best and worst case (these are subjective terms) frame sizes:
As this is related to Ethernet then we will look at speeds for common Ethernet protocols.
| Speed | Frame Size (octets) | Transmission Speed (ns/bit) | Transmission Time (ns/frame) | Frames Per Second |
|---|---|---|---|---|
| Gigabit | 86 | 1 | 688 | 1453488.37 |
| Gigabit | 1538 | 1 | 12304 | 81274.38 |
| 100Mbit | 86 | 10 | 6880 | 145348.84 |
| 100Mbit | 1538 | 10 | 123040 | 8127.44 |
| Speed | Frame Size (octets) | Useful Payload (octets/frame) | Frames Per Second | Though put (bps) |
|---|---|---|---|---|
| Gigabit | 86 | 48 | 1453488.37 | 558139534.88 |
| Gigabit | 1538 | 1500 | 81274.38 | 975292587.78 |
| 100Mbit | 86 | 48 | 145348.84 | 55813953.49 |
| 100Mbit | 1538 | 1500 | 8127.44 | 97529258.78 |
For a modern system with good quality NIC's in there is very little host involvement in receiving the packet due to use of DMA and interrupt modulation. The main work load is in packet processing including (but not limited to):
Each of these items carries with it a number of consumed cycles per packet regardless of the size of the packet. A modern server may be able to forward 500kpps with out breaking a sweat (and you can see that bps can vary largely based on the frame size). If you where to make this box a firewall as well then the PPS may drop to 200kpps.