ºìÁªLinuxÃÅ»§
Linux°ïÖú
µ±Ç°Î»ÖÃ: ºìÁªLinuxÃÅ»§ > Debian

debianÏÂÅäÖÃË«ºËcpu

·¢²¼Ê±¼ä:2008-02-18 09:53:35À´Ô´:ºìÁª×÷Õß:brancner
ÎÄ£ºjiqing(¼ªÇì) http://hi.baidu.com/jiqing0925
email: jiqingwu@gmail.com

ÎÒʵÑéÊÒÀïµÄµçÄÔÊÇamdË«ºËµÄcpu£¬°²×°ÁËdebian etch¡£

µ±ÎÒ°Ñϵͳ¼àÊÓÆ÷Ìí¼Óµ½Ãæ°åÉϺ󣬷¢ÏÖcpuµÄÀûÓÃÂÊ×ÜÔÚ50%ÒÔÉÏ£¬Ò²¾ÍÊÇ˵×ÜÓÐÒ»¸öºËÔÚÂú¸ººÉÔËת¡£

ÎÒÔÚÍøÉÏËÑË÷ÁËÕâ¸öÎÊÌ⣬ȴ·¢ÏÖºÍÎÒ¼¸ºõûÈ˺ÍÎÒÓöµ½ÏàͬµÄÎÊÌâ¡£

ÎÒÏ룬cpuÓÐÁ½¸öºË£¬Ò»¶¨ÊÇϵͳÉèÖÃÁ˵ÚÒ»¸öºËµÄÔËÐÐģʽ£¬µ«ÊÇûÓйÜÀíµÚ¶þ¸öºË£¬¿ÉÄܵڶþ¸öºËÒ»Ö±ÔÚÖ´ÐпÕÖ¸ÁËùÒÔÊÇÂú¸ººÉµÄ¡£

×îºóÕÒµ½ÁËÕâƪµ÷ÕûcpuƵÂʵÄÎÄÕ£¬²Î¿¼ÁËһϣ¬±§×ÅÊÔÊÔ¿´µÄÐÄ˼£¬ÎÒÊÇÕâÑù×öµÄ£º

1. ±à¼­ /etc/modules £¬¼ÓÈë¸Õ²Åmodprobe¹ÒÔصÄÄÚºËÄ£¿é

cpufreq-userspace
cpufreq-ondemand
cpufreq-powersave
cpufreq-conservative
powernow-k8.ko #ÇëÐÞ¸ÄΪÏàÓ¦µÄƵÂʵ÷½ÚÄ£¿é£¬Õâ¸öÊǶÔÓ¦ÎÒµÄamdµÄƵÂʵ÷½ÚµÄÇý¶¯¡£

°²×°sysfsutils

#apt-get install sysfsutils

ÒÔ³¬¼¶Óû§È¨Ïޱ༭/etc/sysfs.conf£¬ÎļþÄÚÈÝ£º

devices/system/cpu/cpu0/cpufreq/scaling_governor = ondemand
devices/system/cpu/cpu0/cpufreq/scaling_max_freq = 1600000 #ÇëÐÞ¸ÄΪÄúµÄCPUµÄ×î¸ßƵÂÊ
devices/system/cpu/cpu1/cpufreq/scaling_governor = ondemand
devices/system/cpu/cpu1/cpufreq/scaling_max_freq = 1600000 #ÇëÐÞ¸ÄΪÄúµÄCPUµÄ×î¸ßƵÂÊ

ÕâÑùÎÒ¶ÔcpuµÄÁ½¸öºËµÄÔËÐÐģʽ¶¼½øÐÐÁËÉèÖá£Êµ¼ÊÉÏÎÒÊǽµÆµÊ¹ÓÃÎÒµÄcpuÁË£¬cpuÊÇ2GµÄÖ÷Ƶ£¬ÎÒÖ»ÓÃÁË1.6G¡£

ÎÒ²»ÐèÒªÄÇô¿ì£¬¶øÇÒÕâÑùcpu»¹Ê¡µç£¬»·±£°¡¡£

ÖØÐÂÆô¶¯£¬¹þ¹þ£¬ÎÊÌâ½â¾ö£¬cpu0ºÍcpu1¶¼½â·ÅÁË£¬´Ó´Ë¹ý×ÅÐÒ¸£µÄÉú»î¡£

ÎÒ¾­³£Í¸¹ýϵͳ¼àÊÓÆ÷͵¿´ËûÃÇ£¬·¢ÏÖËûÃǵÄÕ¼ÓÃÂÊÒ»°ãÊÇ0£¥£¬ÎÒ´ÓÐÄÀïÏÛĽËûÃÇÐÖµÜÓÆÏеÄÉú»î¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