mattgadient.com

Performance Improvements: Undervolting Kaby Lake (R) Mobile

Intel’s push to compete with AMD’s Ryzen has resulted in processors with a lot more oomph going into laptops. Heck, a $500 Intel laptop these days will net you a 4-core/8-thread i5.

The downside of all this power going into laptops is… well… power.

The i5-8250u beside me sips about 2 watts when doing basic tasks (5-8 watts from the wall for the whole laptop), but fire up a game or something resource-intensive and suddenly the CPU rockets up to over 30 watts. For a brief moment the entire laptop pulls over 45 watts which is higher than the power adapter is rated for.

30W is a lot of heat for a basic laptop (with a dinky heat pipe and puny heatsink fins no less) to dissipate. In fact, it can’t keep up with that – moments after a CPU intensive task fires up, the temperature has hit near 100C and the CPU thermally throttles to a lower frequency to keep it from burning up.

As the resource-intensive use continues, the TDP throttling throttling kicks in and limits the power draw to 22W which keeps the frequency down. Note that other laptops with the i5-8250u may cap this at 15W, but regardless, your CPU frequency ends up dropping. You’re no longer above 3Ghz and quite possibly closer to 2Ghz.

Looking around, it seems many Coffee Lake CPUs are similar. If you want the machine to hit the high frequencies it’s going to need a lot of wattage to do it. And that causes throttling.

Testing/Benchmarks

I’ll start with the benchmarks this time around for those who already know the ins-and-outs and just want the numbers. The Phoronix Test Suite was used for most of the tests, though I manually ran a few games through Windows just because there’s always that chance that OS-specific things come into play.

Due to FPS scaling making charts hard to read (a 10fps result in the same chart as a 300fps result really drowns out the 10fps result), I converted everything to percentages. Percentages also gave better “at a glance” information. Due to the test suite taking about 8 hours per run, I only have numbers for stock and a -0.080v undervolt.

Test Setup: Dell Inspiron 5570, i5-8250u, UHD 620, 8GB DDR4-2400. You can see my write-up for the system itself here.

CPU Timed Benchmark Tests

Above is a variety of CPU-intensive tasks that took X seconds to complete. Compiling code, chess-solvers, prime number calculator, file compression, and a few scientific benchmarks.

You will notice that values are either high or near 0. The multi-threaded tests tend to be high in most cases. Single-threaded tests didn’t really benefit from the undervolt, and thus are generally closer to zero.

The takeaway? Multithreaded stuff tends to benefit quite a bit. If you ignore the items near 0, the average becomes a 7.9% improvement.

CPU Various Benchmarks Test

The above is everything that didn’t fit in a “graphics fps” or “cpu time” category (hence GLmark2 being in there).

I’m surprised at the Cpuminer and VP9 results – I would have thought they’d be multithreaded and/or benefit. In any case, we again see that multithreaded stuff tends to benefit. 8.7% is what we’re looking at if we avoid the items near 0.

Next up: the games. I had separated these out into FPS ranges because I kind of expected the higher FPS stuff to be less GPU-limited and benefit a little more.

It didn’t.

Game Benchmark Tests (less than 35 fps)

 


 

Game Benchmark Tests (between 40 and 80 fps)

Game and Graphics Benchmark Tests (between 100 and 300 fps)

Games are really a wash. I’m inclined to think something went awry during the UT2004 benchmarks despite the Phoronix Test Suite running everything multiple times. If you ignore UT2004, you’re looking at everything being within +/-3% with a slight tendency towards positive values.

Memory Benchmark Tests

Memory benchmarks don’t seem to benefit at all, which isn’t unsurprising. But it was worth checking to be sure.

Where under-volting improves performance, and why!

As seen above, multi-threaded programs that are CPU intensive tend to receive a definitive benefit by lowering the voltage. An ~8% improvement for a -0.080v under-volt is pretty reasonable “free” performance.

Here’s why it works…!

CPU thermal throttling reduces the frequency. The TDP throttling reduces the frequency. Both of these efforts reduce performance, but also reduce the power draw.

By undervolting, we effectively give the CPU less wattage at any given frequency. To give an example, assume we have a thermal limit or TDP limit of 22 watts. Let us also assume the CPU throttled to 2.0Ghz at that 22 watts. Undervolted slightly, reaching 2.0Ghz may now take only 20 watts. The CPU can now use a faster frequency… perhaps 2.3Ghz will now result in 22 watts. Running at 2.3Ghz is obviously faster than running at 2.0Ghz, so we get a little more performance.

Why single-threaded programs don’t gain a performance benefit from the under-volt

