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 20: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 hundred megabits ber second" because router/switch/whatever performance is greatly depends on packet size and if you want to mention device performance in a more accurate and professional way you would say "this device can do one hundred 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 thousand of packets 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 an "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)

UPD: Well, there is some discussion going on in comments for some time already about whether 1Kilobit is 1000 or 1024 bits. Well, I have to say that I spent some time trying to find out a true and ultimate answer. I found none. Most people (network professionals) I asked answered with 1024. The smartest of them (and those who aren't lazy enough to visit wikipedia) answered with 1000. Does that mean that smart guys are closer to the truth? Doubt it :). Because I'm looking not for a smart answer, but for a practical one. And the answer is inside network software and hardware. And who said that those programmers who write code for routers and switches are smart (check this and search for kilobit)? :P :D So the only way to find it out is to check how bits are converted to kilobits by the network devices. Any ideas?
Till then I have 1Kbps == 1024bits in my formula. If you aren't agree just use bits in calculation, than convert to Kbps and Mbps the way you like :)
Last Updated on Friday, 28 December 2012 12:23
 

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
 
 
# david 2008-12-18 16:41
I'll second the request for the formula.
Reply
 
 
# 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
 
 
# Jeff 2011-08-29 21:21
1 byte = 8 bits? Technically yes for data, but I thought for transmission that there is a start bit and stop bit on each byte, therefore there are 10 bits per transmitted byte. No?
Reply
 
 
# 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
 
 
# ggggg 2010-06-01 22:51
please read carefully your given references
Reply
 
 
# Eric Cartman 2011-06-10 02:59
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

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

You're seriously tripping balls smartass.
Reply
 
 
# 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
 
 
# rc 2011-04-21 10:25
add 4 bytes if the packet is tagged?
Reply
 
 
# 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
 
 
# BlackDon 2010-09-19 23:13
@niwa

youre the dumb because 1024 is the official number they count in.

1 bit
1 byte = 8 bits
1 kilobyte = 1024 bytes
1 mega byte = 1024 kilobytes
1 giga byte = 1024 megabytes
1 tera byte = 1024 gigabytes
1 peta byte = 1024 tegabytes
1 exa byte = 1024 petabytes

the forluma is very simple.
Wikipedia only counts in 1000's because its easier to understand for people who dont know how to count in 1024's like you.

so dont call people dumb's if you dont even know youre self what youre talking about.

Sure its no big deal,
just wanted to say this ;)
Reply
 
 
# BlackDon 2010-09-20 00:54
Plus, 1024 is DATA
and 1000 Isnt
Reply
 
 
# 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
 
 
# Guest 2011-03-05 23:25
Guys FYI, use 1024 as multiples when referring to data stored in a device, but always use 1000 multiples while talking of transmission.
Reply
 
 
# Guest 2011-07-11 04:52
And what about MTU in the case of Ethernet (which seems to be what you're discussing here)? Aren't all packets, no matter how small, padded out to one ethernet frame anyway?

1500 bytes in normal cases, and sometimes 9k or even 16k in the case of some 10Gb networks.
Reply