[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] problem with outbound limiting



On 08/10/2011 02:55 AM, Upendra Moturi wrote:

Hi,

  does this patch solve your problem? I am setting the MTU to fixed 2kb. Doing tests with scp seems to indicate that this improved the situation -- at least for me.

  Stefan

Signed-off-by: Stefan Berger <stefanb linux vnet ibm com>

---
 src/util/network.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Index: libvirt-acl/src/util/network.c
===================================================================
--- libvirt-acl.orig/src/util/network.c
+++ libvirt-acl/src/util/network.c
@@ -1156,8 +1156,8 @@ virBandwidthEnable(virBandwidthPtr bandw
 
         virCommandFree(cmd);
         cmd = virCommandNew(TC);
-            virCommandAddArgList(cmd,"class", "add", "dev", iface, "parent",
-                                 "1:", "classid", "1:1", "htb", NULL);
+        virCommandAddArgList(cmd,"class", "add", "dev", iface, "parent",
+                             "1:", "classid", "1:1", "htb", NULL);
         virCommandAddArgList(cmd, "rate", average, NULL);
 
         if (peak)
@@ -1170,9 +1170,9 @@ virBandwidthEnable(virBandwidthPtr bandw
 
         virCommandFree(cmd);
         cmd = virCommandNew(TC);
-            virCommandAddArgList(cmd,"filter", "add", "dev", iface, "parent",
-                                 "1:0", "protocol", "ip", "handle", "1", "fw",
-                                 "flowid", "1", NULL);
+        virCommandAddArgList(cmd,"filter", "add", "dev", iface, "parent",
+                             "1:0", "protocol", "ip", "handle", "1", "fw",
+                             "flowid", "1", NULL);
 
         if (virCommandRun(cmd, NULL) < 0)
             goto cleanup;
@@ -1191,8 +1191,8 @@ virBandwidthEnable(virBandwidthPtr bandw
 
         virCommandFree(cmd);
         cmd = virCommandNew(TC);
-            virCommandAddArgList(cmd, "qdisc", "add", "dev", iface,
-                                 "ingress", NULL);
+        virCommandAddArgList(cmd, "qdisc", "add", "dev", iface,
+                             "ingress", NULL);
 
         if (virCommandRun(cmd, NULL) < 0)
             goto cleanup;
@@ -1202,7 +1202,7 @@ virBandwidthEnable(virBandwidthPtr bandw
         virCommandAddArgList(cmd, "filter", "add", "dev", iface, "parent",
                              "ffff:", "protocol", "ip", "u32", "match", "ip",
                              "src", "0.0.0.0/0", "police", "rate", average,
-                             "burst", burst, "mtu", burst, "drop", "flowid",
+                             "burst", burst, "mtu", "2kb", "drop", "flowid",
                              ":1", NULL);
 
         if (virCommandRun(cmd, NULL) < 0)



small correction
it is not mbps ,it is MBps

On Wed, Aug 10, 2011 at 12:06 PM, Upendra Moturi <upendra m hexagrid com> wrote:
Hi

I am using 0.9.4 version of libvirt and want to limit bandwidth.
I installed libvirt on ubuntu 11.04 using libvirt source.

For this i am using the QOS configuration

<devices>
    <interface type='network'>

      <source network='default'/>
      <target dev='vnet0'/>
      <bandwidth>
        <inbound average='1000' peak='5000' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>


      </bandwidth>
    </interface>

Here the inbound limit is working properly but the outbound is limiting but not with values which is give

Here are the scenarios i tested and the results

when i gave average as 2048 --- it is limiting with 600 -- 700 kb

average                           result
=====================
2048   (2mpbs)                  600-700 kb
4096   (4mbps)                  1 MB/s
10240 (10mbps)                2-3 MB/s
12288 (12 mbps)               3-4 MB/s
20480 (20 mbps)               16-18 MB/s

Is this the expected behavior or some thing is missing
If this is the expected behavior ,then in what ratio it is limiting.

Please help me
Thanks in advance.

--
Thanks and Regards,
Upendra.M



--
Thanks and Regards,
Upendra.M
-- libvir-list mailing list libvir-list redhat com https://www.redhat.com/mailman/listinfo/libvir-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]