Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
odroid-xu4:application_note:software:cpufrequtils_cpufreq_govornor [2019/04/19 10:09]
joy.cho [[Example] ODROID-N2]
odroid-xu4:application_note:software:cpufrequtils_cpufreq_govornor [2019/04/19 10:34] (current)
odroid [Cpufrequtils]
Line 3: Line 3:
 Dynamic CPU frequency scaling (also known as CPU throttling) is a technique in computer architecture where a processor is run at a less-than-maximum frequency in order to conserve power. Dynamic CPU frequency scaling (also known as CPU throttling) is a technique in computer architecture where a processor is run at a less-than-maximum frequency in order to conserve power.
  
-Setup process ​is as following.+ 
 +Here is a setup process using "​cpufrequtils"​.
  
 === 1. Install "​cpufrequtils"​ === === 1. Install "​cpufrequtils"​ ===
Line 37: Line 38:
 Then, you can check the cpufreq info is updated. Then, you can check the cpufreq info is updated.
 <code bash target> <code bash target>
-sudo cpufreq-info -o+$ cpufreq-info -o
           minimum CPU frequency ​ -  maximum CPU frequency ​ -  governor           minimum CPU frequency ​ -  maximum CPU frequency ​ -  governor
 CPU  0       ​100000 kHz (  6 %)  -    1536000 kHz (100 %)  -  ondemand CPU  0       ​100000 kHz (  6 %)  -    1536000 kHz (100 %)  -  ondemand
Line 46: Line 47:
  
 === 4. [Option] Ubuntu 18.04 - Disable ondemand.service using systemctl === === 4. [Option] Ubuntu 18.04 - Disable ondemand.service using systemctl ===
-In case of Ubuntu 18.04, ondemand.service overrides the default governor,\\ +In case of <color #​ed1c24>​**Ubuntu 18.04**</​color>​, ondemand.service overrides the default governor, so you should disable it to use cpufrequtils.
-so you should disable it to use cpufrequtils.+
 <code bash target> <code bash target>
 $ sudo systemctl disable ondemand $ sudo systemctl disable ondemand
Line 59: Line 59:
  
 ===== Set-up Examples ===== ===== Set-up Examples =====
-==== [Example] ODROID-N2 ​====+=== [Example] ODROID-N2 ===
 == Available governor and cpu frequency sets == == Available governor and cpu frequency sets ==
 <code bash target> <code bash target>
Line 81: Line 81:
 </​code>​ </​code>​
  
-== Restart cpufrequtils ​==+== cpufreq-info ​==
 <code bash target> <code bash target>
 $ sudo service cpufrequtils restart $ sudo service cpufrequtils restart
Line 94: Line 94:
 CPU  5       ​100000 kHz (  5 %)  -    1800000 kHz (100 %)  -  ondemand CPU  5       ​100000 kHz (  5 %)  -    1800000 kHz (100 %)  -  ondemand
 </​code>​ </​code>​
-==== [Example] ODROID-XU3/​XU4 ​====+=== [Example] ODROID-XU3/​XU4 ===
 == Available governor and cpu frequency sets == == Available governor and cpu frequency sets ==
 <code bash target> <code bash target>
Line 115: Line 115:
 </​code>​ </​code>​
  
-== Restart cpufrequtils ​==+== cpufreq-info ​==
 <code bash target> <code bash target>
 $ sudo service cpufrequtils restart $ sudo service cpufrequtils restart
Line 130: Line 130:
 CPU  7       ​200000 kHz ( 10 %)  -    2000000 kHz (100 %)  -  ondemand CPU  7       ​200000 kHz ( 10 %)  -    2000000 kHz (100 %)  -  ondemand
 </​code>​ </​code>​
-==== [Example] ODROID-C2 ​====+=== [Example] ODROID-C2 ===
 == Available governor and cpu frequency sets == == Available governor and cpu frequency sets ==
 <code bash target> <code bash target>
Line 151: Line 151:
 </​code>​ </​code>​
  
-== Restart cpufrequtils ​==+== cpufreq-info ​==
 <code bash target> <code bash target>
 $ sudo service cpufrequtils restart $ sudo service cpufrequtils restart
Line 163: Line 163:
 </​code>​ </​code>​
  
-==== [Example] ODROID-C1 ​====+=== [Example] ODROID-C1 ===
  
 == Available governor and cpu frequency sets == == Available governor and cpu frequency sets ==
-<​code>​ +<​code ​bash target
-root@odroid:​~# ​cat /​sys/​devices/​system/​cpu/​cpu0/​cpufreq/​scaling_available_governors+cat /​sys/​devices/​system/​cpu/​cpu0/​cpufreq/​scaling_available_governors
 hotplug interactive conservative ondemand performance hotplug interactive conservative ondemand performance
 </​code>​ </​code>​
-<​code>​ +<​code ​bash target
-root@odroid:​~# ​cat /​sys/​devices/​system/​cpu/​cpu0/​cpufreq/​scaling_available_frequencies+cat /​sys/​devices/​system/​cpu/​cpu0/​cpufreq/​scaling_available_frequencies
 96000 192000 312000 408000 504000 600000 696000 816000 912000 1008000 1104000 1200000 1296000 1416000 1488000 1536000 1632000 1728000 1824000 96000 192000 312000 408000 504000 600000 696000 816000 912000 1008000 1104000 1200000 1296000 1416000 1488000 1536000 1632000 1728000 1824000
 </​code>​ </​code>​
Line 177: Line 177:
 == cpufrequtils option == == cpufrequtils option ==
 <code bash target> <code bash target>
-# vim /​etc/​default/​cpufrequtils+$ sudo vi /​etc/​default/​cpufrequtils 
 ENABLE="​true"​ ENABLE="​true"​
 GOVERNOR="​ondemand"​ GOVERNOR="​ondemand"​
Line 183: Line 184:
 MIN_SPEED=100000 MIN_SPEED=100000
 </​code>​ </​code>​
-== restart cpufrequtils ​== +== cpufreq-info ​== 
-<​code>​ +<​code ​bash target
-root@odroid:​~# ​service cpufrequtils restart +$ sudo service cpufrequtils restart 
-root@odroid:​~# ​cpufreq-info -o+ 
 +cpufreq-info -o
           minimum CPU frequency ​ -  maximum CPU frequency ​ -  governor           minimum CPU frequency ​ -  maximum CPU frequency ​ -  governor
 CPU  0        96000 kHz (  5 %)  -    1824000 kHz (100 %)  -  ondemand CPU  0        96000 kHz (  5 %)  -    1824000 kHz (100 %)  -  ondemand