TDP and turbo parameter modification with MSR on non-overclockable CPU

Disclaimer

  • MSR modification may void your CPU’s (or system board’s) warranty. Proceed with care. I’m not responsible for any destruction caused by this article.
  • MSR address (greatly) differs from CPU to CPU. Check your own CPU’s MSR address using Intel’s documentation.
  • Only tested on Intel i7-8550U (Kaby Lake R).
  • This article is translation of this article. If you can understand Korean, I recommend reading that article, not this.

Start

On Windows, Intel XTU can be used for modifying turbo-boost parameter and TDP related settings. But on other OSes, there are no specific (user friendly) tools available. In this article, I will directly modify MSR (Model-Specific Registers) to achieve similar effect.

Know about your CPU

There are many CPU models. We call them by their friendly names – such as ‘Core i7’ – but this is not enough in this article. In fact, some CPUs are very different even if they are named after same friendly name. Some CPUs are named different, but they are actually same varient of other CPU. In Intel, they distinguish between CPU using CPU family and model. For example,

Note that /proc/cpuinfo returns CPU family and model by decimal.

Some dependencies

In Linux, you will need msr-tools, and msr kernel module. You may want to insert kernel module automatically by adding appropriate configuration. (e.g., echo msr > /etc/modules-load.d/msr.conf in Arch Linux)

You can read from MSR with rdmsr 0x(address) and write to MSR with wrmsr 0x(address) 0x(value). When reading, you can specify bitmasks by -f 15:0 (from bit 0 to bit 15, in reverse).

Power/Energy/Time units

My CPU has MSR_RAPL_POWER_UNIT at address 606h.

These units are needed to modify existing values.

Package power limits

Now the fun part begins, MSR_PKG_POWER_LIMIT has package power limit variables.

If bit 63 is 0, those values can be changed by writing to 0x610 register. You may change package power limit to higher TDP, and prolong limit time window to increase your processor’s performance (if you are not throttled by thermal throttling).

Turbo boost ratio limit

If MSR_PLATFORM_INFO[28] is 1, you can also change turbo boost limit variable.

Real life example, tune i7-8550U processor

Using above information, I could change MSR on my processor – i7-8550U.

Since this processor is limited to 37 boost ratio when all 4 cores are being used, I changed limitation to 40. Also, I changed 23W limit to 25W with longer (1073741824 seconds) boost duration.

From

To

Result

turbostat reported updated TDP limit and duration, and changed turbo boost ratio. I could not test real life performance difference, since my processor is heavily throttled by thermal throttling even at 15W TDP.

댓글 남기기