bc10-router/cpufreq
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
]
開始行:
[[bc10-router]]
#contents
*cpufreq による動的動作周波数変更 [#q82a4c8b]
Linux カーネルには CPU の動作周波数や動作電圧を動的に変更...
~
周波数や電圧を変更する方法は CPU によって異なり、CPU アー...
x86 アーキテクチャの CPU はかなり以前から対応していたので...
ARM アーキテクチャは SoC ごとに対応が必要で、~
bc10 で使用している Texus Instruments の OMAP3530 では~
3.2 kernel あたりから使用可能になりました。~
この仕組みを利用して動作クロックを変更した場合に~
ネットワークのスループット(と消費電力)はどのように変化...
** driver[#hfd82b95]
cpufreq を使用するためには kernel driver を有効にする必要...
ARCH=arm で menuconfig した際の、~
-> CPU Power management
-> CPU Frequency scaling
[*] CPU Frequency scaling
<*> CPU frequency translation statistics
[*] CPU frequency translation statistics details
Default CPUFreq governor (userspace) --->
<*> 'performance' governor
<*> 'powersave' governor
-*- 'userspace' governor for userspace frequency ...
<*> 'ondemand' cpufreq policy governor
<*> 'conservative' cpufreq governor
[*] Generic CPU0 cpufreq driver
ARM CPU frequency scaling drivers --->
で設定します。~
どの governor を有効にするか、有効にした governor のうち...
** governor [#bdee3c6b]
CPUfreq governor は動作周波数の変更に関する規則を決定する...
bc10 で使用している OMAP3530 で使用できる governor は以下...
|performance |最大動作周波数で CPU を動作させます。 |
|powersave |最小動作周波数で CPU を動作させます。 |
|userspace |root 権を持つユーザーやプログラムが動的に...
|ondemand |CPU 負荷に応じて動的に動作周波数を変更しま...
|conservative |CPU 負荷に応じて動的に動作周波数を変更しま...
** cpufreq インタフェース [#la7625d4]
この設定を有効にした kerenl で起動し、操作は sysfs の cpu...
# ls /sys/devices/system/cpu/cpu0/cpufreq/
affected_cpus scaling_cur_freq
cpuinfo_cur_freq scaling_driver
cpuinfo_max_freq scaling_governor
cpuinfo_min_freq scaling_max_freq
cpuinfo_transition_latency scaling_min_freq
related_cpus scaling_setspeed
scaling_available_frequencies stats
scaling_available_governors
このインタフェースで動作周波数や管理ポリシーを確認し設定...
各ファイルは以下の内容になっています。
|>|affected_cpus |ソフトウェアによる周波...
|>|cpuinfo_cur_freq |ハードウェアから得た現...
|>|cpuinfo_max_freq |動作可能な最大周波数。...
|>|cpuinfo_min_freq |動作可能な最小周波数。...
|>|cpuinfo_transition_latency |二つの動作周波数を移行...
|>|related_cpus |ソフトウェア・ハードウ...
|>|scaling_available_frequencies |動作可能な周波数のリス...
|>|scaling_available_governors |利用可能な governor の...
|>|scaling_cur_freq |governor と cpufreq コ...
|>|scaling_driver |cpufreq のハードウェア...
|>|scaling_governor |現在利用中の governor。...
|>|scaling_max_freq |動作ポリシーによって制...
|>|scaling_min_freq |動作ポリシーによって制...
|>|scaling_setspeed |ここへ変更したい動作周...
|stats |time_in_state |設定可能な動作周波数ご...
| |total_trans |動作周波数の変更が合計...
| |trans_table |設定可能などの動作周波...
** cpufrequtils [#j8b843d0]
このインタフェースを直接操作するのは煩雑なので、操作を行...
現在の状態の確認は cpufreq-info で行います。
# cpufreq-info
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 200...
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: omap
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by ...
maximum transition latency: 300 us.
hardware limits: 125 MHz - 600 MHz
available frequency steps: 125 MHz, 250 MHz, 500 MHz, 5...
available cpufreq governors: conservative, ondemand, po...
current policy: frequency should be within 125 MHz and ...
The governor "userspace" may decide whi...
within this range.
current CPU frequency is 600 MHz (asserted by call to h...
cpufreq stats: 125 MHz:0.00%, 250 MHz:0.00%, 500 MHz:0....
bc10 の OMAP3530 は 125、250、500、550、600 MHz で動作さ...
動作周波数の移行には最大 300 マイクロ秒の遅延が生じること...
現在の governor は userspace であること、~
現在は 600MHz で動作していること、がわかります。~
~
変更は cpufreq-set で行います。
# cpufreq-set --help
cpufrequtils 006: cpufreq-set (C) Dominik Brodowski 2004...
Report errors and bugs to cpufreq@vger.kernel.org, please.
Usage: cpufreq-set [options]
Options:
-c CPU, --cpu CPU number of CPU where cpufreq s...
-d FREQ, --min FREQ new minimum CPU frequency the...
-u FREQ, --max FREQ new maximum CPU frequency the...
-g GOV, --governor GOV new cpufreq governor
-f FREQ, --freq FREQ specific frequency to be set....
governor to be available and ...
-r, --related Switches all hardware-related...
-h, --help Prints out this screen
Notes:
1. Omitting the -c or --cpu argument is equivalent to se...
2. The -f FREQ, --freq FREQ parameter cannot be combined...
except the -c CPU, --cpu CPU parameter
3. FREQuencies can be passed in Hz, kHz (default), MHz, ...
by postfixing the value with the wanted unit name, wi...
(FREQuency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz ...
c、r はマルチプロセッサーのシステムでしか意味がないので~
bc10 で実質的に有効なのは d、u、g、f オプションです。~
~
500MHz 動作に変更したい場合は以下のように設定します。~
# cpufreq-set -f 500MHz
変更に成功した場合はメッセージなど何も表示されません。~
反映されたか確認したい場合は再度 cpufreq-info を実行する...
# cpufreq-info
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 200...
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: omap
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by...
maximum transition latency: 300 us.
hardware limits: 125 MHz - 600 MHz
available frequency steps: 125 MHz, 250 MHz, 500 MHz, ...
available cpufreq governors: conservative, ondemand, p...
current policy: frequency should be within 125 MHz and...
The governor "userspace" may decide wh...
within this range.
current CPU frequency is 500 MHz (asserted by call to ...
cpufreq stats: 125 MHz:0.00%, 250 MHz:0.00%, 500 MHz:3...
また、/proc/cpuinfo を確認すると動作周波数によって BogoMI...
これによっても変更の反映を確認することができます。~
**動作周波数別ネットワークスループット [#h302f02b]
bc10-router をルーターモードで起動し、~
OMAP3530 の cpufreq で設定可能な 125、250、500、550、600 ...
ネットワークスループットを比較します。~
テストには nuttcp を使用します。~
テストに使用する対抗側の PC は[[bc10-router/ネットワーク...
~
WAN側: bc10-router nuttcp -S~
LAN側: PC nuttcp 192.168.30.1~
・kernel 3.3.7~
-600MHz
BogoMIPS 581.89~
|回 | 1| 2| 3| 4| 5| 6|...
|Mbps |51.6822|50.4957|49.9095|50.0213|52.2133|47.8628|...
|%TX |6 |6 |6 |6 |6 |7 |...
|%RX |24 |24 |23 |23 |24 |22 |...
|retrans|0 |0 |0 |0 |0 |0 |...
|msRTT |1.51 |2.01 |1.49 |1.49 |1.53 |1.92 |...
-550MHz~
BogoMIPS 533.31~
|回 | 1| 2| 3| 4| 5| 6|...
|Mbps |50.6394|49.4836|56.4597|56.8420|52.9812|55.7499|...
|%TX |6 |6 |7 |7 |7 |7 |...
|%RX |24 |23 |25 |25 |25 |27 |...
|retrans|0 |0 |0 |0 |0 |0 |...
|msRTT |3.29 |1.58 |1.34 |2.20 |1.89 |1.65 |...
-500MHz~
BogoMIPS 484.74~
|回 | 1| 2| 3| 4| 5| 6|...
|Mbps |56.6270|57.3872|57.0966|56.7836|57.3331|55.9722|...
|%TX |6 |7 |6 |6 |7 |7 |...
|%RX |23 |25 |23 |24 |24 |25 |...
|retrans|0 |0 |0 |0 |0 |0 |...
|msRTT |1.42 |1.60 |3.47 |1.98 |1.42 |1.73 |...
-250MHz~
BogoMIPS 242.87~
|回 | 1| 2| 3| 4| 5| 6|...
|Mbps |31.6962|29.8153|29.7751|30.5470|31.3641|31.6964|...
|%TX |2 |2 |2 |2 |2 |4 |...
|%RX |14 |15 |14 |14 |16 |11 |...
|retrans|0 |0 |0 |0 |0 |0 |...
|msRTT |2.31 |2.15 |1.77 |2.32 |1.98 |2.56 |...
-125MHz~
BogoMIPS 121.43~
|回 | 1| 2| 3| 4| 5| 6|...
|Mbps |16.3279|16.0135|15.1922|15.6184|15.8227|16.6981|...
|%TX |1 |1 |1 |1 |1 |1 |...
|%RX |14 |12 |10 |14 |13 |12 |...
|retrans|0 |0 |0 |0 |0 |0 |...
|msRTT |3.05 |2.44 |2.36 |2.31 |4.31 |5.22 |...
500MHz動作で nuttcp によるテスト負荷に十分な処理能力に達...
600MHz、550MHz、500MHz動作ではネットワークのスループット...
~
250MHz動作で処理能力がほぼ半分になるとスループットも 500M...
125MHz動作で処理能力が 250MHz のほぼ半分になるとそれに応...
250MHz動作時の半分、500MHz動作時の四分の一になっています。~
~
bc10-router の AP に複数の Wi-Fi クライアントが接続して同...
最大動作周波数での動作が必要となる場合もあり得ますが、~
クライアントが一台だけの場合には 500MHz 動作で必要十分な...
**ondemand governor での動作 [#b4a88920]
cpufreq governor を ondemand に設定しすると動作周波数は自...
設定可能範囲の下限である 125MHz に下がり、
通信などが行われ負荷が高くなった時だけ動作周波数が高くな...
使用電力を少なくする、発熱を抑える、などの効果が期待でき...
~
終了行:
[[bc10-router]]
#contents
*cpufreq による動的動作周波数変更 [#q82a4c8b]
Linux カーネルには CPU の動作周波数や動作電圧を動的に変更...
~
周波数や電圧を変更する方法は CPU によって異なり、CPU アー...
x86 アーキテクチャの CPU はかなり以前から対応していたので...
ARM アーキテクチャは SoC ごとに対応が必要で、~
bc10 で使用している Texus Instruments の OMAP3530 では~
3.2 kernel あたりから使用可能になりました。~
この仕組みを利用して動作クロックを変更した場合に~
ネットワークのスループット(と消費電力)はどのように変化...
** driver[#hfd82b95]
cpufreq を使用するためには kernel driver を有効にする必要...
ARCH=arm で menuconfig した際の、~
-> CPU Power management
-> CPU Frequency scaling
[*] CPU Frequency scaling
<*> CPU frequency translation statistics
[*] CPU frequency translation statistics details
Default CPUFreq governor (userspace) --->
<*> 'performance' governor
<*> 'powersave' governor
-*- 'userspace' governor for userspace frequency ...
<*> 'ondemand' cpufreq policy governor
<*> 'conservative' cpufreq governor
[*] Generic CPU0 cpufreq driver
ARM CPU frequency scaling drivers --->
で設定します。~
どの governor を有効にするか、有効にした governor のうち...
** governor [#bdee3c6b]
CPUfreq governor は動作周波数の変更に関する規則を決定する...
bc10 で使用している OMAP3530 で使用できる governor は以下...
|performance |最大動作周波数で CPU を動作させます。 |
|powersave |最小動作周波数で CPU を動作させます。 |
|userspace |root 権を持つユーザーやプログラムが動的に...
|ondemand |CPU 負荷に応じて動的に動作周波数を変更しま...
|conservative |CPU 負荷に応じて動的に動作周波数を変更しま...
** cpufreq インタフェース [#la7625d4]
この設定を有効にした kerenl で起動し、操作は sysfs の cpu...
# ls /sys/devices/system/cpu/cpu0/cpufreq/
affected_cpus scaling_cur_freq
cpuinfo_cur_freq scaling_driver
cpuinfo_max_freq scaling_governor
cpuinfo_min_freq scaling_max_freq
cpuinfo_transition_latency scaling_min_freq
related_cpus scaling_setspeed
scaling_available_frequencies stats
scaling_available_governors
このインタフェースで動作周波数や管理ポリシーを確認し設定...
各ファイルは以下の内容になっています。
|>|affected_cpus |ソフトウェアによる周波...
|>|cpuinfo_cur_freq |ハードウェアから得た現...
|>|cpuinfo_max_freq |動作可能な最大周波数。...
|>|cpuinfo_min_freq |動作可能な最小周波数。...
|>|cpuinfo_transition_latency |二つの動作周波数を移行...
|>|related_cpus |ソフトウェア・ハードウ...
|>|scaling_available_frequencies |動作可能な周波数のリス...
|>|scaling_available_governors |利用可能な governor の...
|>|scaling_cur_freq |governor と cpufreq コ...
|>|scaling_driver |cpufreq のハードウェア...
|>|scaling_governor |現在利用中の governor。...
|>|scaling_max_freq |動作ポリシーによって制...
|>|scaling_min_freq |動作ポリシーによって制...
|>|scaling_setspeed |ここへ変更したい動作周...
|stats |time_in_state |設定可能な動作周波数ご...
| |total_trans |動作周波数の変更が合計...
| |trans_table |設定可能などの動作周波...
** cpufrequtils [#j8b843d0]
このインタフェースを直接操作するのは煩雑なので、操作を行...
現在の状態の確認は cpufreq-info で行います。
# cpufreq-info
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 200...
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: omap
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by ...
maximum transition latency: 300 us.
hardware limits: 125 MHz - 600 MHz
available frequency steps: 125 MHz, 250 MHz, 500 MHz, 5...
available cpufreq governors: conservative, ondemand, po...
current policy: frequency should be within 125 MHz and ...
The governor "userspace" may decide whi...
within this range.
current CPU frequency is 600 MHz (asserted by call to h...
cpufreq stats: 125 MHz:0.00%, 250 MHz:0.00%, 500 MHz:0....
bc10 の OMAP3530 は 125、250、500、550、600 MHz で動作さ...
動作周波数の移行には最大 300 マイクロ秒の遅延が生じること...
現在の governor は userspace であること、~
現在は 600MHz で動作していること、がわかります。~
~
変更は cpufreq-set で行います。
# cpufreq-set --help
cpufrequtils 006: cpufreq-set (C) Dominik Brodowski 2004...
Report errors and bugs to cpufreq@vger.kernel.org, please.
Usage: cpufreq-set [options]
Options:
-c CPU, --cpu CPU number of CPU where cpufreq s...
-d FREQ, --min FREQ new minimum CPU frequency the...
-u FREQ, --max FREQ new maximum CPU frequency the...
-g GOV, --governor GOV new cpufreq governor
-f FREQ, --freq FREQ specific frequency to be set....
governor to be available and ...
-r, --related Switches all hardware-related...
-h, --help Prints out this screen
Notes:
1. Omitting the -c or --cpu argument is equivalent to se...
2. The -f FREQ, --freq FREQ parameter cannot be combined...
except the -c CPU, --cpu CPU parameter
3. FREQuencies can be passed in Hz, kHz (default), MHz, ...
by postfixing the value with the wanted unit name, wi...
(FREQuency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz ...
c、r はマルチプロセッサーのシステムでしか意味がないので~
bc10 で実質的に有効なのは d、u、g、f オプションです。~
~
500MHz 動作に変更したい場合は以下のように設定します。~
# cpufreq-set -f 500MHz
変更に成功した場合はメッセージなど何も表示されません。~
反映されたか確認したい場合は再度 cpufreq-info を実行する...
# cpufreq-info
cpufrequtils 006: cpufreq-info (C) Dominik Brodowski 200...
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: omap
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by...
maximum transition latency: 300 us.
hardware limits: 125 MHz - 600 MHz
available frequency steps: 125 MHz, 250 MHz, 500 MHz, ...
available cpufreq governors: conservative, ondemand, p...
current policy: frequency should be within 125 MHz and...
The governor "userspace" may decide wh...
within this range.
current CPU frequency is 500 MHz (asserted by call to ...
cpufreq stats: 125 MHz:0.00%, 250 MHz:0.00%, 500 MHz:3...
また、/proc/cpuinfo を確認すると動作周波数によって BogoMI...
これによっても変更の反映を確認することができます。~
**動作周波数別ネットワークスループット [#h302f02b]
bc10-router をルーターモードで起動し、~
OMAP3530 の cpufreq で設定可能な 125、250、500、550、600 ...
ネットワークスループットを比較します。~
テストには nuttcp を使用します。~
テストに使用する対抗側の PC は[[bc10-router/ネットワーク...
~
WAN側: bc10-router nuttcp -S~
LAN側: PC nuttcp 192.168.30.1~
・kernel 3.3.7~
-600MHz
BogoMIPS 581.89~
|回 | 1| 2| 3| 4| 5| 6|...
|Mbps |51.6822|50.4957|49.9095|50.0213|52.2133|47.8628|...
|%TX |6 |6 |6 |6 |6 |7 |...
|%RX |24 |24 |23 |23 |24 |22 |...
|retrans|0 |0 |0 |0 |0 |0 |...
|msRTT |1.51 |2.01 |1.49 |1.49 |1.53 |1.92 |...
-550MHz~
BogoMIPS 533.31~
|回 | 1| 2| 3| 4| 5| 6|...
|Mbps |50.6394|49.4836|56.4597|56.8420|52.9812|55.7499|...
|%TX |6 |6 |7 |7 |7 |7 |...
|%RX |24 |23 |25 |25 |25 |27 |...
|retrans|0 |0 |0 |0 |0 |0 |...
|msRTT |3.29 |1.58 |1.34 |2.20 |1.89 |1.65 |...
-500MHz~
BogoMIPS 484.74~
|回 | 1| 2| 3| 4| 5| 6|...
|Mbps |56.6270|57.3872|57.0966|56.7836|57.3331|55.9722|...
|%TX |6 |7 |6 |6 |7 |7 |...
|%RX |23 |25 |23 |24 |24 |25 |...
|retrans|0 |0 |0 |0 |0 |0 |...
|msRTT |1.42 |1.60 |3.47 |1.98 |1.42 |1.73 |...
-250MHz~
BogoMIPS 242.87~
|回 | 1| 2| 3| 4| 5| 6|...
|Mbps |31.6962|29.8153|29.7751|30.5470|31.3641|31.6964|...
|%TX |2 |2 |2 |2 |2 |4 |...
|%RX |14 |15 |14 |14 |16 |11 |...
|retrans|0 |0 |0 |0 |0 |0 |...
|msRTT |2.31 |2.15 |1.77 |2.32 |1.98 |2.56 |...
-125MHz~
BogoMIPS 121.43~
|回 | 1| 2| 3| 4| 5| 6|...
|Mbps |16.3279|16.0135|15.1922|15.6184|15.8227|16.6981|...
|%TX |1 |1 |1 |1 |1 |1 |...
|%RX |14 |12 |10 |14 |13 |12 |...
|retrans|0 |0 |0 |0 |0 |0 |...
|msRTT |3.05 |2.44 |2.36 |2.31 |4.31 |5.22 |...
500MHz動作で nuttcp によるテスト負荷に十分な処理能力に達...
600MHz、550MHz、500MHz動作ではネットワークのスループット...
~
250MHz動作で処理能力がほぼ半分になるとスループットも 500M...
125MHz動作で処理能力が 250MHz のほぼ半分になるとそれに応...
250MHz動作時の半分、500MHz動作時の四分の一になっています。~
~
bc10-router の AP に複数の Wi-Fi クライアントが接続して同...
最大動作周波数での動作が必要となる場合もあり得ますが、~
クライアントが一台だけの場合には 500MHz 動作で必要十分な...
**ondemand governor での動作 [#b4a88920]
cpufreq governor を ondemand に設定しすると動作周波数は自...
設定可能範囲の下限である 125MHz に下がり、
通信などが行われ負荷が高くなった時だけ動作周波数が高くな...
使用電力を少なくする、発熱を抑える、などの効果が期待でき...
~
ページ名:
BC::labsへの質問は、bc9-dev @ googlegroups.com までお願い致します。