搜索

3.2.3. 调​​​​​​​整​​​​​​​ CPUfreq 策​​​​​​​略​​​​​​​和​​​​​​​速​​​​​​​度​​​​​​​

download PDF
您​​​​​​​选​​​​​​​择​​​​​​​适​​​​​​​当​​​​​​​的​​​​​​​ CPUfreq 调​​​​​​​节​​​​​​​器​​​​​​​后​​​​​​​,您​​​​​​​可​​​​​​​以​​​​​​​使​​​​​​​用​​​​​​​在​​​​​​​ /sys/devices/system/cpu/[cpu ID]/cpufreq/ 中​​​​​​​找​​​​​​​到​​​​​​​的​​​​​​​可​​​​​​​调​​​​​​​按​​​​​​​钮​​​​​​​做​​​​​​​对​​​​​​​每​​​​​​​个​​​​​​​ CPU 的​​​​​​​速​​​​​​​度​​​​​​​做​​​​​​​进​​​​​​​一​​​​​​​步​​​​​​​的​​​​​​​调​​​​​​​节​​​​​​​。​​​​​​​这​​​​​​​些​​​​​​​可​​​​​​​调​​​​​​​按​​​​​​​钮​​​​​​​有​​​​​​​:
  • cpuinfo_min_freq — 显​​​​​​​示​​​​​​​ CPU 的​​​​​​​最​​​​​​​小​​​​​​​可​​​​​​​用​​​​​​​操​​​​​​​作​​​​​​​频​​​​​​​率​​​​​​​(单​​​​​​​位​​​​​​​千​​​​​​​赫​​​​​​​)
  • cpuinfo_max_freq — 显​​​​​​​示​​​​​​​ CPU 的​​​​​​​最​​​​​​​大​​​​​​​可​​​​​​​用​​​​​​​操​​​​​​​作​​​​​​​频​​​​​​​率​​​​​​​(单​​​​​​​位​​​​​​​千​​​​​​​赫​​​​​​​)
  • scaling_driver — 显​​​​​​​示​​​​​​​在​​​​​​​这​​​​​​​个​​​​​​​ CPU 中​​​​​​​用​​​​​​​来​​​​​​​设​​​​​​​定​​​​​​​频​​​​​​​率​​​​​​​的​​​​​​​ CPUfreq 驱​​​​​​​动​​​​​​​程​​​​​​​序​​​​​​​。​​​​​​​
  • scaling_available_governors — 显​​​​​​​示​​​​​​​这​​​​​​​个​​​​​​​内​​​​​​​核​​​​​​​中​​​​​​​可​​​​​​​用​​​​​​​的​​​​​​​ CPUfreq 调​​​​​​​节​​​​​​​器​​​​​​​。​​​​​​​如​​​​​​​果​​​​​​​您​​​​​​​要​​​​​​​使​​​​​​​用​​​​​​​不​​​​​​​在​​​​​​​此​​​​​​​文​​​​​​​件​​​​​​​列​​​​​​​表​​​​​​​中​​​​​​​的​​​​​​​ CPUfreq 调​​​​​​​节​​​​​​​器​​​​​​​,请​​​​​​​参​​​​​​​考​​​​​​​ 第 3.2.2 节 “CPUfreq 设​​​​​​​置​​​​​​​” 中​​​​​​​的​​​​​​​ 过程 3.2, “启​​​​​​​用​​​​​​​ CPUfreq 调​​​​​​​节​​​​​​​器​​​​​​​” 操​​​​​​​作​​​​​​​说​​​​​​​明​​​​​​​。​​​​​​​
  • scaling_governor — 显​​​​​​​示​​​​​​​当​​​​​​​前​​​​​​​使​​​​​​​用​​​​​​​的​​​​​​​ CPUfreq 调​​​​​​​节​​​​​​​器​​​​​​​。​​​​​​​要​​​​​​​使​​​​​​​用​​​​​​​不​​​​​​​同​​​​​​​的​​​​​​​调​​​​​​​节​​​​​​​器​​​​​​​,只​​​​​​​要​​​​​​​使​​​​​​​用​​​​​​​ echo [governor] > /sys/devices/system/cpu/[cpu ID]/cpufreq/scaling_governor 命​​​​​​​令​​​​​​​即​​​​​​​可​​​​​​​(详​​​​​​​情​​​​​​​请​​​​​​​参​​​​​​​考​​​​​​​ 第 3.2.2 节 “CPUfreq 设​​​​​​​置​​​​​​​” 中​​​​​​​的​​​​​​​ 过程 3.2, “启​​​​​​​用​​​​​​​ CPUfreq 调​​​​​​​节​​​​​​​器​​​​​​​”)。​​​​​​​
  • cpuinfo_cur_freq — 显​​​​​​​示​​​​​​​ CPU 的​​​​​​​当​​​​​​​前​​​​​​​速​​​​​​​度​​​​​​​(单​​​​​​​位​​​​​​​千​​​​​​​赫​​​​​​​)。​​​​​​​
  • scaling_available_frequencies — 列​​​​​​​出​​​​​​​ CPU 可​​​​​​​用​​​​​​​频​​​​​​​率​​​​​​​,单​​​​​​​位​​​​​​​千​​​​​​​赫​​​​​​​。​​​​​​​
  • scaling_min_freq 和​​​​​​​ scaling_max_freq — 设​​​​​​​定​​​​​​​ CPU 策​​​​​​​略​​​​​​​限​​​​​​​制​​​​​​​,单​​​​​​​位​​​​​​​千​​​​​​​赫​​​​​​​。​​​​​​​

    重要

    当​​​​​​​设​​​​​​​定​​​​​​​策​​​​​​​略​​​​​​​限​​​​​​​制​​​​​​​时​​​​​​​,您​​​​​​​应​​​​​​​该​​​​​​​在​​​​​​​ scaling_min_freq 之​​​​​​​前​​​​​​​设​​​​​​​定​​​​​​​ scaling_max_freq。​​​​​​​
  • affected_cpus — 列​​​​​​​出​​​​​​​需​​​​​​​要​​​​​​​频​​​​​​​率​​​​​​​协​​​​​​​调​​​​​​​软​​​​​​​件​​​​​​​的​​​​​​​ CPU。​​​​​​​
  • scaling_setspeed — 用​​​​​​​于​​​​​​​更​​​​​​​改​​​​​​​ CPU 时​​​​​​​钟​​​​​​​速​​​​​​​度​​​​​​​,单​​​​​​​位​​​​​​​千​​​​​​​赫​​​​​​​。​​​​​​​您​​​​​​​只​​​​​​​能​​​​​​​在​​​​​​​ CPU 策​​​​​​​略​​​​​​​限​​​​​​​制​​​​​​​中​​​​​​​设​​​​​​​定​​​​​​​一​​​​​​​个​​​​​​​速​​​​​​​度​​​​​​​(根​​​​​​​据​​​​​​​ scaling_min_freq 和​​​​​​​ scaling_max_freq)。​​​​​​​
