Manually setting CPU's TSC value

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












On my system Ubuntu 16.04.1 with Kernel 4.13.0-36 the following TSC frequency is detected:



dmesg | grep MHz:


[ 0.004000] tsc: Detected 1800.000 MHz processor



I have an Intel i5-8250U KabyLake CPU with a basefrequency of 1,6 GHz:



https://ark.intel.com/products/124967



The command lscpu shows:



Model name: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Stepping: 10
CPU MHz: 1800.000
CPU max MHz: 1600,0000
CPU min MHz: 400,0000
BogoMIPS: 3600.00


If I fix the CPU frequency to 1.6 GHz and run



watch -n1 cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq



I get frequencies close to 1.6GHz:



1600789
1600084
1599992
1600058


while another tool cpufreq-aperf at the same time shows:



000 1408000 00 sec 006 ms 00 sec 993 ms 00
001 1408000 00 sec 003 ms 00 sec 996 ms 00
002 1408000 00 sec 005 ms 00 sec 994 ms 00
003 1408000 00 sec 005 ms 00 sec 994 ms 00


Actually, I would not even care but I'm measuring the performance of some algorithms and this leads to wrong values:



  • the C/B value of the algorithms is always higher by 11-13% to the known reference values


  • Intel vTune tells me that my CPU Frequency Ratio is 0.886


  • the percentual difference between the output of cpufreq-aperf and the content of scaling_cur_frequency is also ~ 88,6%


So I guess it's due to the wrong TSC value.



Is there a way to manually set the detected TSC / CPU MHz value in Ubuntu?




BTW, I guess its a bug/error caused by the hardware or by Intel, since Windows also reports the wrong base frequency in the TaskManager.










share|improve this question





















  • Well, no. The system figures out what tsc is during boot. In the source code tree see arch/x86/kernel/tsc.c. Your detail above is confusing, unless the reader also recalls your other question and reads it also. ... Oh, I see you deleted the other question, well explain what "C/B" is and that you have locked the CPU frequency and such.
    – Doug Smythies
    Mar 18 at 15:57















up vote
1
down vote

favorite












On my system Ubuntu 16.04.1 with Kernel 4.13.0-36 the following TSC frequency is detected:



dmesg | grep MHz:


[ 0.004000] tsc: Detected 1800.000 MHz processor



I have an Intel i5-8250U KabyLake CPU with a basefrequency of 1,6 GHz:



https://ark.intel.com/products/124967



The command lscpu shows:



Model name: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Stepping: 10
CPU MHz: 1800.000
CPU max MHz: 1600,0000
CPU min MHz: 400,0000
BogoMIPS: 3600.00


If I fix the CPU frequency to 1.6 GHz and run



watch -n1 cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq



I get frequencies close to 1.6GHz:



1600789
1600084
1599992
1600058


while another tool cpufreq-aperf at the same time shows:



000 1408000 00 sec 006 ms 00 sec 993 ms 00
001 1408000 00 sec 003 ms 00 sec 996 ms 00
002 1408000 00 sec 005 ms 00 sec 994 ms 00
003 1408000 00 sec 005 ms 00 sec 994 ms 00


Actually, I would not even care but I'm measuring the performance of some algorithms and this leads to wrong values:



  • the C/B value of the algorithms is always higher by 11-13% to the known reference values


  • Intel vTune tells me that my CPU Frequency Ratio is 0.886


  • the percentual difference between the output of cpufreq-aperf and the content of scaling_cur_frequency is also ~ 88,6%


So I guess it's due to the wrong TSC value.



Is there a way to manually set the detected TSC / CPU MHz value in Ubuntu?




BTW, I guess its a bug/error caused by the hardware or by Intel, since Windows also reports the wrong base frequency in the TaskManager.










share|improve this question





















  • Well, no. The system figures out what tsc is during boot. In the source code tree see arch/x86/kernel/tsc.c. Your detail above is confusing, unless the reader also recalls your other question and reads it also. ... Oh, I see you deleted the other question, well explain what "C/B" is and that you have locked the CPU frequency and such.
    – Doug Smythies
    Mar 18 at 15:57













up vote
1
down vote

favorite









up vote
1
down vote

favorite











On my system Ubuntu 16.04.1 with Kernel 4.13.0-36 the following TSC frequency is detected:



dmesg | grep MHz:


[ 0.004000] tsc: Detected 1800.000 MHz processor



I have an Intel i5-8250U KabyLake CPU with a basefrequency of 1,6 GHz:



https://ark.intel.com/products/124967



The command lscpu shows:



Model name: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Stepping: 10
CPU MHz: 1800.000
CPU max MHz: 1600,0000
CPU min MHz: 400,0000
BogoMIPS: 3600.00


