From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: dynamically set bandwidth limits of a virtual interface Date: Fri, 28 Dec 2012 10:35:56 +0000 Message-ID: <1356690956.2917.7.camel@iceland> References: <1356611599.19238.13.camel@iceland> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Rohit Damkondwar Cc: wei.liu2@citrix.com, "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Fri, 2012-12-28 at 07:46 +0000, Rohit Damkondwar wrote: > On Thu, Dec 27, 2012 at 6:03 PM, Wei Liu wrote: > On Thu, 2012-12-27 at 08:46 +0000, Rohit Damkondwar wrote: > > Hi all. I want to set bandwidth limits to a virtual > interface > > dynamically(without restarting virtual machine). I have been > browsing > > xen source code 4.1.3. I looked into libxen > folder(xen_vif.c) and > > hotplug(linux) folder. Earlier in xen 3.0 , xenvif struture > > (driver/net/xen-netback/ > > interface.c + common.h) and tx_add_credit function could be > used to > > modify rate limits. I want to change bandwidth limits > dynamically of a > > virtual interface in xen 4.1.3. Where should I look for in > xen 4.1.3? > > > > Please help. > > > > > Xen vif has a parameter called 'rate', I don't know whether it > suits > you. > > The rate parameter only restricts one way traffic(probably only > outgoing). > Yes, you're right. So you need two way shaping. > > Also, you can have a look at external tool like tc(8). My > vague thought > is that Vif is just another interface in Dom0, tc(8) should be > able to > traffic-shape Vif. > > > Don't you think using external tool may decrease the eifficiency ?. If > xen itself has capabailities ( provided by tc tool ), wouldn't it be > more efficient ? > Do you see significant performance degradation when using tc(8) or any other tools alike? If so, do report with figures, it can help us improve. > I have used this tool. It is good. It serves my purpose. But wudn't it > be better to include the bandwidth limiting capabilities in xen > itself? I am not sure about this. Currently I am just browsing through > the source code. What do u think ? > TBH I'm not sure about this either. Again, comparisons and analysis of bottleneck would be helpful. > > I have seen function "set_qos_algorithm_type" and paramaters > (qos/algorithm type,qos/algorithm params, qos/supported algorithms) in > vif class. Would they be useful ? Are they available only for XEN > Enterprise ? > Do you see those in libxen source code? I don't think they are in use now. Wei.