Intel MSR frequency scaling per - thread
You cannot control individual core frequencies for active cores. You can, however, control frequencies of all active cores to be the same. The reasons are in the previous answers - all cores are on the same active voltage plane.
Hopefully, the next-gen Haswell processors will make it possible to control each core separately.
intel turbo boost driver requirements
Turbo boost doesn't require software intervention but it can be disabled (by the BIOS/UEFI or by the OS).
When disabled it is not reported by the cpuid
instruction.
You can check if TB is enabled by executing the command:
cpuid -1l6 | grep -i turbo
You'll need to install the cpuid tool but this doesn't require the intel_pstate
driver.
If TB is not enabled, check your BIOS/UEFI configuration. The OS could disable it too but it's not done by the Linux Kernel, eventually check your services.
Even if Turbo is enabled it can be limited, I don't think this is done by Linux but to be sure you can check the MSR 0x1ad
:
rdmsr 0x1ad
You need to be root to execute this (and install rdmsr).
It will give you an hex number where each byte is the multiplier to apply to the base frequency to get the maximum turbo frequency.
The rightmost byte tells the max TB frequency when only one core is active (assuming a reasonable configuration).
In my case I get 27272727
, the right most byte (the last two hex digits) is 27
or 39 in decimal.
The base frequency is usually 100MHz so I get 39*100MHz = 3,9GHz.
This MSR can be written by the software in some CPU.
Check if the frequency you got is the one advertised.
If TB is enabled and the maximum frequency is as advertised than you are fine.
The ACPI driver is probably not including the TB frequency in its maximum frequency but since the TB technology is active the CPU will use it autonomously.
Reading Current Uncore Frequency and Setting Uncore Frequency Multipliers
Your uncore frequency monitoring approach is correct. You must enable the monitoring in (U_MSR_PMON_FIXED_CTL
) and then you may read the performance counter (U_MSR_PMON_FIXED_CTR
). From my experience writing to U_MSR_PMON_GLOBAL_CTL
is not necessary. See Uncore performance monitoring manual.
Your uncore frequency ration 24, represents frequency 2.4 GHz, which you will be able to see from the U_MSR_PMON_FIXED_CTR
.
In default the MSR_UNCORE_RATIO_LIMIT
keeps the minimum and the maximum possible values, which are not the same. As of I know, these limits are not stored in any other available MSR, so you should store them. Rebooting the system will restore the default values.
Two extra hints:
To read/write MSRs on Intel (also works fine for AMD CPUs) it is good approach to use msr-safe, since it allows access registers without sudo rights based on a list of registers (specifying which register can be accessed) and their masks (specifying which bits can be written).
To tune and monitor (not-only) uncore frequency you may use my library MERIC.
Related Topics
Open File in Default Editor from Bash
How Does Docker Share Resources
Get .Net Core Dll Version on Linux
How to Ping Other Containers in a Docker Network Through Their Hostname
Copy N Bytes of Data X to File
Bash Script: Can Not Properly Handle Sigtstp
Linux Script with Netcat Stops Working After X Hours
Reading from a File in Assembly
How to Print $ in Shell Script
Error While Installing Mongodb on Ubuntu 16.04
How to Redirect Entire Output of Spark-Submit to a File
Check If a Git Branch Is Ahead of Another Using a Script
How to Create a File Listener in Linux
How to Check If One File Is Part of Other
Swift on Linux: Make Very First Step Work
Change Script Directory to User's Homedir in a Shell Script
Does Each Unix File Description Have Its Own Read/Write Buffers
Is There Any Posix Way Through Fstat() to Check Whether a File Is a Symbolic Link or Not