From owner-freebsd-stable@FreeBSD.ORG Tue May 24 16:51:04 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 648AC1065670 for ; Tue, 24 May 2011 16:51:04 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3B18D8FC0A for ; Tue, 24 May 2011 16:51:03 +0000 (UTC) Received: by pzk27 with SMTP id 27so3948329pzk.13 for ; Tue, 24 May 2011 09:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=6qfk4VZ9ZdRTEPYgMnf+DC+bVnHiRx+jmvhepWXwqVg=; b=KtxkXo/Y7h+ar1a0zg55RclM7UXEqNInHC62ptUSmYF1YEPJFKP2O12512V+aWzdWo hdHgQ84kMJZPiQMV8VHoqWBPQ3Kzp3U6xN3yRs1K1RiNJIibRJUfcI6ILkSwclDh4eRK 4/jKwLK32LSSU9pbQeSoLnSg8B9wjT5ZHBR34= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type; b=RG+dsTvkwKmpIxMkO/N/5x0MP0Jn2kcL78P2AXS5uAcoeMhvKmO0jAeIKH8PwyRp0i BDCW9bEz9gKoNaIn1MjFWJRfNoMy3XmUTDN0bIol0iDU/QEvmP/6zPHXPNBHGAQO2Kuj sjfrPmb4KYrGjHp4r8kmyfuuh4CMpImiFXET0= MIME-Version: 1.0 Received: by 10.68.17.232 with SMTP id r8mr3006098pbd.91.1306254467686; Tue, 24 May 2011 09:27:47 -0700 (PDT) Received: by 10.68.63.104 with HTTP; Tue, 24 May 2011 09:27:47 -0700 (PDT) In-Reply-To: References: <4DDBB0C4.5010109@FreeBSD.org> Date: Tue, 24 May 2011 09:27:47 -0700 Message-ID: From: Josh Carroll To: FreeBSD Stable Mailing List Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [poll] hyperthreading_allowed, hlt_logical_cpus, mp_watchdog X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2011 16:51:04 -0000 > Whatever you do, please leave at least some way (at least a tunable) to > enable/disable HTT - some workloads are better with, and some without it, > and some BIOSes are unreliable in enabling/disabling it :) I noticed that disabling HTT via the machdep.hyperthreading_allowed tunable resulted in worse performance than disabling HTT via the BIOS. I'm not sure if that is to be expected due to how the scheduler ignores those cores or what, but just an observation I found while testing my i7 2600k to see if I should leave HTT on or off for my particular workloads. I was expecting only certain workloads to perform better with HTT on and others better with it off. However, I haven't found a task that performed better with HTT off. Some are almost equal (within a margin of error), but most are faster with HTT enabled (see below for the testing I did). For the tests below, I used an mdmfs for /usr/obj for all buildworld/buildkernel tests and they were all performed after caching the contents of /usr/src. I also ran each test 5 times and for each data point, I took the best run time. For the ffmpeg tests, I used -threads 0 to let it pick the number of threads to use. It seems hyperthreading on the Sandy Bridge i7 may be worth leaving enabled, though of course what I've tested below is just a small sample of possible tasks. So as with any benchmark, the only relevant tests are the things you use your machine for :) My workloads happen to all benefit from having HTT enabled. Josh buildworld (w/o HTT=-j5, w/HTT=-j11) =============================== HTT off: 558.65 seconds HTT on: 501.01 seconds buildkernel (w/o HTT=-j5, w/HTT=-j7) =============================== HTT off: 188.80 seconds HTT on: 187.03 seconds ffmpeg (10 min SD input - xvid/mp3) =============================== HTT off: 7.75 seconds HTT on: 6.28 seconds ffmpeg (5 min 720p input - h264/aac) =============================== HTT off: 20.08 seconds HTT on: 12.97 seconds ffmpeg (1 min 1080p input - h264/aac) =============================== HTT off: 38.91 seconds HTT on: 30.79 seconds