Impact of Traffic Shaping

Posted by

A traffic shaping policy is defined by average bandwidth, peak bandwidth, and burst size. You can establish a traffic shaping policy for each port group and each distributed port or distributed port group.

ESXi shapes outbound network traffic on standard switches and inbound and outbound traffic on distributed switches. Traffic shaping restricts the network bandwidth available on a port, but can also be configured to allow bursts of traffic to flow through at higher speeds.

Average Bandwidth:

Establishes the number of bits per second to allow across a port, averaged over time. This number is the allowed average load.

Peak Bandwidth:

Maximum number of bits per second to allow across a port when it is sending or receiving a burst of traffic. This number limits the bandwidth that a port uses when it is using its burst bonus.

Burst Size:

Maximum number of bytes to allow in a burst. If this parameter is set, a port might gain a burst bonus if it does not use all its allocated bandwidth. When the port needs more bandwidth than specified by the average bandwidth, it might be allowed to temporarily transmit data at a higher speed if a burst bonus is available. This parameter limits the number of bytes that have accumulated in the burst bonus and transfers traffic at a higher speed.

From https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.networking.doc/GUID-D3A091C0-0D0D-480D-ACE3-62524E2E0D0A.html

Let’s take an example:

Assuming Traffic Shaping configuration as:

Average Bandwidth (Kbps)Peak Bandwidth (Kbps) Burst Size (KB)
1000 2000 1024

Calculations:

When Burst Size (KB) < Burst Size (KB)Configured

Burst Size (KB) = Current Burst Size + Burst Size Credit

When Burst Size (KB) = Burst Size (KB)Configured

Burst Size (KB) = Current Burst Size

Bust Size Credit = [Average Bandwidth Configured – Average Bandwidth]/8 KB

Peak bandwidth allowed for (Milliseconds) =  [(Bust Size Credit * 8)/Peak Bandwidth Configured]*1000

Assuming Real time Stats as:

Average Bandwidth (Kbps) Bust Size (KB) Bust Size (KB) Credit Peak bandwidth for (Milliseconds)
1000 0 0 0
733 33.375 33.375 133.5
1000 33.375 0 133.5
600 83.375 50 333.5
1000 83.375 0 333.5
700 120.875 37.5 483.5
600 170.875 50 683.5
1000 170.875 0 683.5
1000 170.875 0 683.5
1000 170.875 0 683.5
900 183.375 12.5 733.5
800 208.375 25 833.5
1000 208.375 0 833.5
300 295.875 87.5 1183.5
400 370.875 75 1483.5
500 433.375 62.5 1733.5
800 458.375 25 1833.5
0 583.375 125 2333.5
0 708.375 125 2833.5
0 833.375 125 3333.5
700 870.875 37.5 3483.5
500 933.375 62.5 3733.5
2000 808.375 -125 3233.5
2000 683.375 -125 2733.5
2000 558.375 -125 2233.5
2000 433.375 -125 1733.5
2000 308.375 -125 1233.5
2000 183.375 -125 733.5
2000 58.375 -125 233.5
2000 -66.625 -125 -266.5
1000 -66.625 0 -266.5
1000 -66.625 0 -266.5
1000 -66.625 0 -266.5
1000 -66.625 0 -266.5
1000 -66.625 0 -266.5
1000 -66.625 0 -266.5
1000 -66.625 0 -266.5
999 -66.5 0.125 -266
999 -66.375 0.125 -265.5
800 -41.375 25 -165.5
1000 -41.375 0 -165.5
1000 -41.375 0 -165.5
1000 -41.375 0 -165.5
999 -41.25 0.125 -165
1000 -41.25 0 -165
1000 -41.25 0 -165
1000 -41.25 0 -165
700 -3.75 37.5 -15
600 46.25 50 185
2000 -78.75 -125 -315
1000 -78.75 0 -315
1000 -78.75 0 -315
1000 -78.75 0 -315
300 8.75 87.5 35
200 108.75 100 435
300 196.25 87.5 785
999 196.375 0.125 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
1000 196.375 0 785.5
700 233.875 37.5 935.5
999 234 0.125 936
200 334 100 1336
2000 209 -125 836
2000 84 -125 336
2000 -41 -125 -164
1000 -41 0 -164
1000 -41 0 -164
1000 -41 0 -164
777 -13.125 27.875 -52.5
666 28.625 41.75 114.5
555 84.25 55.625 337
444 153.75 69.5 615
2000 28.75 -125 115
2000 -96.25 -125 -385
1000 -96.25 0 -385
1000 -96.25 0 -385
700 -58.75 37.5 -235
600 -8.75 50 -35
1000 -8.75 0 -35
1000 -8.75 0 -35
1000 -8.75 0 -35
1000 -8.75 0 -35
1000 -8.75 0 -35
1000 -8.75 0 -35
1000 -8.75 0 -35
400 66.25 75 265
2000 -58.75 -125 -235
1000 -58.75 0 -235