Sunday, 21 October 2018

Solaris 11 : How to Control Allocated Bandwidth of Network Interface on Per App/User Basis By Devan

Solaris 11 : How to Control Allocated Bandwidth of Network Interface on Per App/User Basis

Bandwidth management enables you to assign a portion of the available bandwidth of a NIC to consumers, such as an application or a customer. You can control bandwidth on a per-application, per-port, per-protocol, and per-address basis. Bandwidth management ensures efficient use of a large amount of bandwidth available from the new GLDv3 network interfaces. Resource control features enable you to implement a series of controls on an interface’s available bandwidth.
The allocated portion of bandwidth is known as a share. By setting up shares, you can allocate enough bandwidth for applications that cannot function properly without a certain amount of bandwidth. For example, streaming media and Voice over IP consume a great deal of bandwidth. You can use the resource control features to guarantee that these two applications have enough bandwidth to successfully run. You can also set a limit on the share. The limit is the maximum allocation of bandwidth that the share can consume. Using limits, you can contain noncritical services from taking away bandwidth from critical services.
You can prioritize among the various shares allotted to consumers. You can give the highest priority to critical traffic, such as heartbeat packets for a cluster, and lower priority for less critical applications.
You can control bandwidth usage through the management of flows (by using the flowadm command) and link utilization (by using the dladm command).
The figure below shows you how to restrict flows and lower priority on a VNIC. Flows consist of network packets that are organized according to an attribute. Flows enable you to further allocate network resources.
fig

Example of Bandwidth Management

In the example in below, a flow named http1 is created by using the flowadm command. This user-designed flow (http1) restricts vnic2 bandwidth to 100 Mbits/s and sets the link priority to low.
1. First, create the flow named http1 using vnic2.
# flowadm add-flow -l vnic2 -a transport=tcp,local_port=80 http1
2. Restrict the bandwidth of the flow to 100Mbps.
# flowadm set-flowprop –p maxbw=100M http1
3. Verify the creation of flow http1 using the below command.
# flowadm show-flowprop http1
FLOW        PROPERTY     PERM    VALUE      DEFAULT     POSSIBLE
http1       maxbw        rw      100        --          --
http1       priority     rw      medium     medium      low,medium,high
http1       hwflow       r-      off        --          on,off
4. Set the link priority to low.
# dladm set-linkprop –p priority=low vnic2
5. Verify the link priority with dladm command.
# dladm show-linkprop –p priority vnic2
LINK     PROPERTY     PERM    VALUE     EFFECTIVE    DEFAULT    POSSIBLE
vnic2    priority     rw      low       low          medium     low,medium,high

No comments:

Post a Comment