maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Small app to keep processor at 500Mhz, possible? (https://talk.maemo.org/showthread.php?t=50993)

ndi 2010-04-27 11:45

Re: Small app to keep processor at 500Mhz, possible?
 
I don't know who started this while true bogus. This does NOT load cpu to max it only tricks it into staying at peak frequency. If this worked, all stress torture test apps would be out of business.

Contrary to popular belief, while true only does a JMP or a JE or JNZ or whatnot. A CPU is able to do a lot more complex instructions, with longer paths. Note the complete lack of cache, scheduling, swapping, memory access and whatnot from "while true". It is better suited to measuring idle consumption than full load.

If you want to know more about CPU load, look up tests ran on desktop OC machines. Start with LinPack from Intel, and continue through small and large FFT as well as Dhrystone and whetstone. Finally, Prime95 and SuperPI for limited test cases.

Additionally, above is a guide and does not compute to the watt. It is, however accurate to a decent 10 percent or so.

If you want to test CPU consumption, someone try a small buffer FFT, then we talk.

ndi 2010-04-27 11:50

Re: Small app to keep processor at 500Mhz, possible?
 
Oh one more thing:

Not all processors are equal. There is such a thing as an intended frequency where the darned thing is more efficient than the rest.

There is also a variation in manufacturing that separates man from beast. If they'd be the same it'd be too easy. And make overclocking contests very, very boring.

UNderworld 2010-04-27 12:11

Re: Small app to keep processor at 500Mhz, possible?
 
5 pages... no answer yet....

op: set the max to 500mhz and run an emulator

ossipena 2010-04-27 12:24

Re: Small app to keep processor at 500Mhz, possible?
 
Quote:

Originally Posted by jakiman (Post 628129)
hw engineer who unfortunately is an employee of Nokia.
If I was him, I would also say it's not safe to overclock. Legal reasons.

btw, I never said device feels cooler. Just going by technical theory.
and I'm not new to overclocking cpus and was an electrical engineer.

my criticism was about the fact that nokia engineer who knows a lot from HW. he has warned that overclocking may cause problems that can not be noticed. and there is nothing that proves that tweaking the cpu really makes device cooler.

jakiman 2010-04-27 12:59

Re: Small app to keep processor at 500Mhz, possible?
 
Quote:

Originally Posted by ossipena (Post 629796)
my criticism was about the fact that nokia engineer who knows a lot from HW. he has warned that overclocking may cause problems that can not be noticed. and there is nothing that proves that tweaking the cpu really makes device cooler.

yeah. well, what he said is nothing new. it's a well known possible downside to overclocking beyond manufacturer specification. but you also have to understand that chips are usually made with much higher tolerences. it's always guaranteed to run faster up to a certain point with negligeable problems. the fact that my one can run at 1.1ghz all day, watching movies, taking calls, browsing, gaming etc tells me it can handle quite a bit. I don't however run it at 1.1ghz all the time just in case as i cannot control the cooling level.

technically, it (cpu) will run cooler. not at 1+ghz but at 850mhz using ideal voltages, it should run cooler than stock voltage at 600mhz or have negigeable difference. Higher frequency does not mean it has to be worse for the chip. all depends.

anyways. considering Nokia said that even their stock kernel settings is not good for the N900 due to them overvolting, my undervolted cpu may make it last longer although either way, it should last us a good few years. And some other component will die before the cpu i'll bet.

titan 2010-04-27 16:12

Re: Small app to keep processor at 500Mhz, possible?
 
Quote:

Originally Posted by ossipena (Post 629796)
my criticism was about the fact that nokia engineer who knows a lot from HW. he has warned that overclocking may cause problems that can not be noticed. and there is nothing that proves that tweaking the cpu really makes device cooler.

according to the Nokia engineer Igor Stoppa, temperature is not the real issue (there seem to be safeguards) but overvoltage and data corruption:
http://talk.maemo.org/showpost.php?p...3&postcount=66
http://talk.maemo.org/showpost.php?p...&postcount=904

haj 2010-04-27 16:21

Re: Small app to keep processor at 500Mhz, possible?
 
I have been overclocking all kinds of cpus and gpus for the past 15 years and have never had a chip die as a result.. Most of the overclocking have involved higher voltage as well.

The OS will always crash before anything burns.

I'll be amazed if it's different with the CPU in the N900..

I'm fairly certain that the chip is has the voltage and the frequency it has due to a compromise to make sure it's stable even if a device gets a not so good chip.

Off cause it can cause problems that'll not be noticed, like corruption, only way to check this would be a burn in test, but that could be something a bit dangerous without additional cooling I guess :)

egoshin 2010-04-27 20:25

Re: Small app to keep processor at 500Mhz, possible?
 
Quote:

Originally Posted by ndi (Post 629747)
I don't know who started this while true bogus. This does NOT load cpu to max it only tricks it into staying at peak frequency.

Sure..

Quote:

Contrary to popular belief, while true only does a JMP or a JE or JNZ or whatnot.
Not true. Shell does a lot of things doing that. In case of C/C++ it could be 'yes, it's true' but not for interpreter language. Especially for busybox which even doesn't precompile script, I think. It processes script line-by-line.

[QUOTE] A CPU is able to do a lot more complex instructions, with longer paths. Note the complete lack of cache, scheduling, swapping, memory access and whatnot from "while true". It is better suited to measuring idle consumption than full load.[/QUOTE}

Again, if you speak about "true load" you right. But if we speak about rough measurements of power consumption comparison of different frequency it is enough. And cache + scheduling are in business. (I hope swapping - not)

ndi 2010-04-27 21:25

Re: Small app to keep processor at 500Mhz, possible?
 
I'm pretty sure the load of an interpreter interpreting "while true" doesn't challenge a CPU (agreed, it's not a JZ, but still). Percent load in an OS is nothing more that the inverse of cycles remaining free and with an application demanding unlimited slices it's 0%. It's not loaded.

I disagree with the fact that the same load provides an accurate benchmark. For example, at 250 MHz, while true gets 100 cycles, at 500 MHz you get 200 cycles (maybe), which is great to determine frequency. Cool.

However, should I overvolt the little bugger, you still get 200 cycles. Nothing is determined this way save for frequency.

When a real load is applied, things start to happen. Voltage drops (and is droop corrected on most machines), heat is being generated, components lose conductivity, resistance increases, and more power is needed. As a result, you get a different response curve for a script versus the heavy stuff.

As I said, I have an amp meter hooked up to my work CPU. The difference in load between a script loop, a heavy executable (Photoshop) and Linpack is visible on a 3 cm needle when switching frequency. Granted, this is a powerful and complex machine, more than the ARM we have in N900.

But I'm getting WAY off-topic even from my initial post. I'll wrap it up.

It is my opinion as a rather old overclocker that:

a) Nokia set the said limit most likely to keep the CPU from heating up and/or eating an inordinate amount of power. This has been carefully considered.

b) While it's probably overclockable to a decent degree with little risk during normal usage, hard conditions pose a risk to the CPU.

