Remix.run Logo
PeterStuer 3 days ago

Nice project, but would it not be more rational to have your system running underclocked/undervolted at the optimal perf/watt at all times, with an optional boost to max performance for a time critical task? Running it away from the optimum might save on instant consumption but increase your aggregate consumption.

blitzar 3 days ago | parent | next [-]

Bring back the "turbo" button on the front of the PC.

naveen_k 3 days ago | parent | prev | next [-]

Thanks! That's an excellent point. You're right that there's likely a sweet spot that would be more efficient overall than aggressive throttling.

The current implementation uniformly sets max frequency for all 128 cores, but I'm working on per-core frequency control that would allow much more granular optimization. I'll definitely measure aggregate consumption with your suggestion versus my current implementation to see the difference.

schiffern 3 days ago | parent | next [-]

Zooming out, 80-90% of a computer's lifecycle energy use is during manufacturing, not pulled from the wall during operation.[1] To optimize lifetime energy efficiency, it probably pushes toward extending hardware longevity (within reason, until breakeven) and maximizing compute utilization.

Ideally these goal are balanced (in some 'efficient' way) against matching electricity prices. It's not either/or, you want to do both.

Besides better amortizing the embodied energy, improving compute utilization could also mean increasing the quality of the compute workloads, ie doing tasks with high external benefits.

Love this project! Thanks for sharing.

[1] https://forums.anandtech.com/threads/embodied-energy-in-comp...

KennyBlanken 3 days ago | parent | prev | next [-]

Please go learn about modern Ryzen power and performance management, namely Precision Boost Overdrive and Curve Optimizer - and how to undervolt an AM4/AM5 processor.

The stuff the chip and motherboard do, completely built-in, is light-years ahead of what you're doing. Your power-saving techniques (capping max frequency) are more than a decade out of date.

You'll get better performance and power savings to boot.

naveen_k 3 days ago | parent | next [-]

Thanks for the suggestion! I'm actually using dual EPYC server processors in this workstation, not Ryzen. I'm not sure EPYC supports PBO/Curve Optimizer functionality that's available in AM4/AM5 platforms.

That said, I'm definitely interested in learning more about processor-specific optimizations for EPYC. If there are server-focused equivalents to what you've mentioned that would work better than frequency capping, I'd love to explore them!

ac29 3 days ago | parent | prev [-]

For people with Intel processors, check out raplcap: https://github.com/powercap/raplcap

It lets you set specific power consumption limits in W instead of attempting to do the same by restricting maximum core frequencies (which could also be useful in addition to overall power limits).

csdvrx 3 days ago | parent | prev [-]

Another suggestion: when you want to save power, use irq affinity with /proc/irq/$irq/smp_affinity_list to put them all on one core.

This core will get to sleep less than the others.

You can also use the CPU "geometry" (which cores share cache) to set max frequency on its neighboring cores first, before recruiting the other cores

naveen_k 3 days ago | parent [-]

Thanks for the suggestion. Will check it out.

throwaway3231 3 days ago | parent | prev | next [-]

It's well established that completing the same task more slowly at a lower clock rate is actually less energy-efficient.

yjftsjthsd-h 3 days ago | parent [-]

Right, "race to idle"

nottorp 3 days ago | parent | prev [-]

How is it with modern overclocked by default cpus? If you cut power use by 50% you still get 80% of the performance?