All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] Throttle in virtio-net
@ 2016-09-02 15:13 Pradeep Kiruvale
  2016-09-05  8:33 ` [Qemu-devel] [Qemu-discuss] " Alberto Garcia
  0 siblings, 1 reply; 5+ messages in thread
From: Pradeep Kiruvale @ 2016-09-02 15:13 UTC (permalink / raw)
  To: qemu-discuss, qemu-devel

Hi All,

I am planning to implement throttling functionality for virtio-net driver
using the throttling APIs that exist inside qemu.
Please let me know if someone already working on the same. Asking because I
do not want to just replicate the work.

Thanks & Regards,
Pradeep

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-discuss] Throttle in virtio-net
  2016-09-02 15:13 [Qemu-devel] Throttle in virtio-net Pradeep Kiruvale
@ 2016-09-05  8:33 ` Alberto Garcia
  2016-09-05  8:52   ` Pradeep Kiruvale
  0 siblings, 1 reply; 5+ messages in thread
From: Alberto Garcia @ 2016-09-05  8:33 UTC (permalink / raw)
  To: Pradeep Kiruvale; +Cc: qemu-discuss, qemu-devel

On Fri, Sep 02, 2016 at 05:13:40PM +0200, Pradeep Kiruvale wrote:

> I am planning to implement throttling functionality for virtio-net
> driver using the throttling APIs that exist inside qemu.

Hi Pradeep,

the problem with implementing throttling for the network is that
it's useless if you use the vhost_net kernel accelerator, because it
bypasses QEMU entirely:

   https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Virtualization_Tuning_and_Optimization_Guide/sect-Virtualization_Tuning_Optimization_Guide-Networking-Virtio_and_vhostnet.html

libvirt implements this using tc:

   https://libvirt.org/formatdomain.html#elementDomain
   http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#ceiling

Berto

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-discuss] Throttle in virtio-net
  2016-09-05  8:33 ` [Qemu-devel] [Qemu-discuss] " Alberto Garcia
@ 2016-09-05  8:52   ` Pradeep Kiruvale
  2016-09-06 14:10     ` Alberto Garcia
  2016-09-06 14:37     ` Daniel P. Berrange
  0 siblings, 2 replies; 5+ messages in thread
From: Pradeep Kiruvale @ 2016-09-05  8:52 UTC (permalink / raw)
  To: Alberto Garcia; +Cc: qemu-discuss, qemu-devel

Hi Alberto,

Thanks for your reply.

>
> > I am planning to implement throttling functionality for virtio-net
> > driver using the throttling APIs that exist inside qemu.
>
> Hi Pradeep,
>
> the problem with implementing throttling for the network is that
> it's useless if you use the vhost_net kernel accelerator, because it
> bypasses QEMU entirely:
>
>    https://access.redhat.com/documentation/en-US/Red_Hat_
> Enterprise_Linux/7/html/Virtualization_Tuning_and_Optimization_Guide/sect-
> Virtualization_Tuning_Optimization_Guide-Networking-
> Virtio_and_vhostnet.html


Thanks for this very valuable information. What if someone wants to just
use virtio-net without the vhost acceleration?
Any idea how it will be done in this case? It still uses cgroup or some
other mechanism to do throttling?

>
> libvirt implements this using tc:
>
>    https://libvirt.org/formatdomain.html#elementDomain
>    http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#ceiling


Here it uses the cgroup inside the libvirt dirver to control the packet
rate right?

Thanks,
Pradeep

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-discuss] Throttle in virtio-net
  2016-09-05  8:52   ` Pradeep Kiruvale
@ 2016-09-06 14:10     ` Alberto Garcia
  2016-09-06 14:37     ` Daniel P. Berrange
  1 sibling, 0 replies; 5+ messages in thread
From: Alberto Garcia @ 2016-09-06 14:10 UTC (permalink / raw)
  To: Pradeep Kiruvale; +Cc: qemu-devel, qemu-discuss

On Mon 05 Sep 2016 10:52:40 AM CEST, Pradeep Kiruvale wrote:

>> > I am planning to implement throttling functionality for virtio-net
>> > driver using the throttling APIs that exist inside qemu.
>>
>> the problem with implementing throttling for the network is that
>> it's useless if you use the vhost_net kernel accelerator, because it
>> bypasses QEMU entirely:
>>
>>    https://access.redhat.com/documentation/en-US/Red_Hat_
>> Enterprise_Linux/7/html/Virtualization_Tuning_and_Optimization_Guide/sect-
>> Virtualization_Tuning_Optimization_Guide-Networking-
>> Virtio_and_vhostnet.html
>
> Thanks for this very valuable information. What if someone wants to
> just use virtio-net without the vhost acceleration?

I think you can use tc just the same, as far as I'm aware that's what
libvirt does.

Berto

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [Qemu-discuss] Throttle in virtio-net
  2016-09-05  8:52   ` Pradeep Kiruvale
  2016-09-06 14:10     ` Alberto Garcia
@ 2016-09-06 14:37     ` Daniel P. Berrange
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel P. Berrange @ 2016-09-06 14:37 UTC (permalink / raw)
  To: Pradeep Kiruvale; +Cc: Alberto Garcia, qemu-devel, qemu-discuss

On Mon, Sep 05, 2016 at 10:52:40AM +0200, Pradeep Kiruvale wrote:
> Hi Alberto,
> 
> Thanks for your reply.
> 
> >
> > > I am planning to implement throttling functionality for virtio-net
> > > driver using the throttling APIs that exist inside qemu.
> >
> > Hi Pradeep,
> >
> > the problem with implementing throttling for the network is that
> > it's useless if you use the vhost_net kernel accelerator, because it
> > bypasses QEMU entirely:
> >
> >    https://access.redhat.com/documentation/en-US/Red_Hat_
> > Enterprise_Linux/7/html/Virtualization_Tuning_and_Optimization_Guide/sect-
> > Virtualization_Tuning_Optimization_Guide-Networking-
> > Virtio_and_vhostnet.html
> 
> 
> Thanks for this very valuable information. What if someone wants to just
> use virtio-net without the vhost acceleration?
> Any idea how it will be done in this case? It still uses cgroup or some
> other mechanism to do throttling?
> 
> >
> > libvirt implements this using tc:
> >
> >    https://libvirt.org/formatdomain.html#elementDomain
> >    http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#ceiling
> 
> 
> Here it uses the cgroup inside the libvirt dirver to control the packet
> rate right?

No, cgroups is not involved. Libvirt attaches a tc filter directly to
the host TAP device associated with the virtual NIC.

Cgroups tc support would only be relevant if you're trying to filter
non-NIC related network traffic QEMU generates.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-06 14:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-02 15:13 [Qemu-devel] Throttle in virtio-net Pradeep Kiruvale
2016-09-05  8:33 ` [Qemu-devel] [Qemu-discuss] " Alberto Garcia
2016-09-05  8:52   ` Pradeep Kiruvale
2016-09-06 14:10     ` Alberto Garcia
2016-09-06 14:37     ` Daniel P. Berrange

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.