From owner-freebsd-emulation@FreeBSD.ORG Wed Dec 12 19:26:05 2012 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9AB60A9A for ; Wed, 12 Dec 2012 19:26:05 +0000 (UTC) (envelope-from martin@lispworks.com) Received: from lwfs1-cam.cam.lispworks.com (mail.lispworks.com [193.34.186.230]) by mx1.freebsd.org (Postfix) with ESMTP id D9FC38FC0A for ; Wed, 12 Dec 2012 19:26:03 +0000 (UTC) Received: from higson.cam.lispworks.com (higson.cam.lispworks.com [192.168.1.7]) by lwfs1-cam.cam.lispworks.com (8.14.5/8.14.5) with ESMTP id qBCJFZOV013533; Wed, 12 Dec 2012 19:15:35 GMT (envelope-from martin@lispworks.com) Received: from higson.cam.lispworks.com (localhost.localdomain [127.0.0.1]) by higson.cam.lispworks.com (8.14.4) id qBCJFY4E014099; Wed, 12 Dec 2012 19:15:34 GMT Received: (from martin@localhost) by higson.cam.lispworks.com (8.14.4/8.14.4/Submit) id qBCJFYmg014095; Wed, 12 Dec 2012 19:15:34 GMT Date: Wed, 12 Dec 2012 19:15:34 GMT Message-Id: <201212121915.qBCJFYmg014095@higson.cam.lispworks.com> From: Martin Simmons To: Peter Jeremy In-reply-to: <20121212014336.GD35245@server.rulingia.com> (message from Peter Jeremy on Wed, 12 Dec 2012 12:43:36 +1100) Subject: Re: FreeBSD/i386 guests using excessive host CPU References: <20121212014336.GD35245@server.rulingia.com> Cc: freebsd-emulation@freebsd.org X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 12 Dec 2012 19:26:05 -0000 >>>>> On Wed, 12 Dec 2012 12:43:36 +1100, Peter Jeremy said: > > [Please copy me in any replies] > > My VPS provider will not offer 32-bit FreeBSD guests because they use > excessive (ESXi) host CPU time. I have done some experiments using > VirtualBox on my FreeBSD/amd64 8-stable host and see the same. > > An idle 32-bit FreeBSD 9 or 10 guest uses very roughly 25% more host > CPU than an equivalent 64-bit guest. An idle 32-bit FreeBSD 8 guest > uses very roughly 50% more host CPU than an equivalent 64-bit guest. > > This problem does not show up with Linux or Windows7 but occurs with > both VirtualBox on AMD and ESXi on Intel CPUs. > > Since the problem shows up with different virtualisation environments > and on different CPUs, this suggests this is a FreeBSD guest issue. > My suspicion is that the cost of handling an interrupt on FreeBSD/i386 > is higher than the cost on amd64 - and this is more obvious on 8.x > because it doesn't use dynamic ticks. > > Has anyone else seen this behaviour and does anyone have any suggestions > for improving the FreeBSD/i386 performance. I can't repeat that with idle FreeBSD 8.0 guests running in VirtualBox 4.1.18 on Linux kernel 2.6.35.14-106.fc14.x86_64. In fact, the 64-bit one uses 4.8% of the CPU whereas the 32-bit one uses 4.2% (according to ps "bsdtime" measured over 1000 seconds). What absolute percentages are you seeing? __Martin