Go to main content

Managing Network Virtualization and Network Resources in Oracle® Solaris 11.3

Exit Print View

Updated: April 2018
 
 

Bandwidth Share for VNICs

Bandwidth share for a VNIC is the minimum share of the bandwidth that the VNIC will get when there is competition from other VNICs on the same datalink. You use the bwshare property to allocate the bandwidth share for a VNIC. You can allocate the bandwidth share only on the datalink that supports the bwshare property. Currently, only the Intel XL710 10/40 Gigabit Ethernet controller NIC supports the bwshare property. You can check whether a datalink supports the bwshare property by using the dladm show-linkprop command. See Example 33, Determining Whether a Datalink Supports the bwshare Property.

Note that the bandwidth is allocated among all the active VNICs. The amount of bandwidth that is allocated to a VNIC is proportional to the bandwidth share that is set for the VNIC. For example, consider two VNICs, vnic1 and vnic2, configured on a 1 gigabits per second (Gbps) link. You set the bwshare property on vnic1 and vnic2 as follows:

# dladm set-linkprop -p bwshare=40 vnic1
# dladm set-linkprop -p bwshare=10 vnic2

In this example, the bandwidth share of vnic1 is 40 and vnic2 is 10. Because the VNICs are configured on a 1 Gbps link, vnic1 can use up to 800 megabits per second (Mbps) of bandwidth (1Gbps * 40/(40+10)) and vnic2 can use up to 200 Mbps of bandwidth (1Gbps * 10/(40+10)).

This example assumes that both the VNICs have network traffic to consume their share of the bandwidth. However, if vnic1 uses only 100 Mbps, then vnic2 can use up to 900 Mbps. By using bandwidth shares, no bandwidth is wasted when there is a VNIC that can use the bandwidth. At the same time, bandwidth shares ensure an allocated share for a VNIC when there is competition from other VNICs.

Considerations for the bwshare Property

Note the following considerations when using the bwshare property:

  • You can assign a value from 1 to 100 for the bwshare property. The value is a relative share value and does not indicate a percentage of the bandwidth. The value can be indicated as a percentage if you keep the sum of the values for the bwshare property for all the VNICs on a link at or below 100.

  • For the dladm show-linkprop command output, the effective value for the bwshare property is displayed as a percentage. The effective value is the minimum percentage of the bandwidth guaranteed to the VNIC when there is competition from other VNICs on the same datalink. The effective value changes depending on the other VNICs that are configured on the datalink.

  • If you have set the maxbw property for the VNIC, the traffic is limited by the maxbw value. The maxbw property is enforced on the VNIC before the bwshare property is applied.

  • You can have VNICs that are set with the bwshare property and VNICs that are not set with bwshare property on the same datalink. In this case, the share of the bandwidth is undefined for the VNICs that are not set with the bwshare property. There is no change to the current behavior, if you have not set the bwshare on any VNIC on a link.

Example 33  Determining Whether a Datalink Supports the bwshare Property

The following example shows how to check whether a datalink supports the bwshare property. In this example, the z1/net1 datalink is a VF VNIC. The value 1-100 under the POSSIBLE column in the output indicates that the underlying datalink supports the bwshare property.

# dladm show-linkprop -p bwshare
LINK     PROPERTY        PERM VALUE        EFFECTIVE    DEFAULT   POSSIBLE
z1/net1  bwshare         rw   --           --           --        1-100

The following example shows the output for a net0 datalink that does not support the bwshare property.

# dladm show-linkprop -p bwshare
LINK     PROPERTY        PERM VALUE        EFFECTIVE    DEFAULT   POSSIBLE
net0     bwshare         r-   --           --           --        -- 
Example 34  Setting the bwshare Bandwidth Property for a VNIC

The following example shows how to set the bwshare property for the VF VNIC z1/net1.

# dladm set-linkprop -t -p bwshare=60 z1/net1
# dladm show-linkprop -p bwshare
LINK     PROPERTY        PERM VALUE        EFFECTIVE    DEFAULT   POSSIBLE
z1/net1  bwshare         rw   60           100%         --        1-100 

The value under the EFFECTIVE column indicates that the VNIC z1/net1 uses 100% of the bandwidth. However, the effective value changes when you set the bwshare property for the VNIC z1/net2 configured on the same underlying datalink.

# dladm show-linkprop -p bwshare
LINK     PROPERTY        PERM VALUE        EFFECTIVE    DEFAULT   POSSIBLE
z1/net1  bwshare         rw   60           50%          --        1-100 
z1/net2  bwshare         rw   60           50%          --        1-100

The output shows that the effective value for z1/net1 has changed from 100% to 50%.

Interaction of the bwshare Property With DCB Bandwidth Shares

The etsbw_lcl property supports the setting of the bandwidth share as a fixed percentage of the bandwidth of the physical NIC. However, it is supported only if the NIC is in DCB mode. DCB mode is not on by default and DCB is only used when the switch supports DCB.

You cannot set the bwshare property if the NIC is in DCB mode. The bwshare property is not effective if you set the bwshare property and then set DCB mode to on. In this case, the EFFECTIVE value is displayed as -- for the dladm show-linkprop command output.