Saturday 19 March 2016

Quickly Change CPU Gov (Raspberry Pi/Linux)

root@raspberrypi:~# apt-get install cpufrequtils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libcpufreq0
The following NEW packages will be installed:
  cpufrequtils libcpufreq0
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 53.5 kB of archives.
After this operation, 274 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libcpufreq0 armhf 008-1 [12.9 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main cpufrequtils armhf 008-1 [40.6 kB]
Fetched 53.5 kB in 0s (72.0 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libcpufreq0.
(Reading database ... 33671 files and directories currently installed.)
Preparing to unpack .../libcpufreq0_008-1_armhf.deb ...
Unpacking libcpufreq0 (008-1) ...
Selecting previously unselected package cpufrequtils.
Preparing to unpack .../cpufrequtils_008-1_armhf.deb ...
Unpacking cpufrequtils (008-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for systemd (215-17+deb8u3) ...
Setting up libcpufreq0 (008-1) ...
Setting up cpufrequtils (008-1) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Processing triggers for libc-bin (2.19-18+deb8u3) ...
Processing triggers for systemd (215-17+deb8u3) ...
****************************************************************************************
root@raspberrypi:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative ondemand userspace powersave performance
****************************************************************************************
nano /etc/default/cpufrequtils
****************************************************************************************
# valid values: userspace conservative powersave ondemand performance
# get them from cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors 
GOVERNOR="performance"
****************************************************************************************
**************AFTER BOOT CHECK**********************************************************
****************************************************************************************
root@raspberrypi:/mnt/USBHDD# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
****************************************************************************************
****************************************************************************************
****************************************************************************************
****************************************************************************************
root@raspberrypi:/sys/devices/system/cpu# time echo "scale=1500; 4*a(1)" | bc -l
3.141592653589793238462643383279502884197169399375105820974944592307\
81640628620899862803482534211706798214808651328230664709384460955058\
22317253594081284811174502841027019385211055596446229489549303819644\
28810975665933446128475648233786783165271201909145648566923460348610\
45432664821339360726024914127372458700660631558817488152092096282925\
40917153643678925903600113305305488204665213841469519415116094330572\
70365759591953092186117381932611793105118548074462379962749567351885\
75272489122793818301194912983367336244065664308602139494639522473719\
07021798609437027705392171762931767523846748184676694051320005681271\
45263560827785771342757789609173637178721468440901224953430146549585\
37105079227968925892354201995611212902196086403441815981362977477130\
99605187072113499999983729780499510597317328160963185950244594553469\
08302642522308253344685035261931188171010003137838752886587533208381\
42061717766914730359825349042875546873115956286388235378759375195778\
18577805321712268066130019278766111959092164201989380952572010654858\
63278865936153381827968230301952035301852968995773622599413891249721\
77528347913151557485724245415069595082953311686172785588907509838175\
46374649393192550604009277016711390098488240128583616035637076601047\
10181942955596198946767837449448255379774726847104047534646208046684\
25906949129331367702898915210475216205696602405803815019351125338243\
00355876402474964732639141992726042699227967823547816360093417216412\
19924586315030286182974555706749838505494588586926995690927210797509\
302952

real    0m6.785s
user    0m6.730s
sys     0m0.010s

****************************************************************************************

More Information: https://software.intel.com/sites/default/files/comment/1716807/how-to-change-frequency-on-linux-pub.txt

No comments:

Post a Comment