DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: James Yu <ypyu2011@gmail.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] outw() in virtio_ring_doorbell() in DPDK+virtio consume 40% of the CPU in oprofile
Date: Fri, 13 Dec 2013 15:01:21 -0800	[thread overview]
Message-ID: <20131213150121.3d70a0d2@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <CAFMB=kCmVfXNJdCBoH_g51_M0QxaQU6tevu-qDmNW-okhR_rRw@mail.gmail.com>

On Fri, 13 Dec 2013 14:04:35 -0800
James Yu <ypyu2011@gmail.com> wrote:

> Resending it due to missing [dpdk-dev] in the subject line.
> 
> I am using Spirent to send a 2Gbps traffic to a 10G port that are looped
> back by l2fwd+DPDK+virtio in a CentOS 32-bit and receive on the other port
> only at 700 Mbps.   The CentOS 32-bit is on a Fedora 18 KVM host. The
> virtual interfaces are configured as virtio port type, not e1000. vhost-net
> was automatically used in qemu-kvm when virtio ports are used in the guest.
> 
> The questions are
> A. Why it can only reach 2Gbps
> B. Why outw() is using 40% of the entire measurement when it only try to
> write 2 bytes to the IO port using assembly outw command ? Is it a blocking
> call ? or it wastes time is mapping from the IO address of the guest to the
> physical address of the IO port on the host ?
> C. any way to improve it ?
> D. vmxnet PMD codes are using memory mapped IO address, not port IO
> address. Will it be faster to use memory mapped IO address ?
> 
> Any pointers or feedback will help.
> Thanks
> 
> James

The outw is a VM exit to the hypervisor. It informs the hypervisor that data
is ready to send and it runs then. To really get better performance, virtio
needs to be able to do multiple packets per send. For bulk throughput
GSO support would help, but that is a generic DPDK issues.

Virtio use I/O to signal hypervisor (there is talk of using MMIO in later
versions but it won't be faster.

  reply	other threads:[~2013-12-13 23:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-13 22:04 James Yu
2013-12-13 23:01 ` Stephen Hemminger [this message]
2013-12-16 23:35   ` James Yu
2013-12-16 23:58     ` Stephen Hemminger
  -- strict thread matches above, loose matches on Subject: below --
2013-12-13 22:02 James Yu
2013-12-13 21:59 James Yu

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=20131213150121.3d70a0d2@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=ypyu2011@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;
as well as URLs for NNTP newsgroup(s).