public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: Asias He <asias.hejun@gmail.com>
Cc: Pekka Enberg <penberg@kernel.org>,
	john@jfloren.net, kvm@vger.kernel.org, mingo@elte.hu,
	gorcunov@gmail.com, prasadjoshi124@gmail.com
Subject: Re: [PATCH v2 3/4] kvm tools: Use ioeventfd in virtio-net
Date: Wed, 01 Jun 2011 09:35:51 +0300	[thread overview]
Message-ID: <1306910151.2929.7.camel@lappy> (raw)
In-Reply-To: <4DE598DC.90502@gmail.com>

On Wed, 2011-06-01 at 09:41 +0800, Asias He wrote:
> On 06/01/2011 12:32 AM, Sasha Levin wrote:
> > On Tue, 2011-05-31 at 10:18 +0300, Pekka Enberg wrote:
> >> On Tue, May 31, 2011 at 2:53 AM, Asias He <asias.hejun@gmail.com> wrote:
> >>> TAP based network performance with ioeventfd
> >>
> >> Heh, so how did it look _before_ ioeventfd? Did performance improve
> >> and how much?
> > 
> > Asias, did you use TCP or UDP values as bandwidth in your previous test?
> > 
> 
> These commit log have the performance test result before ioeventfd. But
> the UDP one is missing.
> 
> commit 739ddbb3b0fe52aa90a84727a6e90da37ce7661b
> commit 4ed38b41fc034cfb51fec2004f523fe98faa27f6
> 
> 
>     Netpef test shows this patch changes:
> 
>     the host to guest bandwidth
>     from 2866.27 Mbps (cpu 33.96%) to 5548.87 Mbps (cpu 53.87%),
> 
>     the guest to host bandwitdth
>     form 1408.86 Mbps (cpu 99.9%) to 1301.29 Mbps (cpu 99.9%).
> 
> 
> Anyway, I did another test and post the result here:
> 
> Test shows host -> guest TCP performance drops from 6736.04 to 5562.25.
> guest -> host TCP performance dumps from 1572.51 to 1731.55.

That's quite strange. I wasn't expecting any changes with our current
network code: Our RX thread is blocking on readv() most of the time, so
it doesn't get affected by IRQ/ioeventfd signals at all, and the TX
thread should get signaled to wake up just once or twice when the stream
starts - after which the virtio ring should be full with data.

I installed netperf and ran the tests (full results are below), guest ->
host TCP changed from 1862 to 2567 and host -> guest TCP changed from
7716 to 8065.

----------

Before ioeventfd:

(guest -> host)
tux ~ # netperf -c -t TCP_STREAM -H 192.168.33.2
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.33.2
(192.168.33.2) port 0 AF_INET
Recv   Send    Send                          Utilization       Service
Demand
Socket Socket  Message  Elapsed              Send     Recv     Send
Recv
Size   Size    Size     Time     Throughput  local    remote   local
remote
bytes  bytes   bytes    secs.    10^6bits/s  % S      % U      us/KB
us/KB

 87380  16384  16384    10.00      1862.98   49.75    -1.00    4.375
-1.000 

tux ~ # netperf -c -t UDP_STREAM -H 192.168.33.2
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.33.2 (192.168.33.2) port 0 AF_INET
Socket  Message  Elapsed      Messages                   CPU
Service
Size    Size     Time         Okay Errors   Throughput   Util     Demand
bytes   bytes    secs            #      #   10^6bits/sec % SU     us/KB

124928   65507   10.00      301117      0    15779.9     43.13    0.449 
124928           10.00      300118           15727.6     -1.00    -1.000

(host -> guest)
lappy ~ # netperf -c -t TCP_STREAM -H 192.168.33.4
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.33.4
(192.168.33.4) port 0 AF_INET
Recv   Send    Send                          Utilization       Service
Demand
Socket Socket  Message  Elapsed              Send     Recv     Send
Recv
Size   Size    Size     Time     Throughput  local    remote   local
remote
bytes  bytes   bytes    secs.    10^6bits/s  % S      % U      us/KB
us/KB

 87380  16384  16384    10.00      7716.23   87.49    -1.00    1.858
