Battery saving... a new trend

What features/apps/bugfixes needed in a future Puppy
Post Reply
Message
Author
Atle
Posts: 596
Joined: Wed 19 Nov 2008, 12:38
Location: Oslo, Norway
Contact:

Battery saving... a new trend

#1 Post by Atle »

Just noted that there is a lot of talk about web browsers and battery savings.

If I am not wrong Puppy should be the perfect platform to have a official release where this is a issue and that we ALL work together to achieve better performance and less usage of power.

Now better performance might be hard to get as its already beyond great, but battery saving seems to be trending and why not jump on the bandwagon?

learnhow2code

Re: Battery saving... a new trend

#2 Post by learnhow2code »

what would you recommend is done first?

personally i think its a good idea, but i dont know if its "new" or if the measures necessary to make a significant difference really work with any measure puppy doesnt already take.

here is a distro dedicated specifically to what youre talking about: http://www.planetwatt.com/newforum/ and here are their older forums: http://www.planetwatt.com/forums

the same app being idle and under "regular use" is measured in ways that are arguably useless or (perhaps unintentionally) misleading, even in the best of cases.

again, fine idea in general. to get really good feedback, youd want to point out where to start so that it can be weighed against other possibly conflicting goals (like userfriendliness or even speed.)

Atle
Posts: 596
Joined: Wed 19 Nov 2008, 12:38
Location: Oslo, Norway
Contact:

#3 Post by Atle »

My first recommendation is that we discuss the subject and then hope for some of the gurus to pop by :lol:

So we basically lean back and hope...

learnhow2code

#4 Post by learnhow2code »

Atle wrote:My first recommendation is that we discuss the subject
here is a possible flowchart:

Code: Select all

  -> * find out what uses the most electricity  \
 /                                              _\|
|    * if it can be replaced or reconfigured, do that  \
|                                                      _\|
|    * go to the first step and try the next most wasteful item --
 \_______________________________________________________________/
the problem is the replacing and reconfiguring part. it opens up giant debates on what is worth it and what isnt.

heres an example you can try:

run your computer on battery for one hour without x. note the percentage/time on battery. charge to full, then run your computer for one hour with x. compare the percentage/time on battery. if percentages or times are significantly different, consider removing x from your setup.

but you want x? so probably this comes down to making lists of things in terms of which packages use more or less cpu/ram, which turns out to be a list of options of what people can choose to uninstall/replace on their own setup.

they have that. then, someone packages it into a "lite pup" or something. try a lite pup, see if it uses the battery less.

just thoughts on the practicalities of this. but maybe theres a dev here with a practical or easy way to do it.

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#5 Post by slavvo67 »

I have the solution!! Run it without the screen on! Would save a ton of battery life, just like my cellphone!

:lol:

Seriously, a good idea to identify items soaking up the battery life!

learnhow2code

#6 Post by learnhow2code »

slavvo67 wrote:I have the solution!!
http://www.fourwinds10.net/siterun_data ... 1308928213

Seriously, a good idea to identify items soaking up the battery life!
i agree. its gotta be the browser though. turn off javascript, see how that goes. it sounds sarcastic probably-- but really, not kidding. maybe we can whip a monitor that in the course of say, 20 minutes of use, figures out how fast say the output of "acpi" charge percentage changes.

however, accuracy will be an issue because one task will warm up the cpu and spin the fans up, then the fans will slow down after but the cpu wont be the same temperature. when youre figuring this stuff out, what this means that its not only what task you do, but in what order, if theyre one after the other.

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

re-nicing

#7 Post by mcewanw »

learnhow2code wrote: but you want x? so probably this comes down to making lists of things in terms of which packages use more or less cpu
Hi Atle, learnhow2code, and slavvo67,

I'm pretty sure the key factor is indeed how much cpu the app's processes use is the determining factor.

If system performance is already 'great' enough, then I would suggest trading performance against greedy process priority (so greedy process is actively running less often). In other words using the nice command to start the app/process up (or renice if already running) - would certainly result in less cpu and more idle time and thus less power being consumed (at the expense of responsiveness).

Would be nice to have a little app to allow easy re-nicing of processes... actually, there is such an app readily available: if you install Lxtask program you can use it to re-nice running processes (via right-click menu) - I use it a lot for testing purposes (checking most resource hungry processes/killing processes) on DebianDog, MintPup and XenialDog. Perhaps there is already a Puppy app that can do the same (I haven't checked its process viewing app for a while so can't remember), or simply install Lxtask onto your Pup.

Nice (pun intended) using that to play around with power usage experiments.

I haven't tried re-nicing X itself, but will be interesting to try. Web browser probably next main candidate (and/or flash, if you are using it).

EDIT: I just tried using lxtask for re-nicing processes in XenialDog, but the values didn't seem to stick - I'll have to look into that. The alternative will be to try renice command at the commandline or 'top' command (with keypress r), or htop (with keypress F7/F8):

http://code.tutsplus.com/tutorials/how- ... -cms-25030

EDIT2: More generally ondemand cpu speed-stepping is helpful (slows down cpu clock speed when not busy) - most Pups have that by default I think.

EDIT3: Actually, I'm not sure if giving a process lower priority will have an effect on system power usage. It should certainly be useful if, for example, you want to playback a video more smoothly by giving other hungry processes less priority and the video playing processes higher priority. But I have read (see link below) that Linux scheduler can ignore process nice values, though I don't know in what circumstances - should read up more about it...

http://bencane.com/2013/09/09/setting-p ... nd-renice/

EDIT4: Still reading to try and find why nice value apparently having little or no effect in top report. Might be to do with:

http://forums.fedoraforum.org/archive/i ... 98477.html

http://unix.stackexchange.com/questions ... ed-if-star

If anyone discovers how to get 'nice' 'obeyed' consistenly, please let me know!

William
github mcewanw

learnhow2code

Re: re-nicing

#8 Post by learnhow2code »

mcewanw wrote:If anyone discovers how to get 'nice' 'obeyed' consistenly, please let me know!
you had the right idea i think, with ondemand. you can probably cpufreq the whole thing further down. but if by "nice" you mean "in a way that is both reliable and per application" then no, sorry.

Post Reply