VMware Cloud Community
roeybl
Contributor
Contributor

Configure traffic shaping

Hi,

I can't understand how the traffic shaping works.

I find this

Average Bandwidth

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

Peak Bandwidth

The maximum number of bits per second to allow across a port when it is sending or receiving a burst of traffic. This limits the bandwidth used by a port whenever it is using its burst bonus.

Burst Size

The 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. Whenever the port needs more bandwidth than specified by 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 thus transfers at a higher speed.

And didn't really understand.

If I want to configure to one virtual port 5Mbit symmetry – 5Mbit up and 5Mbit down (actual speed is 625kbit up 625kbit down) what should I configure in average bandwidth, peak bandwidth and burst size.

Thanks

Roey

0 Kudos
10 Replies
bobbygedwards
Contributor
Contributor

First,  If at all possible do not use traffic shaping.  I mean, purchase another NIC and load balance if you're running in to network resource contention.

However, if you have certain constraints and must use traffic shaping maybe I can help explain slightly.  These definitions apply to what I think your trying to do based on your attached screen shot:

  • Average Bandwidth is measured in kilobits per second, and is what's allowed across the vSwitch per second from the selected Port Group.

  • Peak Bandwidth is also measured in kilobits per second, and identifies the maximum amount that's allowed to pass from the selected Port Group without packets being dropped.

  • Burst Size is measured in kilobytes.  Burst size is a calculation of bandwidth multiplied by time.  If there is a period of network resource contention and a network burst from the selected Port Group exceeds the defined Burst Size packets are then dropped in favor of other traffic on the vSwitch.  Unless the network traffic queue is not full in which case the packets will just be queued up.

It's key to note that the traffic shaping we are talking about is only going to regulate a VM's outbound bandwidth capability.  So I'm not sure it will help you ensure a 5Mbit symmetric line.  You could set the Average Bandwidth to 625, but the Peak Bandwidth and Burst Size really don't apply to what your trying to do.

I feel like this is slightly unclear so please let me know if you have any questions.

0 Kudos
rlund
Enthusiast
Enthusiast

Roey,

Why the requirement?

If your looking for switch port speed configuration, I would look at something like the Cisco 1000v, depending on the underlying switch infrastructure.

Roger lund

Roger Lund Minnesota VMUG leader Blogger VMware and IT Evangelist My Blog: http://itblog.rogerlund.net & http://www.vbrainstorm.com
0 Kudos
roeybl
Contributor
Contributor

rlund,

I have 7 virtual machines on the VM server

And I have 50Mbit download 50Mbit upload in my network

I don’t want 1 machine to take all my bandwidth so I want to limit each virtual machine to 5Mbit download and 5Mbit upload

Is there a way to do that?

0 Kudos
roeybl
Contributor
Contributor

bobbygedwards,

Hi,

Thanks for your explanations, it is very helpful.
I have an application which I need to test how it functional under several bandwidth limitations, I prefer not to buy a switch or router. So, I wish to limit the VPS by outbound/inbound bandwidth. Could you recommend me a better way to do that?

0 Kudos
kjb007
Immortal
Immortal

Traffic Shaping is not really going to do this for you, as that layer looks at the vSwitch or portgroup level for the traffic, not at the vm.

If you're using 5, then you want to check out Network IO Control.

http://www.vmware.com/products/network-io-control/overview.html

http://www.vmware.com/files/pdf/techpaper/VMW_Netioc_BestPractices.pdf

It will allow you to set priority/shares for the vm's to control congestion and to do what you want without setting a hard limit as traffic shaping would.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
bobbygedwards
Contributor
Contributor

You can use traffic shaping to simulate limiting the bandwidth to a Port Group, and looking at the screenshot you supplied it looks like you have individual Port Groups for each VM.  If this is case you could use the traffic shaping settings to simulate limited bandwidth per VM.

0 Kudos
roeybl
Contributor
Contributor

what should i configure there if i whant 5Mbit up and 5Mbit down ?

0 Kudos
kjb007
Immortal
Immortal

A regular vSwitch is transmit side shaping only.  A dvSwitch can be used for Tx and Rx limiting.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos
roeybl
Contributor
Contributor

Ok I understand.

Where can I read about dvswitch?

I need to have a special license for this?

0 Kudos
kjb007
Immortal
Immortal

Yes, dvSwitch requires Ent Plus license.

http://www.vmware.com/files/pdf/vsphere-vnetwork-ds-migration-configuration-wp.pdf

You can do Tx limit from ESX, and if you're using a managed switch, you can do Rx side limit from the physical switch. Otherwise, you're stuck wtih Tx side only.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
0 Kudos