# Variables of the Simple Shared Shaper Algorithm

The formulas the simple shared shaper uses contain values maintained by the simple shared shaper algorithm, and variables that you configure.

The following factors are maintained by the simple shared shaper algorithm:

- newMeasuredRate—Sum of bytes enqueued to non-best-effort constituent queues, in bps.
- oldDynamicRate—Dynamic shaping rate from the previous rate period, in bits-per-second.
- sharedShapingRate—Configured shared shaper rate, in bps. The shared shaping rate is the total rate of all constituents of the shared shaper.

You can configure the following variables, which correspond to the commands described in Configuring Simple Shared Shaper Algorithm Variables.

- convergenceFactor—Controls the convergence of the dynamic shaping rate to the calculated shaping rate, expressed as a percentage of the available bandwidth.

  The default value of 50 percent causes the dynamic shaping rate to converge by half of the available rate each period. For example, when the dynamic rate of a 5 Mbps simple shared shaper is 1 Mbps, and the measured rate goes from 4 Mbps to 0 Mbps, 4 Mbps of bandwidth becomes available. The simple shared shaper converges from 1 Mbps to 5 Mbps by half of the available bandwidth per period. In this example, the dynamic shaping rates for several periods are 1 Mbps, 3 Mbps, 4 Mbps, 4.5 Mbps, 4.75 Mbps, and so on.

- maximumVOQL—Sets the maximum virtual output queue length (VOQL), expressed in milliseconds (ms) of the shared shaping rate.

  The default value of 4000 indicates that a 5 Mbps shared shaper does not allow the VOQL to exceed 20 Mbps. Smaller values reduce the effect of the VOQL in the simple shared shaper algorithm.

  A maximum VOQL of 0 indicates that the shared shaper ignores the VOQL. This setting is appropriate for configurations where exceeding the shared shaping rate for brief periods of time does not cause downstream queuing.

- minimumDynamicRate—Sets the minimum value for the dynamic shaping rate, expressed as a percentage of the shared shaping rate. For example, a value of 25 for a 20 Mbps shared shaper specifies that the dynamic shaping rates never be set to a value less than 5 Mbps. The default value is 0.
- reactionFactor—Controls how the simple shared shaper reacts to changing rates, expressed as a percentage. The default value of 200 changes the algorithm to use 200 percent of the changing rate.

This section describes the algorithm tasks in detail.

Step 1: Calculate the New Measured Rate

The simple shared shaper uses the following formula to calculate the new measured rate:

Step 2: Calculate the VOQL

The simple shared shaper maintains a VOQL, which cannot become less than zero, using the following formulas:

Step 3: Calculate the New Dynamic Rate

Each rate period, the simple shared shaper calculates the new dynamic rate (the shaping rate of the best-effort node or queue) using the following formula. The system prevents the new dynamic rate from becoming less than zero.

Step 4: Determine the Larger Value of the New Dynamic Rate and the Minimum Dynamic Rate

The simple shared shaper determines the larger of the new dynamic rate and a minimum dynamic rate, where the minimumDynamicRate is a fraction of the shared-shaping rate, using the following formula:

#### Related Topics

- Simple Shared Shaping Algorithm Overview
- Sample Process for Controlling the Simple Shared Shaper Algorithm