At stock voltages, a single-threaded program usually won’t cause the CPU to pull enough power to throttle. As an example, the i5-8250u running ONE thread in Prime95 pulls in the neighborhood of 15-16 watts on my laptop. That’s well below the 22W TDP limit that Dell has set. And when ambient temps are less than 30 degrees C, that 15-16 watts isn’t quite enough to thermally throttle either. The CPU stays at max frequency.

So does under volting provide ANY benefit when running single-threaded tasks on these chips?

POWER CONSUMPTION – 1 THREAD, 3.4Ghz, Prime95

Power Consumption when under-volting the 8250U

It does! While we don’t get a performance benefit (both stock + undervolted held 3.4Ghz), when running a single-threaded task, undervolting saves power. It also generates less heat.

The -0.080v undervolt saved about 3 watts with a thread running at full-tilt.

The bad news is that at idle, Intel’s chips are already really efficient so the undervolt doesn’t save power there. And multithreaded stuff will generally pull X watts where X is your TDP limit, though if your task finishes *faster* due to the undervolt allowing a higher sustained frequency you’ll save power.

The good news is that for sporadic tasks that just bump the frequency periodically (writing documents, mild web browsing, etc), you should see a power savings.

So… worth it?

It depends on the laptop and your expertise.

If your laptop isn’t very overclocking friendly (ie not easy to recover from bad BIOS settings), it’s probably not very undervolting-friendly either. Options like Intel XTU and perhaps pulling your IFR and writing to the EFI can work, but both can carry inherent risks. A bad or accidental setting could keep your laptop from starting up in which case your laptop might be toast (unless pulling the main + cell battery works or you get lucky and some other BIOS reset option works).

That said, if you get to the point where everything is working swimmingly, free gains are free gains.

…and sometimes it’s just fun to tinker.

2 Comments

 | Leave a Comment
  1. oscar barajas

    Can you be more specific about the undervolting process itself in perhaps a new post? I’d like to try it myself.

    • A completely separate writeup is a little hard because it tends to be system-specific. The process on my Gigabyte motherboard is very different from that of my Dell laptop. Principles are the same, but process is different.

      On desktops, it differs somewhat based on motherboard manufacturers etc (though generally done in the BIOS). However, the process of finding the voltage offset setting (default 0.000v) and slowly moving down negative values (-0.005, -0.010, -0.015, -0.020v etc) tends to remain the same. There can be an alternative option of setting a “static” or “manual” voltage but that has fallen out of favor as years have gone by. For example, a few years ago I wrote Sandy Bridge undervolting – offset vs manual and the conclusion at the time was a preference for manual. However for more recent processors, I have found offsets tend to work better.

      On laptops, those principles are the same but actually *accessing* the undervolt settings is often much harder:

      • Best case: Undervolt settings available in BIOS.
      • Medium case: Can undervolt via the Intel XTU program.
      • Worst case: Tweaking EFI vars.

      All carry a degree of danger, though the ease of shooting yourself in the foot and ending up with a system that can’t auto-recover and won’t boot anymore tends to increase as you go down that list.

      On the Inspiron 5570, I could do it via Intel XTU. However, I opted to do it via the EFI vars as it becomes a little more permanent. The EFI vars that I accessed on my Inspiron 5570 can be found on the Adventures with the Dell Inspiron 5570 page under the BIOS modding / IFR (dangerous) section.

      Note that even Intel XTU isn’t perfectly safe – at once point when tweaking some RAM settings via XTU my laptop didn’t boot anymore, so I had to open up the laptop and disconnect the main + cell batteries to reset the BIOS. And accidentally setting a voltage incorrectly can kill a processor in short order. So there is always risk.

      Edit: after thinking about it a little bit, if you’re approaching this from a first-timers point of view, it’s probably best to learn on a typical desktop motherboard (ASUS/Gigabyte/MSI/etc). Read a few guides, find a stable undervolt, find a stable overclock, etc. When the system doesn’t boot, there is usually a jumper pin you can short pretty easily, and you can try again. Every time it doesn’t boot you’ll have learned something new. I have reset desktop motherboard jumpers many hundreds of times.

      Once you really grasp/understand how and why you’re doing everything, you can take that knowledge to a laptop: at that point you know exactly what you want to do and what things are most likely to result in a system that doesn’t boot. The challenge becomes finding a way to actually access the settings you want to get at.

Leave a Comment

You can use an alias and fake email. However, if you choose to use a real email, "gravatars" are supported. You can check the privacy policy for more details.

To reduce spam, I manually approve all comments, so don't panic if it looks like the page simply refreshed and your comment doesn't show up immediately.