# QoS Calculation

Mar 6th, 2009

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

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

Overall Rating: 4.5 (2 ratings)

## Replies

Giuseppe Larosa Fri, 03/06/2009 - 14:03

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

John Blakley Fri, 03/06/2009 - 14:28

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

Giuseppe Larosa Fri, 03/06/2009 - 14:42

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

Joseph W. Doherty Fri, 03/06/2009 - 17:39

"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].)