c) Heat protection is great to have, but is not the end of the story. By the time thermal shutdown kicks in, components are stressed by heat as they increase in temperature locally. This may or may not be enough to cause damage through repeated roasting.

d) Executing a "while true" in an interpreter at room temperature gets you no meaningful result if you ever forget the N900 on a car dashboard, running a graphics demo over wifi.

Take these, as always, with whatever size of salt grain you deem necessary. It was never my intention to hijack a thread on TMO and turn it into an overclocking thread. Sorry about that :)

javispedro 2010-04-27 21:35

Re: Small app to keep processor at 500Mhz, possible?
 
Quote:

Originally Posted by Matan (Post 627167)
But this same Nokia Guy also said that since 600MHz is dangerous, the device includes safeguards to prevent it from continuously running at 600MHz.

No, that was me -- "this Nokia Guy" corrected me.

Quote:

Originally Posted by Matan (Post 627167)
BTW, TI says that the OMAP should run for 50000 hours (that is more than 5 years) continuously at 600MHz.

No, that's not the 3430...

Quote:

Originally Posted by baron von bubba (Post 627513)
use a usb charger and have the phone sat @ 500mhz for long periods

It doesn't do that. We went over this on the other thread....

woody14619 2010-04-27 21:58

Re: Small app to keep processor at 500Mhz, possible?
 
Hate to break up the love fest, but there are at least 5 other threads that have already had this overclock debate. Can we not debate it every time it comes up, and stick to the thread topic? The topic was asking for a widget or app that can help the user control the processor speeds from the desktop, it was not asking for your opinion of using such a tool.

Quote:

Originally Posted by baron von bubba (Post 627034)
queen beecon can be used for simple commands as "widgets" the things on the right are clock settings that i can alter just by pressing them.

I like the look of the widgets in your post Baron. Could you please post the code/scripts behind it and/or give a small tutorial on how to set them up with queen beecon for those of us that would like to have something similar on our desktops?

ndi 2010-04-27 22:09

