# Using Expressions for Bandwidth and Burst Values in a Scheduler Profile

Expressions are combinations of constants and operators. You can specify some scheduler profile attributes using an expression, such as the shaping rate. All operations within expressions are performed using 64 bit unsigned math, resulting is a 32 bit, signed integer value.

Expressions consist of both operators and operand values. Operators are mathematical functions, and operand values are the inputs for the mathematical function. Operand values can be an integer. You specify an expression consisting of an operand, followed by zero or more [ operator, operand ] pairs.

You can specify bandwidth as a percentage and burst in milliseconds or bytes by using expressions with the shaping-rate, shared-shaping-rate, assured-rate, and weight commands.

When calculating constant shaping rates, use the following formula to translate burst values from bytes to milliseconds (ms):

Using this formula, a 2 Mbps service with a 500 KB burst yields:

The shaping rate is calculated when the QoS profile is attached based on the parameter instance. For example:

host1(config)# scheduler-profile sp-1mbs (config-scheduler-profile)# shaping-rate video-bandwidth % 100 burst 500 milliseconds

When the shaping rate for video-bandwidth is 2 Mbps, the burst value is calculated using the following formula:

The burst value in bits is calculated as:

The burst value in bytes is calculated as:

#### Related Documentation

- For more information about using expressions within scheduler profiles that are used for QoS parameters, see Scheduler Profiles and Parameter Expressions for QoS Administrators
- Configuring Rate Shaping for a Scheduler Node or Queue
- Configuring Port Shaping
- Configuring an Assured Rate for a Scheduler Node or Queue
- Configuring the HRR Weight for a Scheduler Node or Queue
- Configuring Simple Shared Shaping
- Configuring Compound Shared Shaping