From owner-freebsd-emulation@FreeBSD.ORG Fri Nov 4 15:26:24 2005 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BF0B16A41F for ; Fri, 4 Nov 2005 15:26:24 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id B211143D48 for ; Fri, 4 Nov 2005 15:26:23 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id jA4FQMW3064835; Fri, 4 Nov 2005 09:26:22 -0600 (CST) (envelope-from dan) Date: Fri, 4 Nov 2005 09:26:22 -0600 From: Dan Nelson To: Andriy Gapon Message-ID: <20051104152622.GH67512@dan.emsphone.com> References: <436B7B86.4060602@icyb.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <436B7B86.4060602@icyb.net.ua> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: freebsd-emulation@freebsd.org Subject: Re: kqemu speed up X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Nov 2005 15:26:24 -0000 In the last episode (Nov 04), Andriy Gapon said: > How much does kqemu speed up qemu ? > What is the typical difference in speed between guest running in > qemu+kqemu and host ? > > The reason I am asking is the following: > > host (FreeBSD 5.4): > $ /usr/bin/time -h dd if=/dev/random of=/dev/null bs=4 count=100k > 409600 bytes transferred in 0.342956 secs (1194322 bytes/sec) > > guest (FreeBSD 6.0): > $ /usr/bin/time -h dd if=/dev/random of=/dev/null bs=4 count=10k > 409600 bytes transferred in 59.620314 secs (6870 bytes/sec) > > As you can see the difference is two orders of magnitude. I think I > had similar figures without kqemu and I thought that with kqemu guest > speed is close to host speed. What gives ? Maybe something to do with reading /dev/random ends up doing an operation that even kqemu must pass up to the host OS? kqemu simply allows more host instructions to be processed by the host CPU directly without translation (since regular qemu is simply a very fast x86 instruction emulator). If you were to compare an application that spends most of its time in userland, you should see more of an improvement. -- Dan Nelson dnelson@allantgroup.com