Re: Small app to keep processor at 500Mhz, possible?
 
Good thing you came along, we would be stuck here for days in our decadent love fest. Thanks!

jakiman 2010-04-28 02:25

Re: Small app to keep processor at 500Mhz, possible?
 
I posted an export code of my beecon a while back. Here:

http://talk.maemo.org/showpost.php?p...postcount=2864
http://talk.maemo.org/showpost.php?p...postcount=2867

But change the following lines to what you want. (change the Title for each new instance and change the Cmd to reflect that title) Also I've updated the script below so it doesn't output anything. (better than piping it out to sudo gainroot as I did originally)

Quote:

instanceTitle=STOCK
instanceCmd=sudo /usr/sbin/kernel-load /usr/share/kernel-power-settings/default
What I do is copy the /usr/share/kernel-power-settings/ideal file elsewhere with a new name and just modify the max frequency to 1000 or 1100 for each new file. (ideal by default is 500-850mhz)

Right now, I have 3 buttons. 850, 1000 and 1100 and change as needed. when i reboot, it goes back to default of 250-600 but soon as it boots up, i change to ideal default of 500-850. =P

and to answer this thread's title question:
- yes, you can fix the cpu to 500Mhz. But why would you. ideal profile is 500-850. It never goes below 500Mhz already.

ossipena 2010-04-28 06:32

Re: Small app to keep processor at 500Mhz, possible?
 
Quote:

Originally Posted by jakiman (Post 629837)
yeah. well, what he said is nothing new. it's a well known possible downside to overclocking beyond manufacturer specification. but you also have to understand that chips are usually made with much higher tolerences. it's always guaranteed to run faster up to a certain point with negligeable problems. the fact that my one can run at 1.1ghz all day, watching movies, taking calls, browsing, gaming etc tells me it can handle quite a bit. I don't however run it at 1.1ghz all the time just in case as i cannot control the cooling level.

technically, it (cpu) will run cooler. not at 1+ghz but at 850mhz using ideal voltages, it should run cooler than stock voltage at 600mhz or have negigeable difference. Higher frequency does not mean it has to be worse for the chip. all depends.

anyways. considering Nokia said that even their stock kernel settings is not good for the N900 due to them overvolting, my undervolted cpu may make it last longer although either way, it should last us a good few years. And some other component will die before the cpu i'll bet.

thanks for proving my point that "device running cooler" is 110% speculation.

jakiman 2010-04-28 14:12

Re: Small app to keep processor at 500Mhz, possible?
 
Quote:

Originally Posted by ossipena (Post 630987)
thanks for proving my point that "device running cooler" is 110% speculation.

You keep repeating this invalid argument. Why?
http://talk.maemo.org/showpost.php?p...9&postcount=33

Where did I say the quoted "device running cooler" statement?
Anyways. It's not 110% speculation. It's scientific based theory.

matts76 2010-04-28 15:22

Re: Small app to keep processor at 500Mhz, possible?
 
i apologise for going off topic here but it really annoys me when people feel the need to rant about the negatives of oc'ing, if you dont believe its safe then simply dont do it, for people who do want to overclock there are warnings to acompany every method and we all know the risks, so realy what i'm saying is if oc'ing isnt for you then dont do it and leave the threads about it for the people who want to push the boundaries of what there device can do.

ndi 2010-04-28 16:05

Re: Small app to keep processor at 500Mhz, possible?
 
Because someone needs to offset the ever-believer that recommends everyone can take up their CPU to 4.5 GHz on air, he totally did it.

Nah, kidding. But if one hopes for the forum to be a source of information and not of speculation and hearsay, a discussion is necessary and specs, expertise and experience should have their way into the discussion.

There should be two sides to every story. Al least.

Also, don't mistake ranting for warning. Do what I do. Skip over the zealots and you'll be fine. Hell, it'll save you entire threads.

maemusr 2010-04-29 14:04

Re: Small app to keep processor at 500Mhz, possible?
 
