From owner-freebsd-xen@FreeBSD.ORG Thu Oct 29 23:31:14 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 F19D11065679 for ; Thu, 29 Oct 2009 23:31:14 +0000 (UTC) (envelope-from carsten@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 AED3F8FC15 for ; Thu, 29 Oct 2009 23:31:14 +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 CE00EED0997 for ; Thu, 29 Oct 2009 23:12:19 +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= nljkz2ac9zTiDrIegTJike+ggrxjH1zkAjr0apO8uCOMM8Po/5mQSdY/ECilnlG7 G+MRt3GZD4d+j0hQYITIrC1Z0sCp3dpucWiRpTRkACByKdq9jK7IXk+qh3bOA5Ll 9/qbYxxPvnjE1jpqcRaFz85zAYaYzboXAB7U0oZaA/E= 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=GsSrHgCLbYN25zJEOdHIu3yM 71I9200/7HPijk5hol6gSB4oOnDxq+vtfswvROYshfiV3Ftko85j56eUXMvBWvGI K3rIbUFPGNf4KThidn+hg72+wkGz3NkH3YvRKWGGg1mvXdkx5H5E0+b22qMT469b UFtIciUP/pdLAD+9h90= Received: from [10.2.2.20] (unknown [10.2.2.20]) by mx2.the-ally.co.uk (Postfix) with ESMTP id 9A0FDED0994 for ; Thu, 29 Oct 2009 23:12:19 +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:12:19 +0000 Message-Id: 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:31:15 -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