Bug 632760

Summary: RFE: Support for network QoS
Product: Red Hat Enterprise Linux 6 Reporter: IBM Bug Proxy <bugproxy>
Component: libvirtAssignee: Michal Privoznik <mprivozn>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.2CC: acathrow, ajia, aliguori, amoralej, berrange, bsarathy, dallan, dyuan, eblake, erez, gren, iheim, jeder, jjarvis, nobody+PNT0273897, rwu, sbest, xen-maint, xhu
Target Milestone: betaKeywords: FutureFeature
Target Release: 6.2   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: libvirt-0.9.4-rc1-1.el6 Doc Type: Enhancement
Doc Text:
Cause: In some scenarios users wants to shape traffic of a VM, its specific NIC or whole virtual network. It is better if this can be done directly via libvirt which sets virtual networks up, brings up VMs than enforcing user to set it up manually after. Consequence: Users often ran scripts to set up traffic shaping Change: Network and interface XML definitions were extended so users can specify average, peak and burst rates and libvirt will set them up on network/VM startup. Result: Users can now set bandwidth limitation via libvirt.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 10:49:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 638197, 643947, 659725, 693512    

Description IBM Bug Proxy 2010-09-10 21:21:27 UTC
1. Feature Overview:
Feature Id: [67174]
a. Name of Feature: [6.1 FEAT] Support for QoS in libvirt
b. Feature Description
To control and shape the network traffic between virtual machines it it necessary to integrate QoS
features into libvirt.


2. Feature Details:
Sponsor: LTC
Architectures:
  x86_64, 

Arch Specificity: ---
Affects Kernel Modules: Field does not exist
Delivery Mechanism: Backport
Category: other
Request Type: Package - Feature from Upstream
d. Upstream Acceptance: Field does not exist
Sponsor Priority P3
f. Severity: high
IBM Confidential: No
Code Contribution: ---
g. Component Version Target:
---

3. Business Case
This allows customers to maximize efficient usage of their (virtual) network infrastructure.

4. Primary contact at Red Hat:
John Jarvis
jjarvis

5. Primary contacts at Partner:
Project Management Contact:
Stephanie A. Glass, sglass.com

Technical contact(s):
Dirk Herrendoerfer, herrend.com

Comment 2 IBM Bug Proxy 2010-10-04 16:27:54 UTC
------- Comment From rsisk.com 2010-10-04 11:14 EDT-------
Code Upstream Status: Not Started

Comment 3 Dave Allan 2010-11-23 03:47:46 UTC
I'm setting cond nak patch simply to reflect that we will be looking for an upstream patch from IBM if one has not already been submitted.

Comment 4 Dave Allan 2010-11-23 21:07:46 UTC
*** Bug 515696 has been marked as a duplicate of this bug. ***

Comment 5 IBM Bug Proxy 2010-12-07 09:52:04 UTC
------- Comment From gerhard.stenzel.com 2010-12-07 04:46 EDT-------
A basic implementation to support QoS via libvirt/cgroups has been posted to https://www.redhat.com/archives/libvir-list/2010-December/msg00140.html, but no comments have been received so far.

Comment 6 IBM Bug Proxy 2010-12-14 13:30:57 UTC
------- Comment From gerhard.stenzel.com 2010-12-14 08:22 EDT-------
Given the current state of the discussion on the mailing list, we will defer this feature request to 6.2, but will continue the design and implementation discussion.

Comment 7 John Jarvis 2010-12-14 14:16:01 UTC
Adding to the 6.2 tracker.

Comment 8 IBM Bug Proxy 2011-05-04 15:10:22 UTC
------- Comment From sglass.com 2011-05-04 11:02 EDT-------
This no longer is needed.  Please quit on your side

Comment 9 Michal Privoznik 2011-05-17 08:21:29 UTC
*** Bug 696138 has been marked as a duplicate of this bug. ***

Comment 22 Dave Allan 2011-06-13 15:24:13 UTC
The RFE is to limit a particular guest interface to a particular bandwidth, e.g, 100MBps.  The test is fairly simple: for example, set up a network with greater than 100MBps bandwidth, assign a guest interface and limit it to 100Mbps, and confirm that you get roughly 100Mbps throughput on that interface.

Comment 24 Michal Privoznik 2011-06-23 15:40:26 UTC
Patches available and sent upstream:

https://www.redhat.com/archives/libvir-list/2011-June/msg01149.html

Comment 25 Michal Privoznik 2011-07-25 09:47:00 UTC
moving to POST:

https://www.redhat.com/archives/libvir-list/2011-July/msg01656.html

This patch series add support for setting traffic shaping and policing
on both domain's interface and network's virtual bridge. Basically,
this is done via 'tc' from iproute2 package. For shaping is HTB used,
for policing we need u32 match selector. Both should be available in
RHEL-6 kernel.

How this works:
On an virtual interface which has limits defined a root qdisc are replaced.
Ingress root for outbound traffic shaping and egress for inbound.
Basically, in inbound traffic policing is applied, on outbound shaping.
New qdiscs are set to limit the traffic to rate set in XML. For shaping
it is possible to set the size of buffer. Accepted values for rate, peak
and burst are integer numbers. Units are kilobytes per second for rate
or kilobytes for size.

Supported devices are VIR_DOMAIN_NET_TYPE_NETWORK, VIR_DOMAIN_NET_TYPE_BRIDGE
and VIR_DOMAIN_NET_TYPE_DIRECT.

v0.9.3-295-g2b9efcb

Comment 28 Michal Privoznik 2011-11-11 09:41:22 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Cause: In some scenarios users wants to shape traffic of a VM, its specific NIC or whole virtual network. It is better if this can be done directly via libvirt which sets virtual networks up, brings up VMs than enforcing user to set it up manually after.

Consequence: Users often ran scripts to set up traffic shaping

Change: Network and interface XML definitions were extended so users can specify average, peak and burst rates and libvirt will set them up on network/VM startup.

Result: Users can now set bandwidth limitation via libvirt.

Comment 31 errata-xmlrpc 2011-12-06 10:49:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html