Manually setting CPU's TSC value


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 ofscaling_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
add a comment |Â
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 ofscaling_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
Well, no. The system figures out what tsc is during boot. In the source code tree seearch/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
add a comment |Â
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 ofscaling_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
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 ofscaling_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
performance cpu frequency
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 seearch/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
add a comment |Â
Well, no. The system figures out what tsc is during boot. In the source code tree seearch/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
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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