Received: from eggs.gnu.org ([2001:4830:134:3::10]:35485) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjS1D-0000Jb-56 for qemu-devel@nongnu.org; Thu, 21 Nov 2013 06:02:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VjS17-0000pd-78 for qemu-devel@nongnu.org; Thu, 21 Nov 2013 06:01:55 -0500 Received: from indium.canonical.com ([91.189.90.7]:47020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VjS17-0000pX-1T for qemu-devel@nongnu.org; Thu, 21 Nov 2013 06:01:49 -0500 Received: from chaenomeles.canonical.com ([91.189.89.119]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1VjS16-0002BK-Ba for ; Thu, 21 Nov 2013 11:01:48 +0000 Received: from chaenomeles.canonical.com (localhost [127.0.0.1]) by chaenomeles.canonical.com (Postfix) with ESMTPS id 509B5680201 for ; Thu, 21 Nov 2013 11:01:48 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 21 Nov 2013 11:01:48 -0000 From: Launchpad Bug Tracker <1253563@bugs.launchpad.net> Sender: bounces@canonical.com References: <20131121092412.27241.16050.malonedeb@gac.canonical.com> Message-Id: <20131121110148.19604.11055.launchpad@chaenomeles.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1253563] [NEW] bad performance with rng-egd backend Reply-To: Bug 1253563 <1253563@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org You have been subscribed to a public bug by Amos Kong (amoskong): 1. create listen socket # cat /dev/random | nc -l localhost 1024 2. start vm with rng-egd backend ./x86_64-softmmu/qemu-system-x86_64 --enable-kvm -mon chardev=3Dqmp,mode=3D= control,pretty=3Don -chardev socket,id=3Dqmp,host=3Dlocalhost,port=3D1234,s= erver,nowait -m 2000 -device virtio-net-pci,netdev=3Dh1,id=3Dvnet0 -netdev = tap,id=3Dh1 -vnc :0 -drive file=3D/images/RHEL-64-virtio.qcow2 \ -chardev socket,host=3Dlocalhost,port=3D1024,id=3Dchr0 \ -object rng-egd,chardev=3Dchr0,id=3Drng0 \ -device virtio-rng-pci,rng=3Drng0,max-bytes=3D1024000,period=3D1000 (guest) # dd if=3D/dev/hwrng of=3D/dev/null note: cancelling dd process by Ctrl+c, it will return the read speed. Problem: the speed is around 1k/s =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D If I use rng-random backend (filename=3D/dev/random), the speed is about 350k/s). It seems that when the request entry is added to the list, we don't read th= e data from queue list immediately. The chr_read() is delayed, the virtio_notify() is delayed. the next reques= t will also be delayed. It effects the speed. I tried to change rng_egd_chr_can_read() always returns 1, the speed is improved to (about 400k/s) Problem: we can't poll the content in time currently Any thoughts? Thanks, Amos ** Affects: qemu Importance: Undecided Status: New -- = bad performance with rng-egd backend https://bugs.launchpad.net/bugs/1253563 You received this bug notification because you are a member of qemu-devel-m= l, which is subscribed to the bug report.