Performance and Memory Questions


TylerAW

Member
Joined
Aug 30, 2010
Messages
357
I had a few questions so I could stop tinkering with my Open Pandora so much and juts enjoy it (been doing it for the last three days, not that it hasn't been fun and all... but I am now using up too much of my time for my liking)

So I noticed when USB Host is turned on wit ha Flash Drive plugged in, that uses up 20MBs of memory. (According to the Pandora System Info App). When running emulators, programs or anything else, is memory precious on the Open Pandora? What I mean is, will those emulators and programs empty memory out when needed? Or if I am say using up 20MBs that I don't need to use, am I hindering the performance of those apps? I can't check everything to see if this is true, I just know when the flash drive was unplugged I may have gotten some extra frames in the Virtual Boy emulator (not that it mattered much, even @ 1ghz I could sometimes get 40FPS but usually that wasn't enough to be enjoyable). I just want to know this. I can't be sure but it sort of seems like programs are not being emptied from memory sometimes, is that a Linux thing?

I had more questions about memory though. If memory is in fact precious ( needed more than ever I mean ) is there anything I can do to have as much free memory as possible? Run Mini Menu? Other OS's or disable things I am don't need to use from the main operating system?

I also had a question about the OPP levels. If I am running it at 5, does it become unstable when running at lower clock speeds (as low as 600mhz)? Would running @ 5 + 600mhz work? Would that still decrease the lifespan of the hardware?

I should note I have been reading the Wiki for answers, but I just wanted to be clear about things. I wish there was a live chat somewhere, so I could talk to Pandora owners  :eek:  , but for now I have these forums.

Running CC Unit~
 
Last edited by a moderator:
I also had a question about the OPP levels. If I am running it at 5, does it become unstable when running at lower clock speeds (as low as 600mhz)? Would running @ 5 + 600mhz work? Would that still decrease the lifespan of the hardware?
Those are voltage levels. If you set it higher it applies more voltage to the processor (reducing the lifespan of the hardware, but probably not by much) and possibly more importantly uses more energy.You always want to be at the lowest voltage level possible for a certain frequency. You need to try out how low you can go before it becomes unstable.
 
I also had a question about the OPP levels. If I am running it at 5, does it become unstable when running at lower clock speeds (as low as 600mhz)? Would running @ 5 + 600mhz work? Would that still decrease the lifespan of the hardware?
Those are voltage levels. If you set it higher it applies more voltage to the processor (reducing the lifespan of the hardware, but probably not by much) and possibly more importantly uses more energy.
You always want to be at the lowest voltage level possible for a certain frequency. You need to try out how low you can go before it becomes unstable.
Well I know at 5 I can go 1ghz which is nice. Did you mean how low I can set the processor speed to while running at a higher voltage? Or did you mean testing low voltage with high processor speeds?
 
Last edited by a moderator:
I had more questions about memory though. If memory is in fact precious ( needed more than ever I mean ) is there anything I can do to have as much free memory as possible? Run Mini Menu? Other OS's or disable things I am don't need to use from the main operating system?
Theoretically that depends on the emulator, but only Drastic comes to my mind in terms of memory requirements that are noteworthy (but afaik only if you load compressed roms as they are unpacked in memory).


Using MiniMenu instead of the xfce desktop can give you a little extra speed, as xfce is more resource heavy than MiniMenu (and what was one of the reasons for having MiniMenu in the first place), as it has a bigger memory footprint and runs more services that need some cpu time now and then.

I also had a question about the OPP levels. If I am running it at 5, does it become unstable when running at lower clock speeds (as low as 600mhz)? Would running @ 5 + 600mhz work? Would that still decrease the lifespan of the hardware?
You don't need to set the clock speed low (at least if you are not running on a very old version of the OS - pre Super Zaxxon), as the SoC set the system clock depending on the workload itself.

I wish there was a live chat somewhere, so I could talk to Pandora owners  :eek:  , but for now I have these forums.
well, no live chat as it is offered by certain companies, but you could use the irc-channel, if you want more "direct" contact: #openpandora, on freenode (I think)

Or did you mean testing low voltage with high processor speeds?
this
 
Last edited by a moderator:
I had more questions about memory though. If memory is in fact precious ( needed more than ever I mean ) is there anything I can do to have as much free memory as possible? Run Mini Menu? Other OS's or disable things I am don't need to use from the main operating system?
Theoretically that depends on the emulator, but only Drastic comes to my mind in terms of memory requirements that are noteworthy (but afaik only if you load compressed roms as they are unpacked in memory).
Using MiniMenu instead of the xfce desktop can give you a little extra speed, as xfce is more resource heavy than MiniMenu (and what was one of the reasons for having MiniMenu in the first place), as it has a bigger memory footprint and runs more services that need some cpu time now and then.

I also had a question about the OPP levels. If I am running it at 5, does it become unstable when running at lower clock speeds (as low as 600mhz)? Would running @ 5 + 600mhz work? Would that still decrease the lifespan of the hardware?
You don't need to set the clock speed low (at least if you are not running on a very old version of the OS - pre Super Zaxxon), as the SoC set the system clock depending on the workload itself.

I wish there was a live chat somewhere, so I could talk to Pandora owners  :eek:  , but for now I have these forums.
well, no live chat as it is offered by certain companies, but you could use the irc-channel, if you want more "direct" contact: #openpandora, on freenode (I think)
Or did you mean testing low voltage with high processor speeds?
this
That is rather helpful, thank you. So if a program is running that doesn't need 1ghz (but you have the CPU set to that) then it underclocks it for you? Do all programs do this? Can it overclock depending on the workload?
 
That is rather helpful, thank you. So if a program is running that doesn't need 1ghz (but you have the CPU set to that) then it underclocks it for you? Do all programs do this? Can it overclock depending on the workload?
This is system wide and not program specific. The parameters you can set on your Pandora only set the boundaries in which the cpu governeur can act "as he pleases" (= loewering or increasing the clock speed).
 
Last edited by a moderator:
In the default Pandora settings, the cpu governor does not actually dynamically change the clock speed (since it takes some time to switch frequency and as a result some emulators may get some lag/hiccups). But what it does do, is put the cpu to sleep when it is doing nothing. This is way more important for battery consumption (and lifespan I guess) than the frequency: when it is sleeping, it's basically as if it's powered down.
 
So what happens is that for a few milliseconds, the cpu is working at 1GHz (or whatever clock speed you set it to), then it sees that all processes are idle (e.g. waiting for input) and shuts down for a few milliseconds, then gets woken up by some interrupt, works again for a few milliseconds, shuts back down, etc.
You can see the amount of sleep your cpu gets in System Info: the full picture is a bit more complicated than just "awake" and "sleep", but basically C0 is "fully awake" and C5 is "fully asleep", and there are some intermediate states in between. You'll see that a lot of time is spent in C5.
 
You can get slightly better battery life by downclocking to 500-600 MHz, because that's the optimal point on the perf/W curve. But as soon as you are using other things than the cpu (for example the screen!), it's probably best to clock higher (e.g. 800MHz on a Rebirth unit, 1 or 1.1GHz on a new unit) because faster task completion saves more than better cpu perf/W.
 
tl;dr: No need to bother with underclocking. Also no need to bother with undervolting, since at the normal clockspeeds, the recommended OPP setting is the maximum one anyway. It doesn't have much impact on power consumption (idle is still idle), but it does have a big impact on stability.
 

I had more questions about memory though. If memory is in fact precious ( needed more than ever I mean ) is there anything I can do to have as much free memory as possible? Run Mini Menu? Other OS's or disable things I am don't need to use from the main operating system?
Memory is usually not something you should worry about. You will not get more FPS if you have more free memory. Most emulators need little memory since they're emulating old devices which have little memory, and typically emulators have almost no space overhead (only time overhead). You can check their memory consumption by keeping System Info open, making a log file and plotting it.
 
The only memory-intensive things are some more recent games originally designed for desktop PCs, web browsing (depending on the kind of website), and some compile jobs.

To maximize free memory it's best to switch to OpenBox or to use MiniMenu. The difference is not huge though.
 
In the default Pandora settings, the cpu governor does not actually dynamically change the clock speed (since it takes some time to switch frequency and as a result some emulators may get some lag/hiccups). But what it does do, is put the cpu to sleep when it is doing nothing. This is way more important for battery consumption (and lifespan I guess) than the frequency: when it is sleeping, it's basically as if it's powered down.


So what happens is that for a few milliseconds, the cpu is working at 1GHz (or whatever clock speed you set it to), then it sees that all processes are idle (e.g. waiting for input) and shuts down for a few milliseconds, then gets woken up by some interrupt, works again for a few milliseconds, shuts back down, etc.


You can see the amount of sleep your cpu gets in System Info: the full picture is a bit more complicated than just "awake" and "sleep", but basically C0 is "fully awake" and C5 is "fully asleep", and there are some intermediate states in between. You'll see that a lot of time is spent in C5.


You can get slightly better battery life by downclocking to 500-600 MHz, because that's the optimal point on the perf/W curve. But as soon as you are using other things than the cpu (for example the screen!), it's probably best to clock higher (e.g. 800MHz on a Rebirth unit, 1 or 1.1GHz on a new unit) because faster task completion saves more than better cpu perf/W.


tl;dr: No need to bother with underclocking. Also no need to bother with undervolting, since at the normal clockspeeds, the recommended OPP setting is the maximum one anyway. It doesn't have much impact on power consumption (idle is still idle), but it does have a big impact on stability.
arg, thanks for correcting the bullocks I wrote, I'm silently stealing myself out of this now :ph34r:
 
I also had a question about the OPP levels. If I am running it at 5, does it become unstable when running at lower clock speeds (as low as 600mhz)? Would running @ 5 + 600mhz work? Would that still decrease the lifespan of the hardware?
Those are voltage levels. If you set it higher it applies more voltage to the processor (reducing the lifespan of the hardware, but probably not by much) and possibly more importantly uses more energy.You always want to be at the lowest voltage level possible for a certain frequency. You need to try out how low you can go before it becomes unstable.
Well I know at 5 I can go 1ghz which is nice. Did you mean how low I can set the processor speed to while running at a higher voltage? Or did you mean testing low voltage with high processor speeds?
When you are running at 600Mhz the only difference between level 3 and 5 is that 5 empties your battery faster (don't know how much, but a bit) and strains the processor more.
Just consider those two things:

1. The higher you set that OPP level, the worse it is for your processor and the faster your battery is empty. If you set it too high the processor fries (i.e. permanently and irreparably broken), but I think you can't set it that high on the Pandora.

2. But the higher the OPP level the higher is the maximum speed at which the processor still runs stable. There is no minimum speed (in practice, I think it's 125Mhz on the Pandora). When the clock speed is too high for the OPP level you are at, then the some stuff randomly fails (stuff just doesn't work as you would expect, or the Pandora could crash), you might not even notice for a long time. This doesn't damage the hardware, it might just lose you some data when it happens at the wrong time. At which clock speeds that happens is different for each individual processor. There is some tool around which sets a high clock speed at the beginning, does tests until one fails (i.e. processor screws up) and then repeats the same for a lower clock speed. When it doesn't fail for a few hours, then it's current clock speed can be considered stable.

Now figure.
 
When you are running at 600Mhz the only difference between level 3 and 5 is that 5 empties your battery faster (don't know how much, but a bit) and strains the processor more.
Nearly. but bear in mind that AFAIK you can't set your OPP level, only your max level.  So if the system thinks OPP 3 is stable for 600MHz then it'll be at OPP 3 or lower regardless of your setting.  Your setting only comes into effect at the top end, say you set your clock to a speed where the system thinks you need OPP 4 but your max is OPP 3, and it'll try to run that speed at OPP 3 and most likely crash if you try to do certain things on it.
 
When you are running at 600Mhz the only difference between level 3 and 5 is that 5 empties your battery faster (don't know how much, but a bit) and strains the processor more.
Nearly. but bear in mind that AFAIK you can't set your OPP level, only your max level.  So if the system thinks OPP 3 is stable for 600MHz then it'll be at OPP 3 or lower regardless of your setting.  Your setting only comes into effect at the top end, say you set your clock to a speed where the system thinks you need OPP 4 but your max is OPP 3, and it'll try to run that speed at OPP 3 and most likely crash if you try to do certain things on it.
So yeah, actually: No difference. But I'm pretty sure you can adjust those settings somewhere.
 
So yeah, actually: No difference. But I'm pretty sure you can adjust those settings somewhere.
Not easily though, not without having some idea how to manually set these things and it's not something that can be done via any graphical interface.
Levi is correct, the OPP levels are set by what frequency you decide to use. the OPP level that you can set is the maximum allowed.
 
When you are running at 600Mhz the only difference between level 3 and 5 is that 5 empties your battery faster (don't know how much, but a bit) and strains the processor more.
Nearly. but bear in mind that AFAIK you can't set your OPP level, only your max level.  So if the system thinks OPP 3 is stable for 600MHz then it'll be at OPP 3 or lower regardless of your setting.  Your setting only comes into effect at the top end, say you set your clock to a speed where the system thinks you need OPP 4 but your max is OPP 3, and it'll try to run that speed at OPP 3 and most likely crash if you try to do certain things on it.
See that one makes the most sense to me, I guess that's why it's worded that way in the settings menu.

So yeah, actually: No difference. But I'm pretty sure you can adjust those settings somewhere.
Not easily though, not without having some idea how to manually set these things and it's not something that can be done via any graphical interface.

Levi is correct, the OPP levels are set by what frequency you decide to use. the OPP level that you can set is the maximum allowed.
So if I set it to 5 but my CPU is only set to 600mhz, then it shouldn't set the voltage to 5 since that is not needed?

In this theoretically scenario, would it also drain more battery? Or would that not matter because it's set to 3 and has no need to go up to 5?
 
So if I set it to 5 but my CPU is only set to 600mhz, then it shouldn't set the voltage to 5 since that is not needed?
That is correct, every time you change the cpu frequency it outputs the current OPP level to the system log, so if you need to prove it to yourself just run.

Code:
dmesg
in the terminal after changing the frequency.
 
Last edited by a moderator:
So if I set it to 5 but my CPU is only set to 600mhz, then it shouldn't set the voltage to 5 since that is not needed?
That is correct, every time you change the cpu frequency it outputs the current OPP level to the system log, so if you need to prove it to yourself just run.


dmesg
in the terminal after changing the frequency.
Okay, so at OPP3 it got up to 850mhz and anything past that the CPU Test PND gave me errors so I stopped it.

I know you all explained this to me, but this is what is confusing. So I have the Max OPP set to 5 and current speed set to 600 (max at 1000) then if I am running a demanding application, will it overclock? I just noticed when setting the default maximum speed to say 850mhz and then I open System Info it shows it running at 850mhz. It does show Deep Sleep going at around most of the time though (82%). If an app does not need that 850 then will it underclock? Should I even care though if it has this C5 Sleep mode to keep the CPU in check, so to speak?
 
So I have the Max OPP set to 5 and current speed set to 600 (max at 1000) then if I am running a demanding application, will it overclock?
No you have to manually set it to a higher frequency.. 

Those min and max settings only change the range you can set the CPU frequency in that CPU frequency tool and that is it.   
 
I know you all explained this to me, but this is what is confusing. So I have the Max OPP set to 5 and current speed set to 600 (max at 1000) then if I am running a demanding application, will it overclock? I just noticed when setting the default maximum speed to say 850mhz and then I open System Info it shows it running at 850mhz. It does show Deep Sleep going at around most of the time though (82%). If an app does not need that 850 then will it underclock? Should I even care though if it has this C5 Sleep mode to keep the CPU in check, so to speak?
Yes, it is all quite confusing, especially as I think at lot of this stuff has changed and been refined over the years - the configurable OPP used to be *the* OPP, but now it's the maximum OPP, and I'm not sure all the help text has been switched TBH.

However, as _wb_ explained above, the system never underclocks at all - it just runs at the setting you set it at. It just uses sleep level to extend the battery life (and your CPU's life), so it's fine that it's doing that 82% of the time when you ran system info. You could drop the CPU clock to about a fifth of the current rate and still run that, but I'm not sure that there's any benefit to doing so. I know that Intel and others run variable clocks to reduce heat (not an issue here) and extend battery life in laptops, but I don't know the pros and cons of the different approaches to be honest, and I trust _wb_ that this approach works better for us.


To be honest, with all the optimisations that have been done, there's not really much reason to under-OPP things any more, and little reason to underclock once you've found your maximum clock. I only run my GHz at 1000MHz though, because I found out by accident that at 1.2GHz NEON operations got a bit flakey, which I only found when DraStic, the DS emulator, was released. Notaz's CPU tester has never given me a concrete figure, so I just run it at 1000Mhz cos that's more than fast enough for most things I want to do, and I don't know what errors will be introduced as I approach 1.2Ghz in different uses.


Edit: Just to be clear, it never overclocks at all - you tell it a speed to run at and it runs at that speed, simple. It might end up sleeping much of the time because actually it doesn't need to run that fast, which you can think of like underclocking, but it'll never overclock from where you set it.
 
Last edited by a moderator:
I know you all explained this to me, but this is what is confusing. So I have the Max OPP set to 5 and current speed set to 600 (max at 1000) then if I am running a demanding application, will it overclock? I just noticed when setting the default maximum speed to say 850mhz and then I open System Info it shows it running at 850mhz. It does show Deep Sleep going at around most of the time though (82%). If an app does not need that 850 then will it underclock? Should I even care though if it has this C5 Sleep mode to keep the CPU in check, so to speak?
Yes, it is all quite confusing, especially as I think at lot of this stuff has changed and been refined over the years - the configurable OPP used to be *the* OPP, but now it's the maximum OPP, and I'm not sure all the help text has been switched TBH.

However, as _wb_ explained above, the system never underclocks at all - it just runs at the setting you set it at. It just uses sleep level to extend the battery life (and your CPU's life), so it's fine that it's doing that 82% of the time when you ran system info. You could drop the CPU clock to about a fifth of the current rate and still run that, but I'm not sure that there's any benefit to doing so. I know that Intel and others run variable clocks to reduce heat (not an issue here) and extend battery life in laptops, but I don't know the pros and cons of the different approaches to be honest, and I trust _wb_ that this approach works better for us.


To be honest, with all the optimisations that have been done, there's not really much reason to under-OPP things any more, and little reason to underclock once you've found your maximum clock. I only run my GHz at 1000MHz though, because I found out by accident that at 1.2GHz NEON operations got a bit flakey, which I only found when DraStic, the DS emulator, was released. Notaz's CPU tester has never given me a concrete figure, so I just run it at 1000Mhz cos that's more than fast enough for most things I want to do, and I don't know what errors will be introduced as I approach 1.2Ghz in different uses.


Edit: Just to be clear, it never overclocks at all - you tell it a speed to run at and it runs at that speed, simple. It might end up sleeping much of the time because actually it doesn't need to run that fast, which you can think of like underclocking, but it'll never overclock from where you set it.
Okay, more clear. Do you think I would be safe to set max OPP to 5 and speed to 1000?

When "sleeping" it uses less energy anyway. It kind of sounds like there wouldn't be much of a difference (after all of these  optimizations you mentioned) from setting it to OPP3 @ 600 and OPP5 @ 1000 for my CC unit in terms of how much battery life I will have (if I was running the same set of applications in either instance)
 
Last edited by a moderator:
So if I set it to 5 but my CPU is only set to 600mhz, then it shouldn't set the voltage to 5 since that is not needed?
That is correct, every time you change the cpu frequency it outputs the current OPP level to the system log, so if you need to prove it to yourself just run.


dmesg
in the terminal after changing the frequency.
Or just check with System Info ;) . It shows two OPP numbers: e.g. on my 1GHz unit it now says "1.000 GHz (OPP4/4)" which means the clock speed is 1GHz, the current OPP level is 4, and the max OPP level is 4. If I downclock it to 800MHz -- which you can do directly in System Info by the way, using the < and > keys (hold L1 or R1 for bigger steps) -- it shows "800 Mhz (OPP3/4)". If I downclock further, I get "600 Mhz (OPP2/4)" and "300 MHz (OPP1/4)".

If you want to change the cpu governor, you can do that by doing, as root, echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

I should update System Info to then show both the actual clock speed and the maximum one, since with the default cpu governor, those two are always the same and System Info only shows the maximum one. Maybe I should update System Info to let you see and easily toggle the cpu governor.
 
Back
Top