From owner-freebsd-performance@FreeBSD.ORG Sat Jul 24 14:18:07 2010 Return-Path: Delivered-To: freebsd-performance@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B06581065676 for ; Sat, 24 Jul 2010 14:18:07 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3C9E78FC12 for ; Sat, 24 Jul 2010 14:18:06 +0000 (UTC) Received: by fxm13 with SMTP id 13so5992259fxm.13 for ; Sat, 24 Jul 2010 07:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=7JVcqq3uEKxPBISQ1Dm9Lwx8feU0ezKVm6y2MQYqwco=; b=haGJlr+b573RE6SDFKT+L4w7lzbid8eM8BgvHB+vV7wSPRZ7HaLH5qxSs9UT9Y+C+M oLBgiO4OwGZ7e8P5XgrKYgrw+R0hoDiKK7JB0tINBZC9/PHpFhvZ9NKro0v1e4+SHs49 gRRmavv5j4NHi0/K0aI1QB02zZCxSXu1YZ4kk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=ltVw/MrbkrHEPmJuf0WF3tF2NYlLkMfSHvmsi9VRlYiOALyefFxux1uuPJUgo+gG3i 8LQKg0PYhdLAm3AKp5JAyeIS606xRrcHyGhth37LojV52OhIt35LfDT8JM4pFAS7Q3e+ jW9U0Q43nfK//a3eghnSxiLB+S/e6nB5MxvCM= Received: by 10.86.33.3 with SMTP id g3mr3382717fgg.73.1279979663693; Sat, 24 Jul 2010 06:54:23 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id k15sm521713fai.40.2010.07.24.06.54.22 (version=SSLv3 cipher=RC4-MD5); Sat, 24 Jul 2010 06:54:23 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C4AF046.40507@FreeBSD.org> Date: Sat, 24 Jul 2010 16:53:10 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: freebsd-performance@freebsd.org, freebsd-hackers@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Sat, 24 Jul 2010 14:39:09 +0000 Cc: Subject: Intel TurboBoost in practice X-BeenThere: freebsd-performance@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Performance/tuning List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 14:18:07 -0000 Hi. I've make small observations of Intel TurboBoost technology under FreeBSD. This technology allows Intel Core i5/i7 CPUs to rise frequency of some cores if other cores are idle and power/thermal conditions permit. CPU core counted as idle, if it has been put into C3 or deeper power state (may reflect ACPI C2/C3 states). So to reach maximal effectiveness, some tuning may be needed. Here is my test case: FreeBSD 9-CURRENT on Core i5 650 CPU, 3.2GHz + 1/2 TurboBoost steps (+133/+266MHz) with boxed cooler at the open air. I was measuring building time of the net/mpd5 from sources, using only one CPU core (cpuset -l 0 time make). Untuned system (hz=1000): 14.15 sec Enabled ACPI C2 (hz=1000+C2): 13.85 sec Enabled ACPI C3 (hz=1000+C3): 13.91 sec Reduced HZ (hz=100): 14.16 sec Enabled ACPI C2 (hz=100+C2): 13.85 sec Enabled ACPI C3 (hz=100+C3): 13.86 sec Timers tuned* (hz=100): 14.10 sec Enabled ACPI C2 (hz=100+C2): 13.71 sec Enabled ACPI C3 (hz=100+C3): 13.73 sec All numbers tested few times and are repeatable up to +/-0.01sec. *) Timers were tuned to reduce interrupt rates and respectively increase idle cores sleep time. These lines were added to loader.conf: sysctl kern.eventtimer.timer1=i8254 sysctl kern.eventtimer.timer2=NONE kern.eventtimer.singlemul=1 kern.hz="100" PS: In this case benefit is small, but it is the least that can be achieved, depending on CPU model. Some models allow frequency to be risen by up to 6 steps (+798MHz). PPS: I expect even better effect achieved by further reducing interrupt rates on idle CPUs. -- Alexander Motin