From owner-freebsd-smp@FreeBSD.ORG Sun May 9 20:55:24 2010 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E9561106566C for ; Sun, 9 May 2010 20:55:24 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id AF2798FC08 for ; Sun, 9 May 2010 20:55:24 +0000 (UTC) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OBDX2-0005tN-30 for freebsd-smp@freebsd.org; Sun, 09 May 2010 13:55:24 -0700 Message-ID: <28505250.post@talk.nabble.com> Date: Sun, 9 May 2010 13:55:24 -0700 (PDT) From: Hubert Tournier To: freebsd-smp@freebsd.org In-Reply-To: <28479447.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: hubert@frbsd.org References: <28357071.post@talk.nabble.com> <4BD4727F.4060700@googlemail.com> <28359495.post@talk.nabble.com> <4BD563F7.4010203@googlemail.com> <201004260948.12730.jhb@freebsd.org> <28467645.post@talk.nabble.com> <28479447.post@talk.nabble.com> Subject: Re: Disabling HyperThreading? X-BeenThere: freebsd-smp@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD SMP implementation group List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2010 20:55:25 -0000 Hello, Hubert Tournier wrote: > > I'll give a try to John's way of disabling CPUs, hoping to avoid disabling > the wrong ones. > With the kern.sched.topology_spec OID, i had the confirmation that the hyperthreading "other halves" of the CPU were the even ones: #sysctl kern.sched.topology_spec kern.sched.topology_spec: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 0, 1 SMT group 2, 3 SMT group Hubert Tournier wrote: > > My use case is a VirtualBox dedicated server where I believe using HTT > might be problematic because: > 1/ running two busy virtual machines on the same physical core could > severely impact their performance > 2/ the virtualizer might expose the real CPU to the virtual machines, > which might in turn attempt to use HTT for themselves > 2/ The real CPU (or at least its HTT feature) is exposed to the virtual machines, but they don't attempt to use HyperThreading (or at least the FreeBSD guest that I use). Looking at the differences between my FreeBSD host and guest, i noticed that there were 2 additional OID in the guest: machdep.hlt_logical_cpus: 0 machdep.logical_cpus_mask: 254 The vCPU given to the guest appears as cores: "FreeBSD/SMP: 1 package(s) x 8 core(s)". 1/ The risk is confirmed by the now-oracle engineers. I think i will leave the hyperthreading enabled and just be careful not to use more vCPU than the number of cores. Thanks to all of you for your help and time. Best regards, Hubert -- View this message in context: http://old.nabble.com/Disabling-HyperThreading--tp28357071p28505250.html Sent from the freebsd-smp mailing list archive at Nabble.com.