I didn't think when i asked the question it would be so active a thread!
Anyway, I did find some information that might be useful to some of you. First off, i'm no expert so you geniuses take it in strides.
Why i found myself wanting more out of the original specs of the os?
Well i just hated anything that had to do with scrolling, either files or desktops, and, music playing, simple as that! Lockups and more lockups.
Ok the good, the os and hardware are tuneable, yeah! Thanks to open source!!
I found out in 2 very distinct way:
-processor speed, and
-response time
The first one being pure raw power in crunching data the other well just responding when i need it to!
Now the bad, and everybody knows, the battery.
The bad is more about me not having found the middle ground yet, but i'm close, in having a fast and responsive machine with reasonable battery life. My n900 is running with these specs:
-Titan 250 and 850 mhz most of the time. If i want to use debian i bring it up to 950
-the response time is 80 instead of 95, meaning the processing only needs to go to 80 percent to activate higher processing power instead of 95.
-and 150000 instead of 300000 to answer in time lag to the demand. Twice as fast.
I will link to the info I found on this site for this when i find it again!!
Knowing this, i decided to test it all out at different speeds and response time. Again, not over yet. I have scripts that just change these configs to match the requirements. If i intend to use the machine alot i just maxitout!! hihih But if it's just waiting for email, sms basically not using it, well then i bring it down to lowest possible settings to save the battery life. I've also noticed that playing with the response time did make a big difference for the battery. So right now i just change that value to 300000 and it's good enough until i can manage all this maybe with a script to detect screen or keyboard touch!? Well i figure that this is where the geniuses come in and help out in the making of such a thing!!

Some examples rooted,

echo 2500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 9000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq


echo 95 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold default
tried 75 eats battery,
as you go up it gets better.
echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate default
i like 1500000,
response time!!
I have scripts named accordingly to activate the different setinigs so it matches my needs. Wouln't it be great to have all this in a smart script, as I said before to know itself when to go all out and when not to.
By all means be careful with all that.
Enjoy!

maemusr 2010-04-29 14:10

Re: Small app to keep processor at 500Mhz, possible?
 
echo 95 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold default
echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate default

Note the word default is not part of the line !!!!!!

oh by the way, this is so useful.



#!/bin/sh

currfreq=`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`
idlefreq=`awk '{if ($2 > 0) print $1}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state | tail -n 1`
tis1=`awk '{sum += $2} END {print sum}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state`
tis2=`awk '$1 == "'"$idlefreq"'" {idle = $2} {sum += $2} END {print sum-idle}' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state`

echo -e "
SCRIPT FOR ANALYZING TIME_IN_STATE
By rooted (maemo.org)
Revision 6

The script is in active development.
Update your script to current revision from:
wiki.maemo.org/Overclocking


FREQUENCY\tUSED\t\tWHEN BUSY\n"
awk '
{if ($1 >= 1000000) printf ("%.0f MHz\t",$1/1000); else printf ("%.0f MHz\t\t",$1/1000)}
{if ($2 == 0) printf "unused"; else printf ("%.1f %\t\t",($2*100)/"'"$tis1"'")}
{if ($2 == 0 || $2/"'"$tis2"'" > 1) printf "\n"; else printf ("%.1f %\n",($2*100)/"'"$tis2"'")}
' /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state

echo -e "
Current frequency: $(($currfreq/1000)) MHz
Idle frequency: $(($idlefreq/1000)) MHz
Kernel: `uname -r`
kernel-maemo: `dpkg -l kernel* | awk '/kernel-maemo/ {print $3}'`
Uptime: `uptime | sed -e 's/.*p *//' -e 's/, l.*//' -e 's/ / /'`
Load: `uptime | sed 's/.*e: //'`
Boot reason: `cat /proc/bootreason`
Temperature: `cat /sys/class/power_supply/bq27200-0/temp` °C\n"

SCRIPT FOR ANALYZING TIME_IN_STATE
By rooted (maemo.org)
Revision 6

The script is in active development.
Update your script to current revision from:
wiki.maemo.org/Overclocking


FREQUENCY USED WHEN BUSY

1200 MHz unused
1100 MHz unused
1000 MHz unused
950 MHz unused
900 MHz unused
850 MHz unused
810 MHz 1.6 % 56.7 %
750 MHz 0.0 % 0.8 %
700 MHz 0.1 % 1.9 %
600 MHz 0.0 % 1.5 %
550 MHz 0.0 % 1.2 %
500 MHz 1.0 % 37.8 %
250 MHz 97.3 %
125 MHz unused

Current frequency: 250 MHz
Idle frequency: 250 MHz
Kernel: 2.6.28.10maemo-ulv-omap1
kernel-maemo: 2.6.28-maemo21
Uptime: 2 days, 2:27
Load: 0.11, 0.04, 0.01
Boot reason: pwr_key
Temperature: 25 °C

bald.eagle.one 2010-06-25 06:40

Re: Small app to keep processor at 500Mhz, possible?
 
could someone post the script to use with desktop command execution widget to load ideal overclocking settings please


All times are GMT. The time now is 21:14.

vBulletin® Version 3.8.8