|||
最近安装测试 HPL 需要安装 ATLAS,而安装 ATLAS 需要关闭 CPU throttling(即CPU变频)。
在 Redhat 下关闭方法之一如下:
1. 在 /etc/init.d/ 目录下创建文件 ondemand,内容如下:
--------
#! /bin/bash
#
# ondemand sets cpu govermor
#
# chkconfig: 2345 10 90
#
# description: Set the CPU Frequency Scaling governor to "performance"
#
### BEGIN INIT INFO
# Provides: $ondemand
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
case "$1" in
start)
for CPUFREQ in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
do
[ -f $CPUFREQ ] || continue
echo -n performance > $CPUFREQ
done
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
-------------
2. 开启 ondemand服务
#chmod +x /etc/init.d/ondemand
#chkconfig ondemand on
#service ondemand start
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-4-20 08:15
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社