If I fix the CPU frequency to 1.6 GHz and run



watch -n1 cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq



I get frequencies close to 1.6GHz:



1600789
1600084
1599992
1600058


while another tool cpufreq-aperf at the same time shows:



000 1408000 00 sec 006 ms 00 sec 993 ms 00
001 1408000 00 sec 003 ms 00 sec 996 ms 00
002 1408000 00 sec 005 ms 00 sec 994 ms 00
003 1408000 00 sec 005 ms 00 sec 994 ms 00


Actually, I would not even care but I'm measuring the performance of some algorithms and this leads to wrong values:



  • the C/B value of the algorithms is always higher by 11-13% to the known reference values


  • Intel vTune tells me that my CPU Frequency Ratio is 0.886


  • the percentual difference between the output of cpufreq-aperf and the content of scaling_cur_frequency is also ~ 88,6%


So I guess it's due to the wrong TSC value.



Is there a way to manually set the detected TSC / CPU MHz value in Ubuntu?




BTW, I guess its a bug/error caused by the hardware or by Intel, since Windows also reports the wrong base frequency in the TaskManager.










share|improve this question













On my system Ubuntu 16.04.1 with Kernel 4.13.0-36 the following TSC frequency is detected:



dmesg | grep MHz:


[ 0.004000] tsc: Detected 1800.000 MHz processor



I have an Intel i5-8250U KabyLake CPU with a basefrequency of 1,6 GHz:



https://ark.intel.com/products/124967



The command lscpu shows:



Model name: Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Stepping: 10
CPU MHz: 1800.000
CPU max MHz: 1600,0000
CPU min MHz: 400,0000
BogoMIPS: 3600.00


If I fix the CPU frequency to 1.6 GHz and run



watch -n1 cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq



I get frequencies close to 1.6GHz:



1600789
1600084
1599992
1600058


while another tool cpufreq-aperf at the same time shows:



000 1408000 00 sec 006 ms 00 sec 993 ms 00
001 1408000 00 sec 003 ms 00 sec 996 ms 00
002 1408000 00 sec 005 ms 00 sec 994 ms 00
003 1408000 00 sec 005 ms 00 sec 994 ms 00


Actually, I would not even care but I'm measuring the performance of some algorithms and this leads to wrong values:



  • the C/B value of the algorithms is always higher by 11-13% to the known reference values


  • Intel vTune tells me that my CPU Frequency Ratio is 0.886


  • the percentual difference between the output of cpufreq-aperf and the content of scaling_cur_frequency is also ~ 88,6%


So I guess it's due to the wrong TSC value.



Is there a way to manually set the detected TSC / CPU MHz value in Ubuntu?




BTW, I guess its a bug/error caused by the hardware or by Intel, since Windows also reports the wrong base frequency in the TaskManager.







performance cpu frequency






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 17 at 22:20









Fabihahn

61




61











  • Well, no. The system figures out what tsc is during boot. In the source code tree see arch/x86/kernel/tsc.c. Your detail above is confusing, unless the reader also recalls your other question and reads it also. ... Oh, I see you deleted the other question, well explain what "C/B" is and that you have locked the CPU frequency and such.
    – Doug Smythies
    Mar 18 at 15:57

















  • Well, no. The system figures out what tsc is during boot. In the source code tree see arch/x86/kernel/tsc.c. Your detail above is confusing, unless the reader also recalls your other question and reads it also. ... Oh, I see you deleted the other question, well explain what "C/B" is and that you have locked the CPU frequency and such.
    – Doug Smythies
    Mar 18 at 15:57
















Well, no. The system figures out what tsc is during boot. In the source code tree see arch/x86/kernel/tsc.c. Your detail above is confusing, unless the reader also recalls your other question and reads it also. ... Oh, I see you deleted the other question, well explain what "C/B" is and that you have locked the CPU frequency and such.
– Doug Smythies
Mar 18 at 15:57





Well, no. The system figures out what tsc is during boot. In the source code tree see arch/x86/kernel/tsc.c. Your detail above is confusing, unless the reader also recalls your other question and reads it also. ... Oh, I see you deleted the other question, well explain what "C/B" is and that you have locked the CPU frequency and such.
– Doug Smythies
Mar 18 at 15:57
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1016866%2fmanually-setting-cpus-tsc-value%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1016866%2fmanually-setting-cpus-tsc-value%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

GRUB: Fatal! inconsistent data read from (0x84) 0+xxxxxx

`kcmshell` modules relation with `/usr/share/applications`

How to enroll fingerprints to Ubuntu 17.10 with VFS491