From owner-freebsd-xen@FreeBSD.ORG Thu Oct 29 23:27:13 2009 Return-Path: Delivered-To: freebsd-xen@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A533B1065698 for ; Thu, 29 Oct 2009 23:27:13 +0000 (UTC) (envelope-from sysconfig@ossafe.org) Received: from mx2.the-ally.co.uk (mx2.the-ally.co.uk [95.154.227.236]) by mx1.freebsd.org (Postfix) with ESMTP id 624938FC15 for ; Thu, 29 Oct 2009 23:27:13 +0000 (UTC) Received: from mx2.the-ally.co.uk (localhost.localdomain [127.0.0.1]) by mx2.the-ally.co.uk (Postfix) with ESMTP id C75ACED0998 for ; Thu, 29 Oct 2009 23:27:11 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=ossafe.org; h=from :content-type:content-transfer-encoding:subject:date:message-id :to:mime-version; s=selector1; bh=N2rOdXykdS/ERoNLGjgQbbAb+P4=; b= qP+2nvcQ6qmhCq1MLgVxoA3AKNrsIEugACAn2bY4aX3rCL7enE4tr2PK8SvWgB4M MBy4ap5N58/CCWAbJCqNT+VNpVEux/WWlP4hrO/7MEfvT40pJK/4l/bN+Do+R+4r ox42i3dabEdrR5roxKykMCN3J94bRTlsXXrxx1mv0cc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=ossafe.org; h=from :content-type:content-transfer-encoding:subject:date:message-id :to:mime-version; q=dns; s=selector1; b=jyhOoDnRGxFy+7Kzlbig5vJa 4qiswJciKf7o9zqekYUEiduvp9b1cn/pIJ11Kzs71gfGDbcyLcFlsohSPByahVgL tA1QEXPgKbtGPArXPkyT1LbGDy7M8mDOclPapunGAEAtLzpm7levy/eTBUvuOOYs gWgM7sQIfSGl/gy50DM= Received: from [10.2.2.20] (unknown [10.2.2.20]) by mx2.the-ally.co.uk (Postfix) with ESMTP id 97C14ED0994 for ; Thu, 29 Oct 2009 23:27:11 +0000 (GMT) From: Carsten Heesch Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Date: Thu, 29 Oct 2009 23:27:11 +0000 Message-Id: <869459F8-7490-4270-84D0-A1168002E509@ossafe.org> To: freebsd-xen@freebsd.org Mime-Version: 1.0 (Apple Message framework v1076) X-Mailer: Apple Mail (2.1076) Subject: SCHED_ULE vs SCHED_4BSD for XENHVM domU X-BeenThere: freebsd-xen@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion of the freebsd port to xen - implementation and usage List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2009 23:27:13 -0000 Hi guys, After FreeBSD 8.0-RC2 is working well (for me) on Xen 3.3.1, I somehow made an interesting observation: Even if the FreeBSD domU does absolutely nothing, each of the assigned vCPUs will be reported by xentop as using 15%-25% CPU time. It doesn't matter, if domU is running with 1 or 4 vCPUs. All of them float at the same level. On the same Xen box five other domU's (CentOS 5.2-5.4) have an idle CPU percentage of 0 to 0.5%. So I played a bit and figured out that changing the scheduler in the XENHVM kernel configuration from "option SCHED_ULE" to "option SCHED_4BSD" resolves this problem. The idle state of the FreeBSD domU is now identical to the CentOS domU's. However, this of course means using an old (maybe even deprecated?) scheduler, which moreover isn't the best choice for multiple (virtual) CPUs. The configuration I tested on is: Intel i7 920 Quad-Core with Hyperthreading (8 logical CPUs) Citrix XenServer 5.5 (based on CentOS 5.2, Xen 3.3.1) Any thoughts, ideas, solutions? Thanks! Carsten