From owner-freebsd-stable@FreeBSD.ORG Fri Apr 8 16:53:40 2011 Return-Path: Delivered-To: stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F5FF1065674; Fri, 8 Apr 2011 16:53:40 +0000 (UTC) (envelope-from hosting@syscare.sk) Received: from services.syscare.sk (services.syscare.sk [188.40.39.36]) by mx1.freebsd.org (Postfix) with ESMTP id 4AC6B8FC14; Fri, 8 Apr 2011 16:53:39 +0000 (UTC) Received: from services.syscare.sk (services [188.40.39.36]) by services.syscare.sk (Postfix) with ESMTP id A6E8494B58; Fri, 8 Apr 2011 18:53:38 +0200 (CEST) X-Virus-Scanned: amavisd-new at rulez.sk Received: from services.syscare.sk ([188.40.39.36]) by services.syscare.sk (services.rulez.sk [188.40.39.36]) (amavisd-new, port 10024) with ESMTP id gyUhI9B9mjDL; Fri, 8 Apr 2011 18:53:36 +0200 (CEST) Received: from hosting.syscare.sk (hosting [188.40.39.37]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by services.syscare.sk (Postfix) with ESMTPS id 5CF5494B36; Fri, 8 Apr 2011 18:53:36 +0200 (CEST) Received: (from www@localhost) by hosting.syscare.sk (8.14.4/8.14.4/Submit) id p38GraLA051995; Fri, 8 Apr 2011 18:53:36 +0200 (CEST) (envelope-from hosting@syscare.sk) X-Authentication-Warning: hosting.syscare.sk: www set sender to hosting@syscare.sk using -f To: Alexander Motin X-PHP-Originating-Script: 0:func.inc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 08 Apr 2011 17:53:36 +0100 From: Daniel Gerzo Organization: The FreeBSD Project In-Reply-To: <4D9F2384.5000104@FreeBSD.org> References: <4D9EEDAF.3020803@rulez.sk> <4D9EF48C.9070907@FreeBSD.org> <4D9F2384.5000104@FreeBSD.org> Message-ID: <85cda6f83d328e67a552b2cd5758dbd3@rulez.sk> X-Sender: danger@FreeBSD.org User-Agent: Roundcube Webmail/0.5.1 Cc: stable@FreeBSD.org Subject: Re: powerd / cpufreq question X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2011 16:53:40 -0000 On Fri, 08 Apr 2011 18:02:28 +0300, Alexander Motin wrote: >> OK, I understand what you are saying here. On the other side, I know >> pretty well how the load is distributed - in this particular case, >> the >> box is a web server, running ~30 php-cgi processes. >> This kind of operation doesn't require very high frequency and I >> suspect >> the cores are never waiting for each other. There could be an option >> which would allow an administrator to decide whether this is the >> case >> and allow him to set a higher -r and -i values, what do you think? > > I think it should be possible with minimal changes. So, here is my attempt to implement it: http://danger.rulez.sk/powerd.diff Can you please review & comment? I should be able to commit it mysqlf if you consider it acceptable. It seems to work for me :) >> >> Any idea what I should look for in the BIOS? > > Something about C-states, or Cx-states on the CPU page. But first > look at dev.cpu.X.cx_supported to make sure it is not already present > and just unused. Seems like it was enabled by default. I have like these: dev.cpu.0.cx_supported: C1/3 C2/96 C3/128 Does that mean I only need to set these in rc.conf?: performance_cx_lowest="C3" economy_cx_lowest="C3" Then run /etc/rc.d/power_profile 0x00? May it cause any instability? >> This is 8-STABLE, any idea whether there's a MFC plan for the extra >> 9-CURRENT bonuses? > > I suppose around May. Do you have some patches? If not you don't really need to make them just for me, I can wait a little. >>> You may want to look here: >>> http://wiki.freebsd.org/TuningPowerConsumption >> >> From reading this, are you reffering above to the C2 states? (seems >> like C3 is not optimal for this kind of operation...) > > The deeper state, the more power saved. To get most of it and to get > TurboBoost working you need at least C3 CPU state (ACPI may report it > with different number). Some latest Intel CPUs have no described > problems with C3 and LAPIC, for others described system tuning > requited. I believe this is pretty recent CPU (6 core Xeon X5650). Do you know about any problems? > PS: Using powerd in best case wont hurt performance, while using > C-states may even increase it in some cases because of TurboBoost. If I want to use C-states, should I stop to use powerd, or is it possible to use them both together? Thanks! -- Kind regards Daniel