Date: Fri, 4 Apr 2014 02:45:49 -0700 From: Adrian Chadd <adrian@freebsd.org> To: Jordan Hubbard <jkh@ixsystems.com> Cc: Alexey Dokuchaev <danfe@nsu.ru>, "freebsd-hackers@freebsd.org" <hackers@freebsd.org>, David Chisnall <theraven@freebsd.org>, Alan Somers <asomers@freebsd.org>, Eitan Adler <lists@eitanadler.com> Subject: Re: Power Efficiency (was Re: Leaving the Desktop Market) Message-ID: <CAJ-VmomuMr=AkTueRihjRw4XMZvMJPnF6wEG21yia6VrTAN0bg@mail.gmail.com> In-Reply-To: <7C720BEE-7440-4678-9322-988F68E6754F@ixsystems.com> References: <CAF6rxgkeBozvfV-L0%2BrFZ6fWRn0=Gi3BNq1kPL=-HTq0TD6MkQ@mail.gmail.com> <A70900DF-4BAA-427F-8731-01211FFD1887@mail.turbofuzz.com> <3F7430D7-3C0F-43E1-8EBD-8AA4F701497C@FreeBSD.org> <20140403034150.GA78653@regency.nsu.ru> <89A553DC-199A-47E3-B352-34A4CDCAC4E4@ixsystems.com> <CAOtMX2gwyEYM4DthpvRO3D=BmpTNnVH-tOgiMKxC=iRr=kS6Ug@mail.gmail.com> <7C720BEE-7440-4678-9322-988F68E6754F@ixsystems.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[snip] powertop as it stands is actually pretty freaking horrible internally and as Jordan says, it's very linux specific. There's already MSRs in Nehalem (I think) and later that let you get exactly how many joules are being consumed by various subsystems. The non-Xeon CPUs I think are limited to just the socket power; Xeon CPUs include memory power consumption as well. So, we could easily grow the basic "how much power is the system consuming?" stuff and if you limited it to one core per socket, you could actually virtualise the counters to figure out how much power each thread is consuming (and with a bit of math, how much power the OS is consuming.) The rest of it is interrupts, wakeups, context switches, sleep times (%age per core isn't enough; one needs to know how long min/avg/median/max we're staying in those Cx states!), timer events (and coalescing) and whatever external power readings devices give us. So yeah. Please listen to Jordan here. And please go forth and add some of the power consumption MSRs and sleep state tracking to the kernel. We can then start making some reasonable judgements about things. As a note: the difference between correctly tuning and defaults on my ivy bridge desktop at idle - mind you, just for the CPU - is around 4 joules/sec out of the box and around 1 joule/second with Turbo Boost enabled (ie, dynamic frequency scaling/overclocking); powerd not dropping the CPU frequency at idle and C2 set. The CPU then spends most of it's time in C7 state. -a
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmomuMr=AkTueRihjRw4XMZvMJPnF6wEG21yia6VrTAN0bg>