juniper:how_many_packets_per_second_per_port_are_needed_to_achieve_wire-speed

This is an old revision of the document!


SUMMARY:

When evaluating or measuring an Ethernet device's (switches, routers, firewalls) performance capabilities, the main indicator that most will consider is the raw bandwidth that the device backplane can provide.

However it is also important to make sure that the device has the capacity or the ability to switch/route as many packets as required to achieve wire rate performance. This metric is called the ‘Packets per Second’ or PPS for short.

This article details how to calculate how many packets per second processing capabilities is required from a port to achieve wire-rate performance.

SOLUTION:

Note: This article focuses on Ethernet; other mediums such as ATM will have other considerations for calculating PPS.

To calculate the amount of packets per second a port must be able to handle to achieve wire-rate performance we need to take into consideration the fact that the IP protocol allows for variable payload sizes which in turn plays a part in our PPS calculation.

The smaller the packet passing on the wire the more packets that need to be switched to achieve wire-rate performance; while on the other hand, larger packets will require less PPS throughput to achieve wire-rate. As such to calculate how many PPS needed to achieve wire-speed we need only be concerned with small packet sizes since they will be the most taxing for the switch and will yield the larger PPS number. Naturally we will assume that no collisions occur on the medium.

We need to see how much ‘space’ each packet will occupy so we will look at the frame size in which the smallest packet will be encapsulated, as well as the inter-frame gap, and the preamble since they occupy ‘space’ in between frames.

Figure 1: ‘Space’ Occupied by the smallest packet

As seen in figure 1, a packet will occupy at least 84 bytes on the wire. So taking the example of a 1G port we first have to convert the speed into bytes:

1Gbps = 1,000,000,000 bits/s = (1,000,000,000 bits/s) / (8 bits/byte)= 125,000,000 bytes/s

Then we can calculate how many packets per second need to be processed if the port is to transmit at wire speed:

PPS = (125,000,000 bytes/s) / (84 bytes/packet) = 1,488,095 pps.

Similarly this same calculation can be extended to different port speeds:

Table 1: PPS Calculation

From the above table we see how many packets per second an Ethernet device must be able to handle per port in order to achieve wire speed. The above calculation however does not take into consideration additional tags that might be available in an Ethernet frame such as VLAN tags or MPLS labels. These will be covered in the following sections.

VLAN Tags

VLAN Tagging or Trunking is used to carry multiple VLANs over one physical wire. To do so we need a distinguisher for the different VLANs traversing the link. There are multiple methods to perform the VLAN identification but for the scope of this article we will only look at the standards based method which is the IEEE 802.1q.

The IEEE 802.1q standard states that Ethernet ports in trunk mode will insert a 32bit field between the Source MAC address and the Type field. Consequently our ‘minimum’ frame will have the following appearance on the wire:

juniper/how_many_packets_per_second_per_port_are_needed_to_achieve_wire-speed.1708265637.txt.gz · Last modified: 2024/02/18 09:13 by aperez

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki