From owner-freebsd-smp@FreeBSD.ORG Sun Apr 25 16:34:34 2010 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE3DD1065674 for ; Sun, 25 Apr 2010 16:34:34 +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 93CA98FC17 for ; Sun, 25 Apr 2010 16:34:34 +0000 (UTC) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1O64X6-00028j-Q9 for freebsd-smp@freebsd.org; Sun, 25 Apr 2010 09:18:12 -0700 Message-ID: <28357071.post@talk.nabble.com> Date: Sun, 25 Apr 2010 09:18:12 -0700 (PDT) From: Hubert Tournier To: freebsd-smp@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: hubert@frbsd.org Subject: 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, 25 Apr 2010 16:34:35 -0000 Hello (anybody there?), Is there a way to disable "Hyper-Threading Technology" in modern FreeBSD systems? At the time of FreeBSD-SA-05:09.htt, it was suggested to use the following workaround: setting the "machdep.hlt_logical_cpus" tunable: # echo "machdep.hlt_logical_cpus=1" >> /boot/loader.conf Use of this workaround is not recommended on "dual-core" systems, as this workaround will also disable one of the processor cores. But this OID no longer seems to exist and I do not want to disable other processor cores. 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 Best regards, Hubert For example on a bi-Xeon X5650 FreeBSD 8.0p2 system, the relevant sysctl OIDs are: kern.ccpu: 0 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 2, 3 4, 5 6, 7 8, 9 10, 11 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 12, 13 14, 15 16, 17 18, 19 20, 21 22, 23 kern.smp.cpus: 24 debug.kdb.stop_cpus: 1 hw.ncpu: 24 machdep.hlt_cpus: 0 Perhaps by playing with the mask? -- View this message in context: http://old.nabble.com/Disabling-HyperThreading--tp28357071p28357071.html Sent from the freebsd-smp mailing list archive at Nabble.com. From owner-freebsd-smp@FreeBSD.ORG Sun Apr 25 17:20:00 2010 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5354F1065755 for ; Sun, 25 Apr 2010 17:20:00 +0000 (UTC) (envelope-from stopeme@gmail.com) Received: from mail-bw0-f216.google.com (mail-bw0-f216.google.com [209.85.218.216]) by mx1.freebsd.org (Postfix) with ESMTP id D22578FC1B for ; Sun, 25 Apr 2010 17:19:59 +0000 (UTC) Received: by bwz8 with SMTP id 8so10502328bwz.3 for ; Sun, 25 Apr 2010 10:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=cM1uASAJppeKPb6sq0H+K2G3i3dChWvOIM/sbtZk2/w=; b=IgW4+SKPUzA965cvz4gL0+Jmx7YVEGJXGLsDGaB3uKKClnHdpZxg/uh2eopoyNYGHF rD2E6rIMFH4dzG3x85FYHSpO12XflWWU0foNH615swcESkQcu+QY3m+kHjDg//AXLqFx QDjqGUld2vdhvChDar5NEFeXmVfSAMitn56UM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=F4amv2dnhcu009y21qkeealv+caJ7J+YeIBR6DPWGP1Pk1QNLT71LswjXaCQxAISPv Z9YE9XwSONRxrpIoQQC7zY71rXYvGw/Mnaqma7joicZguoDLAjacnShWNHWd+UKvUOQ2 o191Yk5Stdh0hO1NxZWs0oGeyyGiXeE6d1xes= Received: by 10.204.34.130 with SMTP id l2mr1777049bkd.145.1272214196819; Sun, 25 Apr 2010 09:49:56 -0700 (PDT) Received: from [192.168.1.3] (95-42-162-61.btc-net.bg [95.42.162.61]) by mx.google.com with ESMTPS id 16sm1186566bwz.5.2010.04.25.09.49.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 25 Apr 2010 09:49:55 -0700 (PDT) Message-ID: <4BD4727F.4060700@googlemail.com> Date: Sun, 25 Apr 2010 19:49:03 +0300 From: oklahoma User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Hubert Tournier , freebsd-smp@freebsd.org References: <28357071.post@talk.nabble.com> In-Reply-To: <28357071.post@talk.nabble.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: 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, 25 Apr 2010 17:20:00 -0000 Hubert Tournier wrote: > Hello (anybody there?), > > Is there a way to disable "Hyper-Threading Technology" in modern FreeBSD > systems? > check your bios settings for hyper-threading technology or similar to disable it you may check cpuset(1) to assign one virtual machine per cpu, although i didn't test this. From owner-freebsd-smp@FreeBSD.ORG Sun Apr 25 22:59:30 2010 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33630106566B for ; Sun, 25 Apr 2010 22:59:30 +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 0FA9D8FC12 for ; Sun, 25 Apr 2010 22:59:29 +0000 (UTC) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1O6AnR-0001CJ-Fy for freebsd-smp@freebsd.org; Sun, 25 Apr 2010 15:59:29 -0700 Message-ID: <28359495.post@talk.nabble.com> Date: Sun, 25 Apr 2010 15:59:29 -0700 (PDT) From: Hubert Tournier To: freebsd-smp@freebsd.org In-Reply-To: <4BD4727F.4060700@googlemail.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> 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, 25 Apr 2010 22:59:30 -0000 Hello, membrana wrote: > > Hubert Tournier wrote: >> Is there a way to disable "Hyper-Threading Technology" in modern FreeBSD >> systems? > check your bios settings for hyper-threading technology or similar to > disable it > I forgot to specify that the system is a remote dedicated server, for which i have no physical access. I could rent a virtual KVM in order to try to access its BIOS settings, but i'm not sure this would work. Any other software solution? > you may check cpuset(1) to assign one virtual machine per cpu, although > i didn't test this. > Thank you. I didn't knew that one! Best regards, Hubert -- View this message in context: http://old.nabble.com/Disabling-HyperThreading--tp28357071p28359495.html Sent from the freebsd-smp mailing list archive at Nabble.com. From owner-freebsd-smp@FreeBSD.ORG Mon Apr 26 10:00:20 2010 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1070C1065673 for ; Mon, 26 Apr 2010 10:00:20 +0000 (UTC) (envelope-from stopeme@gmail.com) Received: from mail-ew0-f224.google.com (mail-ew0-f224.google.com [209.85.219.224]) by mx1.freebsd.org (Postfix) with ESMTP id 9344C8FC22 for ; Mon, 26 Apr 2010 10:00:19 +0000 (UTC) Received: by ewy24 with SMTP id 24so3342480ewy.33 for ; Mon, 26 Apr 2010 03:00:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=1idVW7YuPFuqh4khGo4UejrvhQsEQF6Pyhm+3H5bLmQ=; b=pbkkurJ80qyOGza4EeTSMaIny9t+caFglaS8Q3KnX3C0W1d9Nf4r6iZ8MvTZb7m70q a3s0OwvXoHRNgDp+4WRs3Lltf+BKY08ASUuNjw/+42keQOnpkpgylh9oT7tAwgBSkl+Z YXRiEvcQ8wibx78+bLL6eiPV3BTsEOD3YrSO8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=d305npdDgTChmzgiXSdQq5B4TcYZaSg8kHisrREKWhm7X6XzUwwdccsvKesbw/DI2S tIoYhmhTDvxDW2Hnzxs/C5QZyEoz7eqNC3f247g2h/r0mKlIz/25NjBQy9LXfzrZ3lTn QgdXq0RQP33KMF3vWegujdUYYiTgo408I5zBo= Received: by 10.103.4.25 with SMTP id g25mr2135156mui.59.1272276012079; Mon, 26 Apr 2010 03:00:12 -0700 (PDT) Received: from [192.168.1.3] ([95.43.41.44]) by mx.google.com with ESMTPS id w5sm16236189mue.54.2010.04.26.03.00.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 26 Apr 2010 03:00:11 -0700 (PDT) Message-ID: <4BD563F7.4010203@googlemail.com> Date: Mon, 26 Apr 2010 12:59:19 +0300 From: oklahoma User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Hubert Tournier , freebsd-smp@freebsd.org References: <28357071.post@talk.nabble.com> <4BD4727F.4060700@googlemail.com> <28359495.post@talk.nabble.com> In-Reply-To: <28359495.post@talk.nabble.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: 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: Mon, 26 Apr 2010 10:00:20 -0000 Hubert Tournier wrote: > > I forgot to specify that the system is a remote dedicated server, for which > i have no physical access. > > I could rent a virtual KVM in order to try to access its BIOS settings, but > i'm not sure this would work. > > Any other software solution? if the server is dedicated entirely to you, ask your colo support to disable it for you. other thing i find was machdep.hlt_cpus is suppose to tell the scheduler that there is extra cores but not to use them. try to enable and see with top is there app that use logical cores. From owner-freebsd-smp@FreeBSD.ORG Mon Apr 26 14:33:28 2010 Return-Path: Delivered-To: freebsd-smp@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F55A1065672 for ; Mon, 26 Apr 2010 14:33:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 114A78FC1F for ; Mon, 26 Apr 2010 14:33:28 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9EF5C46B32; Mon, 26 Apr 2010 10:33:27 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id E39238A01F; Mon, 26 Apr 2010 10:33:26 -0400 (EDT) From: John Baldwin To: freebsd-smp@freebsd.org Date: Mon, 26 Apr 2010 09:48:12 -0400 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <28357071.post@talk.nabble.com> <28359495.post@talk.nabble.com> <4BD563F7.4010203@googlemail.com> In-Reply-To: <4BD563F7.4010203@googlemail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201004260948.12730.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 26 Apr 2010 10:33:26 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Hubert Tournier , oklahoma 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: Mon, 26 Apr 2010 14:33:28 -0000 On Monday 26 April 2010 5:59:19 am oklahoma wrote: > Hubert Tournier wrote: > > > > I forgot to specify that the system is a remote dedicated server, for which > > i have no physical access. > > > > I could rent a virtual KVM in order to try to access its BIOS settings, but > > i'm not sure this would work. > > > > Any other software solution? > if the server is dedicated entirely to you, ask your colo support to > disable it for you. > other thing i find was > > machdep.hlt_cpus > > is suppose to tell the scheduler that there is extra cores but not to use them. > try to enable and see with top is there app that use logical cores. You can manually disable any CPU (except for the boot CPU), via 'hint.lapic.X.disabled=1' in loader.conf. You can find the APIC IDs to use in place of 'X' in dmesg. -- John Baldwin