03-06-2009 01:25 PM - edited 03-04-2019 03:50 AM
In my quest for understanding QoS a bit better, I've got the follow math question.
If I want to configure shaping or policing, I get an option of something like:
police <bits> <bytes> <bytes>
The first option is in bits of, don't quote me, <8000-2000000000>. What's the easiest way to convert this to kbps. I'm assuming I divide by 1000.
So for a 2mb policer, I would multiply 2048 * 1000 = 2048000.
The second and third options are in bytes:
<1000-512000000>
How would I calculate this? Dividing by 8 only gives me 125k for the lowest value of 1000. Is that right?
Thanks,
John
Solved! Go to Solution.
03-06-2009 02:42 PM
Hello John,
actually in data communication we reason in bps (being all bit-serial communications not byte parallel)
so if you want to police/shape at 6 Mbps you need to use 6000000
bytes/sec are used for throughput measures between computers but notice that
1Kbyte /s = 1024*8 bps
1 Mbyte/s = 1024*1024*8 bps
Hope to help
Giuseppe
03-06-2009 02:03 PM
Hello John,
the first calculation is correct.
But
2Mbps = 2000 kbps = 2000000 bps
the parameters about the burst sizes: the normal burst size and the exceed burst size can be chosen there is no fixed rule here.
There are some guidelines to follow in CAR about how to choice the normal burst and max burst.
As a reference in CAR was suggested to accomodate 250msec of traffic at the rate.
The lowest values you use the strictest control you have on the traffic.
With CAR using an extended burst size greater then normal burst size allowed for an initial peak over the rate
I would suggest you to use extended pings to see the effects of the parameters
Hope to help
Giuseppe
03-06-2009 02:28 PM
Giuseppe,
So I would take the number and multiply by 1000 to get my bytes per second?
6mb * 1000 * 1000 = 6000000
If I wanted to shape/police to 6mb, it would be 6000000?
Thanks,
John
03-06-2009 02:42 PM
Hello John,
actually in data communication we reason in bps (being all bit-serial communications not byte parallel)
so if you want to police/shape at 6 Mbps you need to use 6000000
bytes/sec are used for throughput measures between computers but notice that
1Kbyte /s = 1024*8 bps
1 Mbyte/s = 1024*1024*8 bps
Hope to help
Giuseppe
03-06-2009 02:45 PM
My math is just bad =)
Thanks,
John
03-06-2009 05:23 PM
Just to muddy the waters:
03-06-2009 05:39 PM
"The second and third options are in bytes:
<1000-512000000>
How would I calculate this? Dividing by 8 only gives me 125k for the lowest value of 1000. Is that right? "
No, since the parameters is in bytes, you multiply by 8 to obtain the number of bits. These values are not a speed rate, e.g. bps, but are a size. They determine the sampling interval, a time interval, Tc. (Tc = Bc / CIR) (I believe some very recent IOS allows settings these parameters in milliseconds.)
As to how they should be set, depends on what you're trying to accomplish. (Unless you have a reason to do otherwise, and understand the 2nd and 3rd values, you might allow the device to default them [if it can].)
03-06-2009 06:11 PM
Your math is not the problem here. The problem is that there has not been a good established convention for such measurements. Within computers things are normally in binary and you do not usually wonder about that. Networking numbers are the problem:
http://archvlsi.ics.forth.gr/~kateveni/534/07a/ex01_thruput.html
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: