From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 6 04:42:08 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF9A4106566B for ; Sat, 6 Mar 2010 04:42:08 +0000 (UTC) (envelope-from toasty@dragondata.com) Received: from mail-yw0-f191.google.com (mail-yw0-f191.google.com [209.85.211.191]) by mx1.freebsd.org (Postfix) with ESMTP id A5AF78FC23 for ; Sat, 6 Mar 2010 04:42:08 +0000 (UTC) Received: by ywh29 with SMTP id 29so1774017ywh.14 for ; Fri, 05 Mar 2010 20:42:03 -0800 (PST) Received: by 10.151.86.14 with SMTP id o14mr772030ybl.43.1267848892542; Fri, 05 Mar 2010 20:14:52 -0800 (PST) Received: from vpn214.ord02.your.org (vpn214.ord02.your.org [204.9.55.214]) by mx.google.com with ESMTPS id 21sm1986954iwn.11.2010.03.05.20.14.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 05 Mar 2010 20:14:51 -0800 (PST) From: Kevin Day Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Fri, 5 Mar 2010 22:14:50 -0600 Message-Id: <0ECDEB94-E60E-45C7-98AC-5E948DE4649C@dragondata.com> To: freebsd-hackers@freebsd.org Mime-Version: 1.0 (Apple Message framework v1077) X-Mailer: Apple Mail (2.1077) Subject: ACPI/power implementation causing performance loss with i7/Nehalem turbo boost X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Mar 2010 04:42:09 -0000 Recently I bumped into something very weird. In some CPU heavy = workloads, FreeBSD ran faster inside VMware's ESX hypervisor than it did = running natively on bare metal. Simple pure CPU applications (such as = "openssl speed") would run 10-30% faster on VMware. This seemed very = counterintuitive, until I discovered what I believe to be the cause.=20 Intel Nehalem and i5/i7 processors have a feature called "Turbo Boost", = where the more cores that are inactive (ACPI states C2 or C3) the higher = the clock rate of the active cores. In some processors increasing the = clock speed by more than 1ghz. On a hunch, I disabled turbo boost = (through the BIOS) on our ESX system, and this brought the speeds back = on par with the bare metal FreeBSD box. So, it seems that the VMware hypervisor is deactivating cores on the CPU = when idle, but FreeBSD itself isn't. Is anyone working on giving = FreeBSD's idle loop/scheduler the ability to go into deeper sleep = states? It seems this would have more than just a power savings benefit = now. Intel documentation on Turbo Boost: = http://download.intel.com/design/processor/applnots/320354.pdf?iid=3Dtech_= tb+paper -- Kevin