[ntp:questions] Power-saving patch to NTP
David Woolley
david at ex.djwhome.demon.co.uk.invalid
Mon May 19 07:32:37 UTC 2008
Evandro Menezes wrote:
>
> And, please, don't consider the power used by NTP itself, but rather
> the power used by the CPU idling in a higher power state than before
> NTP woke it up. Modern processors can draw 100W without doing
> anything useful, but it falls down to less than 10W it it's allowed
> run the HALT instruction instead when there's nothing to do.
HLT instructions are a complete red herring here. They've been available
for over 35 years, to my personal knowledge, and probably a lot more
than that. No mainstream Linux, and probably no Linux has not used
them. The recovery time to a HLT state from an interrupt service
routine should be 10s of nanoseconds[A], although high level language
ISRs may compromise this, and from user level, should be of the order of
half the context switch time, which ought to be well under one
microsecond. These are the normal exit times, and may actually be
shorter than to busy idle.
HLT is special in power management terms in that it doesn't require
heuristics on anything better than MSDOS, for any application that is at
all multi-tasking friendly.
>
> The picture that Red Hat refers to is that the CPU is removed from a
> deep C-state in order to run NTP for microseconds and then it remains
> in the running state for a few fractions of a second until it goes
> back to a deep C-state. So it's not a matter of NTP's duty cycle, but
But you've already told us that you get a 90% power saving before you go
to the deep state. In my view, a server that is running at a
sufficiently low CPU load that going deeper that HLT is useful is badly
over-dimensioned.
If high load depends on time of day, you will have to dimension air
conditioning for peak loading (which means times when you will never go
deeper than HLT), which will determine capital costs, and probably some
of the running costs. If you are getting significant energy bills, you
are likely to be on a peak usage tariff, and from an environmental point
of view, is it much better, once you've created the manufacturing costs
for the server, to get maximum economic value from it by marketing low
priority work for it. This also applies to the electricity generation
and transmission infrastructure, which needs to be dimensioned for
maximum load, and needs to contain components, which tend not to be
environmentally friendly, to server short terms peaks (not everyone can
pump water uphill in low demand times, and even that has capital and
efficiency costs.
Tactics for smoothing the load and achieving high productive utilisation
where common when capital cost was the main issue.
> the duty cycle resulting from the heuristics used by the hardware or
> the OS to decide when to place the CPU in a deep C-state.
[A] I suspect it is actually single figure nano-seconds on modern machines.
More information about the questions
mailing list