Received: from [140.186.70.92] (port=43501 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OR6l5-0000mp-UQ for qemu-devel@nongnu.org; Tue, 22 Jun 2010 12:55:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OR6l3-0001u3-Mq for qemu-devel@nongnu.org; Tue, 22 Jun 2010 12:55:35 -0400 Received: from adelie.canonical.com ([91.189.90.139]:34775) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OR6l3-0001te-E8 for qemu-devel@nongnu.org; Tue, 22 Jun 2010 12:55:33 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1OR6l1-0005A3-V6 for ; Tue, 22 Jun 2010 17:55:32 +0100 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id E8F102E8087 for ; Tue, 22 Jun 2010 17:55:31 +0100 (BST) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 22 Jun 2010 16:45:29 -0000 From: Andy Ross Sender: bounces@canonical.com References: <20100622164530.31796.85287.malonedeb@soybean.canonical.com> Message-Id: <20100622164530.31796.18839.malone@soybean.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 597351] Re: Slow UDP performance with virtio device Reply-To: Bug 597351 <597351@bugs.launchpad.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ** Attachment added: "udp-pong.c" http://launchpadlibrarian.net/50751155/udp-pong.c -- = Slow UDP performance with virtio device https://bugs.launchpad.net/bugs/597351 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: New Bug description: I'm working on an app that is very sensitive to round-trip latency between the guest and host, and qemu/kvm seems to be significantly slower than it needs to be. The attached program is a ping/pong over UDP. Call it with a single argument to start a listener/echo server on that port. With three arguments it becomes a counted "pinger" that will exit after a specified number of round trips for performance measurements. For example: $ gcc -o udp-pong udp-pong.c $ ./udp-pong 12345 & # start a listener on port 123= 45 $ time ./udp-pong 127.0.0.1 12345 1000000 # time a million round trips When run on the loopback device on a single machine (true on the host or within a guest), I get about 100k/s. When run across a port forward using "user" networking on qemu (or kvm, the performance is the same) and the default rtl8139 driver (both the host and guest are Ubuntu Lucid), I get about 10k/s. This seems very slow, but perhaps unavoidably so? When run in the same configuration using the "virtio" driver, I get only 2k/s. This is almost certainly a bug in the virtio driver, given that it's a paravirtualized device that is 5x slower than the "slow" hardware emulation. I get no meaningful change in performance between kvm/qemu.