Optimal energy-conservation with Ryzen 5 1600? Ryzen 7 1700?

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,203
126
It seems pretty obvious that overclocking, will not give ideal energy efficiency.

But does underclocking? Or does that shut off some of the energy-saving features, and running at just straight stock save the most energy?

What about Windows 10's Power Plans?

Some say to put on High Performance, others say Balanced, some say to use AMD's specific Ryzen Power Plan. (Supposedly, you can download this, or it auto-installs with latest Ryzen platform / chipset drivers.)
 
 

Insert_Nickname

Diamond Member
May 6, 2012
4,971
1,695
136
The 1700 is already extremely efficient at stock, running right at the process sweet spot. I don't think you'll gain anything from underclocking, since you'll also lower performance. AMDs power management is also very sophisticated, so disabling anything would be detrimental as well.

For power efficiency the first place to look is always the PSU... ;)
 

moinmoin

Diamond Member
Jun 1, 2017
5,207
8,367
136
Ryzen is at its perfect power/performance efficiency at 3.3.Ghz so one could clock it at that. Everything below that (until 2.1Ghz) is fine if one prefers a lower TDP.

Regarding W10's power plans AMD's specific Ryzen power plan is the best for ensuring unused cores are parked, something that's especially important once some over- or underclocking is applied as that is effectively the all core clock, with all single core turbo/XFR being disabled then.
 

amd6502

Senior member
Apr 21, 2017
971
360
136
Perf/Watt of the processor probably peaks between 2-2.5 ghz (my guestimate). However, when you consider other power consuming components of the desktop system (ram, motherboard, hdd, fans, heat from psu) then Perf/Watt of the system of the whole may peak somewhat over 2.5ghz.

In linux the frequency governor can be set so that niced tasks (niced above a certain integer threshold) do not spin up the cores; that is the cores run at minimum frequency for highly niced tasks. In Mint 17 and Ubuntu 14.10 LTS based OSes you modify the value in the text file
/sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load
to enable this feature. (IMHO it would actually make sense that this should be enabled by default. So perhaps better distros are already all set up like that.)
 
Last edited:

noneis

Junior Member
Mar 4, 2017
21
29
91
Use P-State overclocking and undervolting. Then use power plans to limit frequency to certain max P-State when you need it. You can use Process Lasso to automatically switch power plans. (And more)

As discovered by Stilt 2.1 GHz and 3.3 GHz are efficiency sweetspots. Below 2.1 GHz stable voltage decreases only slightly. Something like:
2.1 GHz @ 0.725V
1.55 GHz @ 0.650V
1.2 GHz @ 0.625V

Keep in mind that Stilt's voltage curve is not at constant temperature, so if you use it to determine stable voltage at lower clock for you chip's P1 and P2 based on your stable voltage for higher clock, your system will become unstable when your cpu transitions from P0 to lower P-State.

Both Windows Balanced and AMD Ryzen Balanced power plans are suboptimal. AMD Ryzen Balanced has good performance but its energy characteristic is very similar to High Performance and it's not using lower P-States. If you enable lower P-States performance will regress with this plan.
Windows Balanced is using lower P-States but it's switching them slowly and doesn't retain them to improve performance and power efficiency. Windows Balanced parks cores to deeper sleep which is not noticeably more power efficient compared to Ryzen's built-in core parking and it's much slower. I'm using fully custom power plans.
 
Last edited:

maddie

Diamond Member
Jul 18, 2010
5,097
5,428
136
All we can conclude from the V/Fmax graph being a straight line from 2.1GHz - 3.3GHz is that the max efficiency is within that range.

AMD6502 is right when he believes that the CPU alone is close to the low end and total system is close to the high end. Actually, on further thought, depending on the rest of the system power consumption, the max system efficiency might be above the 3.3GHz linear region.
 

amd6502

Senior member
Apr 21, 2017
971
360
136
All we can conclude from the V/Fmax graph being a straight line from 2.1GHz - 3.3GHz is that the max efficiency is within that range.

That's somewhat what I was thinking, but I'm not even totally sure if the efficiency is flat in that range, or if there is a sweet spot within that range, either right around the middle, or around 2.1 ghz.

Voltage vs Frequency graph above does look like a straight line, but does that straight line go through the origin (y=k x) or is it affine (y=k x + y₀). If the CPU acts like a resistor, then the power should be proportioinal to square of Voltage.

There's little doubt that the system is probably very efficient at 3.3ghz and could be very close to optimum. I would guess that whatever the base frequency of the Epyc servers is is also going to be very close to (slightly high of) the optimum.
 
  • Like
