Score:0

Change Turbo ratio limits

it flag

I am quite new to ubuntu, but I would like to change turbo ratio limits. In Windows is that easy because of ThrottleStop. I found on GitHub undervolt, but I want set multipliers for turbo. Also I found something about multipliers, but it requies some msr modifications and I dont understand how can I do it.

Doug Smythies avatar
gn flag
Typically changing of turbo limits is done in BIOS, for persistence. However, they can also be changed via MSR writes, but those would be lost after re-boot. Your processor make and model number are needed for anyone to be able to write an answer.
david_svec avatar
it flag
I understand, I have intel i7-4700MQ. My Bios doesn't have that feature.
Score:0
gn flag

Use this answer at your own risk.
This answer uses a Intel(R) Core(TM) i5-10600K for examples. The register addresses should be the same for a i7-4700MQ.
Note: If your kernel is new enough, then write access to MSRs (Machine Specific Register)s will be disabled, requiring msr.allow_writes=on to be added to your /etc/default/grub command line, GRUB_CMDLINE_LINUX_DEFAULT.
Prerequisite: msr-tools, turbostat, and msr module loaded.

The MSR_TURBO_RATIO_LIMIT (1ADH) is read only if MSR_PLATFORM_INFO (0CEH) bit 28 is 0, but is read/write if bit 28 is 1.

Example method 1:

$ sudo modprobe msr
$ sudo rdmsr --bitfield 28:28 0x0ce
1

Example method 2, use turbostat to read the register and decode it myself. Also list the method 2 way for observing turbo ratios now:

$ sudo turbostat
turbostat version 21.05.04 - Len Brown <[email protected]>
...
cpu2: MSR_PLATFORM_INFO: 0x808083af1012900
...
cpu2: MSR_TURBO_RATIO_LIMIT: 0x303030303030
48 * 100.0 = 4800.0 MHz max turbo 6 active cores
48 * 100.0 = 4800.0 MHz max turbo 5 active cores
48 * 100.0 = 4800.0 MHz max turbo 4 active cores
48 * 100.0 = 4800.0 MHz max turbo 3 active cores
48 * 100.0 = 4800.0 MHz max turbo 2 active cores
48 * 100.0 = 4800.0 MHz max turbo 1 active cores
...

So, I have the ability to change my turbo ratios. What are they currently? Method 2, turbostat is listed and decoded above, which is probably easiest. Method 1:

$ sudo rdmsr 0x1AD
303030303030

8 bites per number of active cores ratios starting with 1, or all are 48. So say I wanted to change 6 active cores to 47, or 2FH:

$ sudo wrmsr 0x1AD 0x2f3030303030
$ sudo rdmsr 0x1AD
2f3030303030

And also check via turbostat:

$ sudo turbostat
...
cpu10: MSR_TURBO_RATIO_LIMIT: 0x2f3030303030
47 * 100.0 = 4700.0 MHz max turbo 6 active cores
48 * 100.0 = 4800.0 MHz max turbo 5 active cores
48 * 100.0 = 4800.0 MHz max turbo 4 active cores
48 * 100.0 = 4800.0 MHz max turbo 3 active cores
48 * 100.0 = 4800.0 MHz max turbo 2 active cores
48 * 100.0 = 4800.0 MHz max turbo 1 active cores

Note: Some processor models will list turbo ratios for more cores than they actually have. i5-9600K example:

cpu5: MSR_TURBO_RATIO_LIMIT: 0x2b2b2e2e2e2e2e2e
43 * 100.0 = 4300.0 MHz max turbo 8 active cores << I only have 6 cores
43 * 100.0 = 4300.0 MHz max turbo 7 active cores << I only have 6 cores
46 * 100.0 = 4600.0 MHz max turbo 6 active cores
46 * 100.0 = 4600.0 MHz max turbo 5 active cores
46 * 100.0 = 4600.0 MHz max turbo 4 active cores
46 * 100.0 = 4600.0 MHz max turbo 3 active cores
46 * 100.0 = 4600.0 MHz max turbo 2 active cores
46 * 100.0 = 4600.0 MHz max turbo 1 active cores

That information can be ignored.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.