From owner-freebsd-current@freebsd.org Thu Aug 20 13:00:34 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3C119BDCC6 for ; Thu, 20 Aug 2015 13:00:34 +0000 (UTC) (envelope-from will@sundivenetworks.com) Received: from mail.sundivenetworks.net (mail.sundivenetworks.net [212.13.212.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A15376B9 for ; Thu, 20 Aug 2015 13:00:34 +0000 (UTC) (envelope-from will@sundivenetworks.com) Received: from static45-91.adsl.bogons.net ([85.158.45.91] helo=[192.168.1.20]) by mail.sundivenetworks.net with esmtpsa (TLSv1:ECDHE-RSA-AES256-SHA:256) (Exim 4.86 (FreeBSD)) (envelope-from ) id 1ZSPDF-000MuM-1x for freebsd-current@freebsd.org; Thu, 20 Aug 2015 13:44:57 +0100 From: Will Green Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: CPU Perf & Power Mgt Message-Id: <7B1D7A3F-DA20-4195-8228-7D3F07790B5C@sundivenetworks.com> Date: Thu, 20 Aug 2015 13:44:57 +0100 To: freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- X-Spam: No X-bounce-key: sundivenetworks.net-1; will@sundivenetworks.com; 1440075634; b6dc66ed; X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Aug 2015 13:00:34 -0000 Hello, I=E2=80=99ve been thinking about CPU performance and power management on = FreeBSD recently. As a user it seems like there has been little activity = in this area and I wanted to try and understand what the situation was. =46rom the publicly available information on powerd [1], the wiki [2] = and my attempts to optimize hardware power/performance; it seems the = current approach is quite old and laptop-focused. Recent CPU designs can = control the state and frequency of individual cores very quickly. In the = case of a single heavy thread, a multicore CPU might power-gate all but = one core so the active core can be pushed to a higher frequency. This = doesn=E2=80=99t seem to be possible on FreeBSD at the moment: powerd is = userland (~250 ms poll) and can only control the frequency of all cores = together. I understand this opens a can of worms as the CPU core states, frequency = and scheduler would all need to co-operate. However, I think it=E2=80=99s = important that this does happen. Without this functionality FreeBSD is = leaving performance on the table and consuming more power than other = operating systems. At BSDCan I heard that there was work going on for = arm systems, but didn=E2=80=99t manage to get any details and whether it = was relevant to amd64 too.=20 TIA, Will PS. I was interested to see Intel announce at IDF that they'll be = working with open source projects to implement "Speed Shift = Technology=E2=80=9D, which leaves responsibility for p-state management = on the CPU. [1] https://www.freebsd.org/cgi/man.cgi?query=3Dpowerd [2] https://wiki.freebsd.org/TuningPowerConsumption