Usage of flowadm in Solaris 11

In this post I am going to show the usage of flowadm to limit the network BW(bandwidth).  I am going to show you the difference in speed and time, which will occur while we are transferring the file from one zone to another zone when flowadm is not implemented and when it’s implemented.

My Lab setup I have created two non-global zones. I am copying one large file from one zone to another. Without the use of flow administration it will try to take the whole bandwidth to copy the file. We can limit that BW using flowadm

Without using flowadm in non-global zone.

root@n2zone1:/# scp procmy.tar root@192.168.120.163:/tmp

Password:

procmy.tar           100% |*********************************************************************************************************************|   319 MB    00:40

 

Now adding flow limitation. Here I am adding flow limitation for destination IP where I want to copy the file.

root@n2zone1:/# flowadm add-flow -l vnic1 -a remote_ip=192.168.120.163 n2zone2

root@n2zone1:/# flowadm show-flow

FLOW        LINK                IPADDR                   PROTO  LPORT   RPORT   DSFLD

n2zone2     vnic1               RMT:192.168.120.163/32   —     —      —      —

root@n2zone1:/# flowadm show-flowprop

FLOW         PROPERTY        VALUE          DEFAULT        POSSIBLE

n2zone2      maxbw           —             —             —

 

Setting the BW to 1Mbps for transfer, by editing the propery of added flow.

 

root@n2zone1:/# flowadm set-flowprop -p maxbw=1 n2zone2

root@n2zone1:/# flowadm show-flowprop

FLOW         PROPERTY        VALUE          DEFAULT        POSSIBLE

n2zone2      maxbw               1          —             —

Now to see the time taken by copy. It is taking more time becase now BW is limited. So in this way we want to perform task for which we don’t want to consume the whole BW we can use this procedure.

root@n2zone1:/# scp procmy.tar root@192.168.120.163:/tmp

Password:

procmy.tar           100% |*********************************************************************************************************************|   319 MB    47:09

 

This flowadm will be applicable only to one specified remote IP, not to all. In the below scenario copy will again take less time and more BW if we are using different IP address.

 

root@n2zone1:/# scp procmy.tar root@192.168.120.155:/tmp

The authenticity of host ‘192.168.120.155 (192.168.120.155)’ can’t be established.

RSA key fingerprint is e3:ec:e4:6f:01:9a:f6:c7:6d:68:66:68:11:c5:18:5d.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added ‘192.168.120.155’ (RSA) to the list of known hosts.

Password:

procmy.tar           100% |**********************************************************************|   319 MB    02:13

 

Thanks for reading !!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s