Friday, September 10, 2010

Bits per second to packets per second converter

Hi there! How is it going? Sometimes, when we talk about device performance we are talking in terms of packets per second (pps) and bits per second (bps). But in latter case it's not quite correct to say "this device can do one hundrends megabits ber second" because router/switch/whatever performance is greatly depends on packet size and if you want to mention device performance in more accurate and professional way you would say "this device can do one hundrends megabits per second at 64 bytes packet size"

Often vendors such as our favorite Cisco specify device performance as packets per second, so we don't need to bother about packet size mentioning because pps is rather a characteristic of device's (processor, bus, ASICs) computing power. Packets per second more or less still the same with different packets size. But it is not very convinient to deal with pps in a real life because we have to know "real" device performance in our network. So we have to do two things:

1) Determine the average packet size which is specific for our network. For example traffic profile for our network could be 30% ftp-data (large packet at 1500 bytes) and 70% VoIP-data (a lot of small packets at 64 bytes) so our average packet size is about 800 bytes.

2) Calculate with simple formula how much there will be Megabits per second (Mbps) if our average packet size is 800 bytes and device performance is, lets say, 100 kpps (one hundred thousands of packet per second)
The second step is not a big deal for a real professional, but we live in 21st century, aren't we? Unfortunately I didn't found any bps to pps converter/calculator anywhere online so I decided to make it myself (though I'm not a programmer).

Although converter is mathematically correct (I hope ;) I'm not sure it's fair to use it as a "exact throughput" reference. As I said before device performance is greatly depends on packet size, but this dependency is not quit linear one.
For example as pretty old cisco document says FWSM performance at 64-byte packet size and 2.84Mpps is about 1.3Gbps. If we would recalculate 2.84Mpps with 1500 bytes per packet we should get about 30Gbps throughput which is not true. FWSM throughput is about 5.5Gbps at 1400 bytes packet length. So, clearly some additional inspections made for a greater payload.

The hand-made not state of the art quick and dirty bits per second to packets per second converter can be found at CCIEvault Tools page. Feel free to advice me on any improvements I can make on this tool.

P.S. There is one more thing I need to say. There are at least three well know packet size: the least one - 64 bytes (toughest case for device, usually referred with router/switch performance), the biggest one 1500 bytes (sometimes 1400 bytes) usually referred with firewall/VPN performance and the so-called "real" one - IMIX at 427 bytes, which represents an average packet size somewhere in the Internet (but I saw values in between 300-900 bytes)

Courtesy : http://ccievault.net/index.php/articles/37-cvnarticles/58-bps2pps

Link :
http://www.cisco.com/web/about/security/intelligence/network_performance_metrics.html
http://www.tomshardware.com/forum/19880-42-maximum-maximum-packets-megabit-ethernet
http://blog.famzah.net/2009/11/24/benchmark-the-packets-per-second-performance-of-a-network-device/
http://www.numion.com/calculators/Distance.html
http://www.tamos.net/~rhay/wp/overhead/overhead.htm
http://www.tamos.net/~rhay/wp/atm-ip/aal5-atm-ip.htm
http://www.compwisdom.com/topics/Bits-per-second