-1.000 

lappy ~ # netperf -c -t UDP_STREAM -H 192.168.33.4
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.33.4 (192.168.33.4) port 0 AF_INET
Socket  Message  Elapsed      Messages                   CPU
Service
Size    Size     Time         Okay Errors   Throughput   Util     Demand
bytes   bytes    secs            #      #   10^6bits/sec % SU     us/KB

124928   65507   10.00      142037      0     7443.4     84.34    6.398 
124928           10.00       41211            2159.6     -1.00    -1.000

After ioeventfd:

(guest -> host)
tux ~ # netperf -c -t TCP_STREAM -H 192.168.33.2
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.33.2
(192.168.33.2) port 0 AF_INET
Recv   Send    Send                          Utilization       Service
Demand
Socket Socket  Message  Elapsed              Send     Recv     Send
Recv
Size   Size    Size     Time     Throughput  local    remote   local
remote
bytes  bytes   bytes    secs.    10^6bits/s  % S      % U      us/KB
us/KB

 87380  16384  16384    10.00      2567.83   47.29    -1.00    3.017
-1.000 
tux ~ # netperf -c -t UDP_STREAM -H 192.168.33.2
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.33.2 (192.168.33.2) port 0 AF_INET
Socket  Message  Elapsed      Messages                   CPU
Service
Size    Size     Time         Okay Errors   Throughput   Util     Demand
bytes   bytes    secs            #      #   10^6bits/sec % SU     us/KB

124928   65507   10.00      305265      0    15997.4     49.35    0.506 
124928           10.00      304818           15974.0     -1.00    -1.000

(host -> guest)
lappy ~ # netperf -c -t TCP_STREAM -H 192.168.33.4
TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.33.4
(192.168.33.4) port 0 AF_INET
Recv   Send    Send                          Utilization       Service
Demand
Socket Socket  Message  Elapsed              Send     Recv     Send
Recv
Size   Size    Size     Time     Throughput  local    remote   local
remote
bytes  bytes   bytes    secs.    10^6bits/s  % S      % U      us/KB
us/KB

 87380  16384  16384    10.00      8065.82   88.15    -1.00    1.791
-1.000 
lappy ~ # netperf -c -t UDP_STREAM -H 192.168.33.4
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to
192.168.33.4 (192.168.33.4) port 0 AF_INET
Socket  Message  Elapsed      Messages                   CPU
Service
Size    Size     Time         Okay Errors   Throughput   Util     Demand
bytes   bytes    secs            #      #   10^6bits/sec % SU     us/KB

124928   65507   10.00      137846      0     7223.8     83.97    6.540 
124928           10.00       40140            2103.5     -1.00    -1.000





-- 

Sasha.


  reply	other threads:[~2011-06-01  6:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 16:18 [PATCH v2 1/4] kvm tools: Add ioeventfd support Sasha Levin
2011-05-27 16:18 ` [PATCH v2 2/4] kvm tools: Use ioeventfd in virtio-blk Sasha Levin
2011-05-27 16:18 ` [PATCH v2 3/4] kvm tools: Use ioeventfd in virtio-net Sasha Levin
2011-05-29 12:51   ` Ingo Molnar
2011-05-30 23:53   ` Asias He
2011-05-31  7:18     ` Pekka Enberg
2011-05-31 16:32       ` Sasha Levin
2011-06-01  1:41         ` Asias He
2011-06-01  6:35           ` Sasha Levin [this message]
2011-06-01 11:11             ` Asias He
2011-05-27 16:18 ` [PATCH v2 4/4] kvm tools: Use ioeventfd in virtio-rng Sasha Levin
2011-05-27 16:52 ` [PATCH v2 1/4] kvm tools: Add ioeventfd support Ingo Molnar
2011-05-29 11:55   ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1306910151.2929.7.camel@lappy \
    --to=levinsasha928@gmail.com \
    --cc=asias.hejun@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=john@jfloren.net \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@kernel.org \
    --cc=prasadjoshi124@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox