Firstly, do what was written at Disabling CPU speed scaling in CentOS 5
On CentOS 5, you may want to use the script and place it at /etc/init.d/cpuperf.
#! /bin/bash # # cpuperf 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
Type the command and you will see that the CPUSpeed are all at performance level.
# grep -E '^model name|^cpu MHz' /proc/cpuinfo
No comments:
Post a Comment