close
Top Panel
Top Panel
Top Panel
Bits per second to packets per second converter PDF Print E-mail
Written by Alexei Spirin   
Tuesday, 01 January 2008 12:02

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)

Last Updated on Sunday, 23 May 2010 04:22
 

Comments  

 
# john 2008-11-28 14:47 great work, it would be great if you can list the formula used against pps to bps. Reply | Reply with quote | Quote
 
 
# david 2008-12-18 16:41 I'll second the request for the formula. Reply | Reply with quote | Quote
 
 
# Steve 2008-12-27 09:08 The formula is very basic;
1 byte (B) = 8 bits (b)
1 Kilobit (Kb) = 1024 bits
1 Megabit (Mb) = 1024 Kb or 1,048,576 bits
1 Gigabit (Gb) = 1024 Mb or 1,048,576 Kb or 1,073,741,842 bits
ect.

So 10,000 packets per second of 64 byte packets (don't forget to calculate your CRC on top of that that adds 4 bytes, so it is really 68 bytes) is as follows;
68 bytes x 8 = 544 bits
10000 packets per second x 544 bits per packet = 5,440,000 bits per second
5440000 bits per second / 1024 bits per kilobits = 5,312.5 Kbps
5312.5 Kbps /1024 Kb/Mb = 5.18798828125 Mbps
Reply | Reply with quote | Quote
 
 
# Jackson Lancaster 2009-04-14 17:20 I dont think your definition of Kilobit, Megabit, and Gigabit is correct. 1 Kilobit = 1000 bits, 1 Megabit = 1,000,000 bits, and 1 Gigabit = 1,000,000,000 bits . You use the 1024 number when you convert to/from bits to bytes.
See reference
http://en.wikipedia.org/wiki/Kilobits
http://en.wikipedia.org/wiki/Megabit
http://en.wikipedia.org/wiki/Gigabit
Reply | Reply with quote | Quote
 
 
# ggggg 2010-06-01 22:51 please read carefully your given references Reply | Reply with quote | Quote
 
 
# Sharath Samanth 2009-09-06 01:23 Steve,

"(don't forget to calculate your CRC on top of that that adds 4 bytes, so it is really 68 bytes) "

Ethernet Header and Trailer is 18 bytes.

DMAC = 6Bytes.
SMAC = 6Bytes.
Length = 2Bytes.
CRC = 4Bytes.

For a frame to be valid, 46Bytes of payload is minimum to construct a 64Byte frame. You dont need to add 4Bytes to make it 68Bytes.
Reply | Reply with quote | Quote
 
 
# niwa 2009-10-03 23:49 Quoting Jackson Lancaster:
I dont think your definition of Kilobit, Megabit, and Gigabit is correct. 1 Kilobit = 1000 bits, 1 Megabit = 1,000,000 bits, and 1 Gigabit = 1,000,000,000 bits . You use the 1024 number when you convert to/from bits to bytes.
See reference
http://en.wikipedia.org/wiki/Kilobits
http://en.wikipedia.org/wiki/Megabit
http://en.wikipedia.org/wiki/Gigabit

dumb..
Reply | Reply with quote | Quote
 
 
# rombout 2010-01-30 16:17 no big deal - byte size is only relevant in data storage and packet size -Transmission speeds / feeds are always bit aligned , so indeed the conversion between Mbps and Gbps is an easy one. Only thing the formula needs to take into account as well is that most vendors calculate bi-directional speed (i.e. a 1Gbps ethernet port would be counted as 2 Gbps since we can Tx and Rx simultaneously… Reply | Reply with quote | Quote