Reactions: Space Tyrant

amd6502

Senior member
Apr 21, 2017
971
360
136
So, the piecewise linear bit seems to be affine. From my measuements I find that V=720 (in mV) at f=2150 Hz and V=960 mV at f=3100 Hz. Therefore between f=21 and f=33 (where f is in units of 100 Hz):
V= 177 mV + f * 25.26316 mV/100MHz (where V is milli volts)

The power should be proportional to the square of V, and the performance is approximately enough proportional to frequency. Dropping the pesky units and constants of proportionality let's say the power is P(f)=(177+f*25.3)^2 and the performance is p(f)=f. Then the inverse of perf/watt is proportional to 177*177/f + 50.5*177 + 638*f

The inverse of perf/watt is lowest at the bottom frequency f=21*100<=MHz
https://www.wolframalpha.com/input/?i=plot(177*177/f+++50.5*177+++638*f,+f=20..33)

meaning the CPU itself is most efficient at the bottom of that sweet spot range (2100-3300 MHz).

The sytem itself if probably most efficient a couple hundred MHz above that.
 
  • Like
Reactions: VirtualLarry

noneis

Junior Member
Mar 4, 2017
21
29
91
Based on amd6502 measurements:
I added Idle wattage, PSU, VRM efficiency, assuming constant efficiencies

IdleW ~ Idle Wattage, VRMe ~ VRM efficiency, PSUe = PSU efficiency, IBase ~ Current at given workload per 100 Mhz
IBase ~ 1.36A is for Prime Small FTT, IBase ~ 0.71A is for Monero Mining (lighter workload)

P(f, IdleW, IBase, VRMe, PSUe) = IdleW + ((0.177+f*0.0253)^2)*f*(IBase/VRMe/PSUe)
P(f, IdleW=60, IBase=1.36, VRMe=0.9, PSUe=0.85) = 60 + ((0.177+f*0.0253)^2)*f*(1.36/0.9/0.85)

Power efficiency = f / (60 + ((0.177+f*0.0253)^2)*f*(1.36/0.9/0.85))

Prime Small FTT
https://www.wolframalpha.com/input/...77+f*0.0253)^2)*f*(1.36/0.9/0.85)),+f=21..33)
Monero Mining
https://www.wolframalpha.com/input/...77+f*0.0253)^2)*f*(0.71/0.9/0.85)),+f=21..33)

If we consider only power consumption above idle, then lowest voltage results in highest power efficiency. (2100 Mhz or lower)
System power efficiency depends on workload. Lighter workloads results in highest system Performance/Watt at higher frequency.
 
  • Like
Reactions: amd6502

moinmoin

Diamond Member
Jun 1, 2017
5,207
8,367
136
So far we only calculated the consumption of the cores. Going by the TDPs of the server chips the uncore of a single die uses up to 25 watts with DDR4 2666. TDP is lower with DDR4 2400 which amounts to 21.25 watts for the uncore. These obviously are independent from the performance of the cores, though the actual consumption of the uncore likely further depends on the features used that would otherwise be power gated.

For comparison this is the schematics of features available on a Zeppelin die:
AWhEsg2.png

I expect the die for Raven Ridge to have a vastly simplified uncore for additional power savings.
 

moinmoin

Diamond Member
Jun 1, 2017
5,207
8,367
136
AnandTech's Ryzen 3 review contains following measurements of the uncore:

"One of the odd things about the power consumption of the Ryzen 3 CPUs is the difference between how much power the cores internally measure compared to the full power consumption of the package measured as a whole, including the Infinity Fabric, DRAM controllers, IO and such. For the Ryzen 3 1200 for example, at full load the package has a power consumption of 40.43 W total, but the cores only count for 23.05W, leaving 17.38W on the table for the non-core elements in the chip. If we compare that to the Ryzen 5 1500X, we have 68.79W for the package and 49.69W for the cores, a 19.1W difference. For the Ryzen 7 1700X, it becomes 81.51W for the package and 62.10W for the cores, a 19.4W difference."

Considering Ryzen doesn't use the Epyc specific GMI (Global Memory Interconnect, extends the IF between chips on the same multi-chip module (MCM) package) nor xGMI (same but for 2 sockets) those may account for the difference.
 

amd6502

Senior member
Apr 21, 2017
971
360
136
Nice info! It seems like memory controllers can be power hungry. So if 20W for uncore, maybe a little under 15W for the memory controller, and a little over 5W for the I/O and chipset functions (as a very rough guesstimate).

I agree the CPU portion of RR should be much more area efficient without all the server uncore area. Hopefully RR APUs will be a slam dunk.