From owner-freebsd-questions@freebsd.org Wed Aug 10 16:55:10 2016 Return-Path: Delivered-To: freebsd-questions@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 0A131BB51CF for ; Wed, 10 Aug 2016 16:55:10 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 652241A4E for ; Wed, 10 Aug 2016 16:55:08 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id u7AGsgKk006703; Thu, 11 Aug 2016 02:54:43 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Thu, 11 Aug 2016 02:54:42 +1000 (EST) From: Ian Smith To: Aleksander Alekseev cc: freebsd-questions@freebsd.org Subject: Re: Power consumption tuning In-Reply-To: Message-ID: <20160811015734.D79687@sola.nimnet.asn.au> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 16:55:10 -0000 In freebsd-questions Digest, Vol 636, Issue 4, Message: 2 On Tue, 9 Aug 2016 17:23:45 +0300 Aleksander Alekseev wrote: > Hello. > > I'm exploring how power consumption could be tuned on FreeBSD 11.0. I > discovered a few useful articles, for instance [1]. Also useful pieces > of advice were given on IRC. Resulting list is for now like this: > > * Use lightweight software (i3, GTK based GUI applications, etc), turn > off unused kernel modules, don't use full disc encryption, etc You don't need to 'turn off' unused modules, just don't load what you don't need :) More a memory use than power consumption issue? > * Reduce CPU frequency (sysctl dev.cpu.0.freq), use powerd to do it > automatically Yes. Its default parameters are usually a useful starting point. > * Reduce display brightness (sudo pkg install intel-backlight) > * Enable power save mode on NIC (sudo ifconfig wlan0 powersave) Check that your particular NIC works well in powersave mode. > * Disable unused USB devices (sudo usbconfig -d X.Y power_off) This might not win much, at least my webcam device saved maybe 150mW, and it wasn't good through suspend / resume without some fiddling. > * Reduce clock frequency (kern.hz = 100) I'm not convinced this wins much, power-wise, any more. With modern event counters mechanism - here HPET, one-shot mode - and kern.hz=1000 I see no more than 65-75 clock interrupts/s when idle, 2-300/s busy .. and that's on FreeBSD 9.3. > * Make sure your kernel is built without INVARIANTS and WITNESS You haven't said if this is for a desktop or laptop machine, two very different power consumption scenarios. Mention of [1] would suggest a laptop as that's what mav@'s work was focussed on there. > Perhaps there are other methods I didn't notice? For instance are there > any other sysctl parameters or kernel configuration options worth > trying? Well [1] stresses the importance of using maximum available C-states on your hardware. But except for powerd and C-states where possible, I wouldn't bother with all that to save an extra few watts on a desktop. > [1] https://wiki.freebsd.org/TuningPowerConsumption > Best regards, > Aleksander Alekseev What hardware? What OS version? cheers, Ian