kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* virtio: Large number of tcp connections, vhost_net seems to be a bottleneck
       [not found] <7677902.1710678.1382256256542.JavaMail.root@cloudwatt.com>
@ 2013-10-20  8:04 ` Sahid Ferdjaoui
  2013-10-20 15:52   ` Mike Dawson
  2013-10-23 12:30   ` Jason Wang
  0 siblings, 2 replies; 4+ messages in thread
From: Sahid Ferdjaoui @ 2013-10-20  8:04 UTC (permalink / raw)
  To: kvm

Hi all,

I'm working on create a large number of tcp connections on a guest;
The environment is on OpenStack:

Host (dedicated compute node):
  OS/Kernel: Ubuntu/3.2
  Cpus: 24
  Mems: 128GB

Guest (alone on the Host):
  OS/Kernel: Ubuntu/3.2
  Cpus: 4
  Mems: 32GB

Currently a guest can handle about 700 000 established connections, the cpus are not loaded and 12giga of memory are used.
I'm working to understand why I can go up...

On my host, after several tests with different versions of openvswitch and with linux bridge,
It look like the process vhost_net is the only process loaded to 100% and it seems vhost_net cannot use more than 1 cpu.

I would like to get more informations about vhost_net and if there is a solution to configure it to use more than 1 cpu?

Thanks a lot,
s.

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

* Re: virtio: Large number of tcp connections, vhost_net seems to be a bottleneck
  2013-10-20  8:04 ` virtio: Large number of tcp connections, vhost_net seems to be a bottleneck Sahid Ferdjaoui
@ 2013-10-20 15:52   ` Mike Dawson
  2013-10-21  8:50     ` Sahid Ferdjaoui
  2013-10-23 12:30   ` Jason Wang
  1 sibling, 1 reply; 4+ messages in thread
From: Mike Dawson @ 2013-10-20 15:52 UTC (permalink / raw)
  To: Sahid Ferdjaoui, kvm


On 10/20/2013 4:04 AM, Sahid Ferdjaoui wrote:
> Hi all,
>
> I'm working on create a large number of tcp connections on a guest;
> The environment is on OpenStack:
>
> Host (dedicated compute node):
>    OS/Kernel: Ubuntu/3.2
>    Cpus: 24
>    Mems: 128GB
>
> Guest (alone on the Host):
>    OS/Kernel: Ubuntu/3.2
>    Cpus: 4
>    Mems: 32GB
>
> Currently a guest can handle about 700 000 established connections, the cpus are not loaded and 12giga of memory are used.
> I'm working to understand why I can go up...
>
> On my host, after several tests with different versions of openvswitch and with linux bridge,
> It look like the process vhost_net is the only process loaded to 100% and it seems vhost_net cannot use more than 1 cpu.
>
> I would like to get more informations about vhost_net and if there is a solution to configure it to use more than 1 cpu?

Not sure if it is relevant in your case, but the newly-released Open 
vSwitch 2.0 is now multi-threaded:

http://openvswitch.org/releases/NEWS-2.0.0

@martin_casado said "This is a big deal. Multi-threading provides huge 
performance benefits on flow setup"

https://twitter.com/martin_casado/status/390384030488616960

If you give it a try, let us know.

- Mike

>
> Thanks a lot,
> s.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: virtio: Large number of tcp connections, vhost_net seems to be a bottleneck
  2013-10-20 15:52   ` Mike Dawson
@ 2013-10-21  8:50     ` Sahid Ferdjaoui
  0 siblings, 0 replies; 4+ messages in thread
From: Sahid Ferdjaoui @ 2013-10-21  8:50 UTC (permalink / raw)
  To: Mike Dawson; +Cc: kvm

Thanks for your back Mike, I did some tests with ovs2.0 and the number of tcp connections up to 1 000 000 easily.
So if I understand well the deal is not in relation with vhost_net or it can have a link between them?

   http://i.imgur.com/kJJWtOk.png

s.

----- Original Message -----
From: "Mike Dawson" <mike.dawson@cloudapt.com>
To: "Sahid Ferdjaoui" <sahid.ferdjaoui@cloudwatt.com>, kvm@vger.kernel.org
Sent: Sunday, October 20, 2013 5:52:36 PM
Subject: Re: virtio: Large number of tcp connections, vhost_net seems to be a bottleneck


On 10/20/2013 4:04 AM, Sahid Ferdjaoui wrote:
> Hi all,
>
> I'm working on create a large number of tcp connections on a guest;
> The environment is on OpenStack:
>
> Host (dedicated compute node):
>    OS/Kernel: Ubuntu/3.2
>    Cpus: 24
>    Mems: 128GB
>
> Guest (alone on the Host):
>    OS/Kernel: Ubuntu/3.2
>    Cpus: 4
>    Mems: 32GB
>
> Currently a guest can handle about 700 000 established connections, the cpus are not loaded and 12giga of memory are used.
> I'm working to understand why I can go up...
>
> On my host, after several tests with different versions of openvswitch and with linux bridge,
> It look like the process vhost_net is the only process loaded to 100% and it seems vhost_net cannot use more than 1 cpu.
>
> I would like to get more informations about vhost_net and if there is a solution to configure it to use more than 1 cpu?

Not sure if it is relevant in your case, but the newly-released Open 
vSwitch 2.0 is now multi-threaded:

http://openvswitch.org/releases/NEWS-2.0.0

@martin_casado said "This is a big deal. Multi-threading provides huge 
performance benefits on flow setup"

https://twitter.com/martin_casado/status/390384030488616960

If you give it a try, let us know.

- Mike

>
> Thanks a lot,
> s.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

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

* Re: virtio: Large number of tcp connections, vhost_net seems to be a bottleneck
  2013-10-20  8:04 ` virtio: Large number of tcp connections, vhost_net seems to be a bottleneck Sahid Ferdjaoui
  2013-10-20 15:52   ` Mike Dawson
@ 2013-10-23 12:30   ` Jason Wang
  1 sibling, 0 replies; 4+ messages in thread
From: Jason Wang @ 2013-10-23 12:30 UTC (permalink / raw)
  To: Sahid Ferdjaoui, kvm

On 10/20/2013 04:04 PM, Sahid Ferdjaoui wrote:
> Hi all,
>
> I'm working on create a large number of tcp connections on a guest;
> The environment is on OpenStack:
>
> Host (dedicated compute node):
>   OS/Kernel: Ubuntu/3.2
>   Cpus: 24
>   Mems: 128GB
>
> Guest (alone on the Host):
>   OS/Kernel: Ubuntu/3.2
>   Cpus: 4
>   Mems: 32GB
>
> Currently a guest can handle about 700 000 established connections, the cpus are not loaded and 12giga of memory are used.
> I'm working to understand why I can go up...
>
> On my host, after several tests with different versions of openvswitch and with linux bridge,
> It look like the process vhost_net is the only process loaded to 100% and it seems vhost_net cannot use more than 1 cpu.
>
> I would like to get more informations about vhost_net and if there is a solution to configure it to use more than 1 cpu?

You can if you enable the multiqueue support for virtio-net, it can use
N threads when there's N queue pairs.

See http://www.linux-kvm.org/page/Multiqueue for more information.
> Thanks a lot,
> s.
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

end of thread, other threads:[~2013-10-23 12:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <7677902.1710678.1382256256542.JavaMail.root@cloudwatt.com>
2013-10-20  8:04 ` virtio: Large number of tcp connections, vhost_net seems to be a bottleneck Sahid Ferdjaoui
2013-10-20 15:52   ` Mike Dawson
2013-10-21  8:50     ` Sahid Ferdjaoui
2013-10-23 12:30   ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).