Discussion

Setting CPU Frequency (CB for Banana Pi image)

24 25856
Roy360  
Post Last Edited by Roy360 at 2014-9-24 20:16
What about temperatures?

I get 35°C in an idle desktop and up to 50°C in 100% CPU use after 1 ho ...
thatsbanana Posted at 2014-8-8 11:35


I've got a tiny aluminium heatsync when compared to yours, but I plan on making a metal case for my Banana PI, so hopefully I can get close to your results.

I'm running OpenUSE, will OP's settings work for me?

(Still looking for the best OS for our PI, so far Android wins in performance)

tkaiser  
Edited by tkaiser at 2014-10-23 00:35
I get 35°C in an idle desktop and up to 50°C in 100% CPU use after 1 hour (both with cooler attached)


Which sensor data do you use for your measurements? Is it /sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input?

I did use the Lubuntu inbuilt function, don't know which sensor it uses. I hope the correct one

(in Lubuntu start->system tools->system profiler and benchmark->sensors)

tkaiser  
It's easy to check. Open up a terminal/xterm and do a
  1. awk '{printf ("%0.1f",$1/1000); }' </sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input
Copy the Code
If this is the same value Lubuntu shows then it's nothing related to CPU but the internal thermal sensor of the power management unit, the small 6x6mm AXP209 chip on the board. The SoC that contains also the CPU cores has also an internal sensor but it's somewhat difficult to read the values (correctly). SoC/CPU temperatures are normally way higher than the reported PMU temperature unless you really have many USB powered devices on your BPi.

In case you're interested in details: I tried to collect some infos here: http://forum.lemaker.org/thread- ... ure_monitoring.html

dwirish  
I need this explained in more detail. There are many things I am not familiar with.

(1) What does this mean -- "the following file save as shell file" i don't know what "save as shell file" involves.
(2) What is meant by the following?
    #!/bin/sh
      echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
      echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
      echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
      echo 25 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
      echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

Is this a batch file that I need to make and then run, or is ths just a list of files that need editing? PLease explain what specific things you are asking me to do.

(3) What values in which of the files do I need to change, and what do I need to change them to?

Edited by HWL_Stouf at Mon Nov 24, 2014 13:20

Hi,
Parts 1 and 2 :

Actually there is a clue : #!/bin/sh
This means it is a bash file.

So, "sudo nano cpu_freq.sh"
Copy/paste the script there,
CTRL+O to save, CTRL+X to quit;

Execute the file with :
  1. sudo bash cpu_freq.sh
Copy the Code
You could also copy the echos (minus #!/bin/sh) to /etc/rc.local for automatic setting on boot.

dwirish  
So Tony,

since i am not an expert user, and do not know what you mean by "shell file" or "placed in / etc / rc.local before the exit 0 can be executed", it would help if you could explain this in more detail. Does the first post in this thread ask me to copy the text you highlighted into a text file on my banana Pi (in Ubuntu), or does it ask me to edit existing files?

I think that the way this project will succeed is going to depend on how good the documentation for it is. Right now, I see a lot of stuff written in broken English from the perspective of programmers and experts. I need to see more clear writing for non-experts.

Hi,

Well, my English is very bad, but I will try to explain how the scripts work.
First you need to know what is a shell file. is like a batch file or .bat on Windows, it's just a script. a group of commands we need to run.
Using a shell file you can create some "automatic" tasks.
On the first line -> "#! / bin / sh" is like you are saying to the operating system that you need to run the commands below. for exemple, if you do:
  1. cat / sys / devices / system / cpu / cpu0 / cpufreq / scaling_max_freq
Copy the Code
The output of this command is your current cpufreq, as you can see, the CPU frequency is determined by a text file, which means you can modify this file. as "eco 1000000" you're saying to replace your cpu freq real to 1Ghz (or 1000Mhz, or 1,000,000 Hz).
So if you want to be overclocking your Bpi right at startup, you need to put your script (bash file) in /etc/rc.local
  
But I recommend that you run the script when you want.


I'm using this for overclock my BPi for 1.2Ghz
  1. #!/bin/sh

  2. echo ondemand | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

  3. echo 1200000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

  4. echo 1200000 | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

  5. echo 25 | sudo tee /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

  6. echo 10 | sudo tee /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
Copy the Code
Its stable, and using a small heatsink, and small notebook cpu fan blower i cant get 34ºC on full load


and again, sorry for the english.

using
  1. sysbench --test=cpu --cpu-max-prime=5000 run --num-threads=2
Copy the Code
For 1.2Ghz
  1. Test execution summary:
  2.     total time:                          43.0333s
  3.     total number of events:              10000
  4.     total time taken by event execution: 86.0499
  5.     per-request statistics:
  6.          min:                                  8.46ms
  7.          avg:                                  8.60ms
  8.          max:                                 83.19ms
  9.          approx.  95 percentile:               8.56ms

  10. Threads fairness:
  11.     events (avg/stddev):           5000.0000/5.00
  12.     execution time (avg/stddev):   43.0250/0.00
Copy the Code
and this for 1.29GHz
  1. Test execution summary:
  2.     total time:                          39.8222s
  3.     total number of events:              10000
  4.     total time taken by event execution: 79.6323
  5.     per-request statistics:
  6.          min:                                  7.83ms
  7.          avg:                                  7.96ms
  8.          max:                                113.52ms
  9.          approx.  95 percentile:               7.92ms

  10. Threads fairness:
  11.     events (avg/stddev):           5000.0000/3.00
  12.     execution time (avg/stddev):   39.8161/0.00
Copy the Code
Max temp 31ºc ~ 36ºc

akopac  
Edited by akopac at Fri Jan 16, 2015 13:44

Here is what I did.  I used synaptic to install:
Indicator-cpufreq
CPUfreqd
Then rebooted.
Also add CPUFrontend Icon in the panel utils. so you can check the cpu freq. by hovering over that icon.
You will get a processor panel icon with your other items (clock, network, sound icons)
Now you can click on the processor icon and vary your performance.  You can max. out at 1008 now, but I would suggest you get a 20mm x 20mm cpu heat sink off ebay for your cpu before you go hog would.   I'm sure there is a setting in a file somewhere that will let you increase it over 1008, but this seems reasonable until you get a heat sink on it.

You have to log in before you can reply Login | Sign Up

Points Rules