Recipe 3.11 Ethernet Traffic Shaping - VMWare Cookbookby Ryan Troy and Matthew Helmke
You want to make sure that a server does not overload or hog your network.
This excerpt is from VMWare Cookbook. This book provides a look into real-world use of VMware ESX and ESXi, with step-by-step solutions for problems that occur in a wide range of environments. Written by experts with experience using VMware in a production environment, VMware Cookbook shares tips and tricks earned through trial and error, and supplies the background you need to apply them.
ESX server offers traffic shaping under the administrator’s control.
ESX server can throttle and shape network traffic by adjusting three outbound characteristics:
- Average Bandwidth
The number of bits per second to allow across the vSwitch, averaged over time.
- Peak Bandwidth
The maximum amount of bandwidth in kilobits (kbps) the vSwitch or port group can handle. If the traffic exceeds the peak bandwidth specified, the packets will be queued for later transmission. If the queue is full, the packets will be discarded and dropped.
- Burst Size
The maximum number of bytes that the port is allowed to burst. If the packet exceeds the burst size parameter, the remaining packets will be queued for later transmission. If the queue is full, the packets will be discarded and dropped. If you set the average and the peak, then this is a multiplicative factor of how long the bandwidth can exceed the average at any rate before if must come back down to the average. The higher it goes, the less time it can stay there with any particular burst size.
These values can be configured using the vCenter client on a specific port group within the vSwitch. Bandwidth shaping in ESX is currently supported only on outbound traffic; these characteristics are ignored for inbound traffic.
To make changes to the traffic shaping policy:
Figure 3.16. vSwitch Properties link
Figure 3.17. Viewing vSwitch properties
Figure 3.18. Traffic shaping enabled
Log into vCenter Server and select the server from the inventory list.
Select the Configuration tab from the right window pane and navigate to Networking. Any current network configurations will be displayed.
Click the properties link of the vSwitch you wish to modify (Figure 3.16, “vSwitch Properties link”).
Select the vSwitch or port group you wish to modify and clickvthe Edit button (Figure 3.17, “Viewing vSwitch properties”).
A new pop-up window will appear. Click the Traffic Shaping tab to change the policy exceptions (Figure 3.18, “Traffic shaping enabled”).
Notice that the traffic shaping status is disabled by default. When this is disabled, you will not be able to make any changes to the various settings. To enable it, select Enabled from the status drop-down box, and the three configurable options will become available for you to modify to suit your needs.
The traffic shaping policy is then applied to each individual virtual adapter that is attached to the port group (not to the entire vSwitch).
If you enjoyed this excerpt, buy a copy of VMWare Cookbook.