Chinaunix

标题: redhat 下的cpu pstate调整命令 [打印本页]

作者: 刘彩霞    时间: 2013-08-09 10:31
标题: redhat 下的cpu pstate调整命令
1、redhat 6.2上关于cpu pstate的命令有cpufreq-info、cpufreq-aperf、cpufreq-selector、cpufreq-set 4个命令
2、在redhat 6.4上就变成了cpufreq-selector 、cpufreq-bench、cpufreq-bench_plot.sh 三个命令
3、其实我还是比较喜欢cpufreq-aperf这个命令,是不是可以在redhat6.4下讲acpi_cpufreq这个驱动模块给卸载掉,安装redhat6.2版本的acpi_cpufreq驱动模块呢?我想应该是可以的,趁机器有空时试试
4、关于cpufreq-seletor这个命令
    说明是参数 -c,--cpu CPU Number
                   -g,--governor Governor
                   -f, --frequency Frenquency in KHz
  我尝试使用这个命令 cpufreq-selector -c 0 -g performance 查看结果设置成功;
  我想我如果有240个逻辑cpu时总不能挨个去设置吧,我就用了 cpufreq-selector -c 0,10 -g performance  想去设置0-10的提示-c 0,10不存在,改成0-10同样不成功;
  于是我想拿我用循环吧,我就写了个函数cpufreq.sh
  #!/bin/sh
  for((i=0,i<11;i++))
  do
  echo $i
  cpufreq-selector -c $i -g performance
  done
信心满满的去执行了结果报错了:
Error calling SetGovernor:Did not receive a reply.Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply,the reply timeout expired,or the network connection was broken.
我想是不是循环不行,再去尝试cpufreq-selector -c 0 -g performance ,同样提示错误。
想啊,这个网络down掉,不可能呀,我是在本机上操作的,那就是security问题,可这是个啥问题呀?有人遇到过不?
作者: 刘彩霞    时间: 2013-08-09 11:22
在google上去搜索,从结果看在linux kernel 2.6.28时已经有人发现这个问题了,解释说这个错误不会造成影响;可问题是我想设置cpu的performance模式没设置成功呀;如何设置呀,也有说在kernel 2.6.30会解决,可是我现在都高于2.6.30了,我是redhat6.2呀,问题依然存在呢。

http://ubuntuforums.org/archive/index.php/t-1074757.html
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/332170

难道说我如果想将cpu的p state设置成performance模式还设置不成了,只能关闭acpi,让cpu跑在最高频率上。


作者: nemopang    时间: 2013-08-12 00:31
提示: 作者被禁止或删除 内容自动屏蔽
作者: 刘彩霞    时间: 2013-08-12 15:59
nemopang 发表于 2013-08-12 00:31
http://www.2cto.com/os/201301/181402.html

调整CPU工作模式:


用cpufreq-selector  -g performance 不能实现调整整体cpu的模式;在redhat 6.3、6.4下都试过,
cpufreq-selector  -g performance 只能实现更改cpu0的,cpu1的都没更改。
而且去查看时,只是scaling_governor 更改了,cpuinfo_cur_freq并不是最高频率。






欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2