要​​​​​​​查​​​​​​​看​​​​​​​每​​​​​​​个​​​​​​​可​​​​​​​调​​​​​​​整​​​​​​​部​​​​​​​分​​​​​​​的​​​​​​​当​​​​​​​前​​​​​​​值​​​​​​​,请​​​​​​​使​​​​​​​用​​​​​​​ cat [tunable]。​​​​​​​例​​​​​​​如​​​​​​​:要​​​​​​​查​​​​​​​看​​​​​​​ cpu0 的​​​​​​​当​​​​​​​前​​​​​​​速​​​​​​​度​​​​​​​(单​​​​​​​位​​​​​​​千​​​​​​​赫​​​​​​​),请​​​​​​​使​​​​​​​用​​​​​​​:
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq.
要​​​​​​​更​​​​​​​改​​​​​​​每​​​​​​​个​​​​​​​可​​​​​​​调​​​​​​​整​​​​​​​部​​​​​​​分​​​​​​​的​​​​​​​值​​​​​​​,请​​​​​​​使​​​​​​​用​​​​​​​ echo [value] > /sys/devices/system/cpu/[cpu ID]/cpufreq/[tunable]。​​​​​​​例​​​​​​​如​​​​​​​:将​​​​​​​ cpu0 的​​​​​​​最​​​​​​​小​​​​​​​时​​​​​​​钟​​​​​​​速​​​​​​​度​​​​​​​设​​​​​​​定​​​​​​​为​​​​​​​ 360 千​​​​​​​赫​​​​​​​,请​​​​​​​使​​​​​​​用​​​​​​​:
echo 360000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.