You are not logged in.

#1 2010-11-18 03:54:40

Meskarune
Member
From: Helsinki, Finland
Registered: 2009-03-21
Posts: 361
Website

Lightweight, not so lightweight?

I upgraded the ram on my netbook to 2GB and went from 8 hours of battery life to 7. So in an attemp to futher decrease my power usage, and thus increase battery life, I started trying out more lightweight programs. On my computer at least, midori and empathy use far less resources than uzbl and centerim. So I'm wondering.... is the memory a program uses more important than CPU when it comes to battery life, and also what do other laptop users use to increase the battery life of their computers? (I'm already using hard drive monting and cpu scaling, etc so I'm interested in lightweight programs) It seems a little strange to me that many terminal programs use more resources than GUI ones do.


Homepage  | Arch Linux Women | Arch Linux Classroom
Acer Aspire E5-575G-53VG:
Intel Dual-Core i5-6200U 2.3 GHz; Skylake rev3 | 8GB DDR4 ram | Intel HD Graphics 520 + NVIDIA GeForce 940MX
Qualcomm Atheros QCA9377 802.11ac | Realtek RTL8111/8168/8411 Gigabit Ethernet Controller

Offline

#2 2010-11-18 05:01:29

pseudonomous
Member
Registered: 2008-04-23
Posts: 349

Re: Lightweight, not so lightweight?

I'm pretty sure that dram consumes the same amount of power whether it is in active use by a program or not; power draw is necessary just to keep state; however, larger capacity memory will tend to draw more power than lower capacity memory.

Edit: Further research indicates that some dram is capable of entering low energy states when not in active use, apparently there's some debate as to their effectiveness.

Also ... I've been thinking.  Even if RAM draws more energy when paging in/out ... how can the RAM be paging in/out if the CPU isn't doing some sort of processing?  So RAM intensive activities pretty much must also be to some degree CPU intensive as well, right?  Well, I'm probably wrong.  I probably shouldn't have even bothered replying.  But I suppose it's too late for that, now.

Last edited by pseudonomous (2010-11-18 05:22:23)

Offline

#3 2010-11-18 05:49:34

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,333

Re: Lightweight, not so lightweight?

I find the killers are CPU Load, Backlight Brightness and DVD/CD drives -- pretty much in that order.  Also, turn off Bluetooth / 802.11 Wireless (if practical)

I agree with pseudonomous -- RAM usage should not be an issue.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2010-11-18 06:01:18

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Lightweight, not so lightweight?

@pseudonomous: Even if that were true, Linux tries to use RAM to the max since idle RAM is wasted RAM. In any event, I believe you're not going to get any noticable gains from reduced RAM usage.

@Meskurne: I'm not surprised with midori's resource usage being better than uzbl, but I'd expect centerim to handle resources better than empathy, despite never having used either. I've only found MOC to be a problem with system resources compared to some other media players. What other CLI apps have you found to be heavy compared to their gui counterparts?

Offline

#5 2010-11-18 06:09:49

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: Lightweight, not so lightweight?

Berticus wrote:

@Meskurne: I'm not surprised with midori's resource usage being better than uzbl, but I'd expect centerim to handle resources better than empathy, despite never having used either.

Care to explain why?

Offline

#6 2010-11-18 14:53:16

Hide
Member
From: Castalia
Registered: 2007-02-02
Posts: 368

Re: Lightweight, not so lightweight?

Berticus wrote:

I've only found MOC to be a problem with system resources compared to some other media players.

Care to elaborate? smile

Offline

#7 2010-11-18 14:54:29

Meskarune
Member
From: Helsinki, Finland
Registered: 2009-03-21
Posts: 361
Website

Re: Lightweight, not so lightweight?

ewaller wrote:

I find the killers are CPU Load, Backlight Brightness and DVD/CD drives -- pretty much in that order.  Also, turn off Bluetooth / 802.11 Wireless (if practical)

I agree with pseudonomous -- RAM usage should not be an issue.

I've already done all the hardware tweaks I can do to make the battery last. Which is why I'm taking a look at the programs I use everyday and trying to find "lighterweight" alternatives that don't drain the battery as much. smile
I'm trying to have the longest battery life possible while still using all the applications and not losing functionality. (I actively use IM, Browser, a music player and a notes/word processing program, wicd, alunn, scim, and conky run in BG)

And I guess I thought it was funny/interesting that some CLI programs use up the battery faster than GUI ones, since that seems a little counter-intuitive.

I should mention that my battery is only supposed to have 6 hours of constant use, and already getting it over that is pretty sweet.

I lost an hour after upgrading my ram, and even recovering 30 min. would be awesome.


Homepage  | Arch Linux Women | Arch Linux Classroom
Acer Aspire E5-575G-53VG:
Intel Dual-Core i5-6200U 2.3 GHz; Skylake rev3 | 8GB DDR4 ram | Intel HD Graphics 520 + NVIDIA GeForce 940MX
Qualcomm Atheros QCA9377 802.11ac | Realtek RTL8111/8168/8411 Gigabit Ethernet Controller

Offline

#8 2010-11-18 14:57:49

Meskarune
Member
From: Helsinki, Finland
Registered: 2009-03-21
Posts: 361
Website

Re: Lightweight, not so lightweight?

Also, if CPU use is the major factor in how much a program drains battery, then does anyone has recomendations for programs with very low CPU use? smile

Another question. Are programs running as daemons inherantly more battery draining than programs that are not? (like mpd vs. deadbeef or wicd vs. another network manager)

This disscussion is really interesting to me.


Homepage  | Arch Linux Women | Arch Linux Classroom
Acer Aspire E5-575G-53VG:
Intel Dual-Core i5-6200U 2.3 GHz; Skylake rev3 | 8GB DDR4 ram | Intel HD Graphics 520 + NVIDIA GeForce 940MX
Qualcomm Atheros QCA9377 802.11ac | Realtek RTL8111/8168/8411 Gigabit Ethernet Controller

Offline

#9 2010-11-18 15:50:17

Gusar
Member
Registered: 2009-08-25
Posts: 3,606

Re: Lightweight, not so lightweight?

I can imagine wicd being a drain. You could try netcfg. And conky definitely taxes the CPU. It's influence on battery life is probably very minimal, but if you really want to squeeze absolutely everything out of the battery...

Oh, what does powertop say are the biggest offenders? I've noticed python being one (emesene in my case), that's why I mentioned wicd.

Offline

#10 2010-11-18 16:18:03

manmachine
Member
From: Athens
Registered: 2010-10-28
Posts: 62
Website

Re: Lightweight, not so lightweight?

Only utilities like top/powertop will tell you which programs tax the cpu most. not their size, not whether they are gui apps or console apps, and often not the language they are programmed in. It's all about what a program does and how. It's pretty trivial to write a 5-liner loop in any language that will bring your cpu to its knees and not output anything, anywhere.

Conky is more cpu-intensive than compiz and Xorg!
iotop is more cpu-intensive than compiz and it's a console app like top (written in python though).

It's perfectly conceivable, that you could have something like Photoshop loaded in memory just sitting there while some other small app doing it's thing in the background wasted much more cpu power...

Edit:
Just try different apps and see how they behave. Also:
http://www.lesswatts.org/
may be of interest smile

Last edited by manmachine (2010-11-18 16:41:28)

Offline

#11 2010-11-18 17:33:31

scio
Member
From: Buffalo, NY
Registered: 2008-08-05
Posts: 366

Re: Lightweight, not so lightweight?

This is something I had been playing with for quite a while.  I started with awesomewm and netcfg thinking it would buy me the best battery life.  Granted, it did, but it only bought me about 9.5 hours instead of 9 running full blown KDE.  powertop is your friend as well as disabling hardware in the BIOS.  wireless, bluetooth and ethernet are the largest hogs that can be turned off based on situation.  Follow that with keeping the backlight as low as possible for the best battery life.

So it all comes down to how much you want to try to tweak.  I like awesomewm, but I like the ease of KDE more and to me it's worth the ~20min less of battery.  Of course my battery lasts for 8-9 hours so it's a small percentage.

Offline

#12 2010-11-18 18:58:34

Meskarune
Member
From: Helsinki, Finland
Registered: 2009-03-21
Posts: 361
Website

Re: Lightweight, not so lightweight?

Killing conky got my battery life up to 7 hours and 50 min. LOL Guess I'll just use it when I'm plugged in.

Powertop only listed this as a problem:
35.9% (600.6)   [kernel scheduler] Load balancing tick

But like I've said before, I've already done all the hardware tweaks I can do. (that includes turning off unused hardware, using relatime, backlight, etc, etc)

How well does netcfg handle roaming? I am constantly changing wifi networks and using wicd was the easiest solution for me. I want to save battery life, but not at the expense of functionality. smile

My cpu use hovers around 10% and the biggest user is slim.auth (the login manager) at 7-8%. I guess I don't really NEED a login manager, but it can be nice to have. All other programs are like, 1% or less cpu use. BUT when I look at ram usage;

midori
empathy
tomboy
sonata
alunn
wicd
thunar

My ram usage is ussually around 50%

One of the reasons why I initially asked about ram usage was because my cpu usage was negligible compared to ram, and often closing a program that uses a lot of ram increases battery life on my netbook substantially.

I AM trying to find a better / lighterweight notes system besides tomboy for class notes, but so far I haven't found anything as useful. I have over 200 notes in 6 notebooks and need the ability to sync notes, make notes quickly, search notes, and type in japanese.  Online note applications suck up system resources, so I really need a desktop solution.

I'm currently using evince to have my pdf textbooks open for class, but I'm sure there is something more lightweight. I need to have pdf bookmarks available and a pdf reader that can handle 300+ pages and also can invert the colors so I'm not staring at a white screen.

Thanks for the link to lesswatts. big_smile


Homepage  | Arch Linux Women | Arch Linux Classroom
Acer Aspire E5-575G-53VG:
Intel Dual-Core i5-6200U 2.3 GHz; Skylake rev3 | 8GB DDR4 ram | Intel HD Graphics 520 + NVIDIA GeForce 940MX
Qualcomm Atheros QCA9377 802.11ac | Realtek RTL8111/8168/8411 Gigabit Ethernet Controller

Offline

#13 2010-11-18 19:11:01

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,584

Re: Lightweight, not so lightweight?

Meskarune wrote:

Killing conky got my battery life up to 7 hours and 50 min. LOL Guess I'll just use it when I'm plugged in.

If you still want to use conky while on battery, you can set this variable update_interval_on_battery in your script to increase the delay between updates.  I have mine set to 5

Offline

#14 2010-11-18 19:17:56

Gusar
Member
Registered: 2009-08-25
Posts: 3,606

Re: Lightweight, not so lightweight?

Meskarune wrote:

Powertop only listed this as a problem:
35.9% (600.6)   [kernel scheduler] Load balancing tick

600, WTF? That's a lot. I mean *really* a lot. There's something waking up your CPU a lot or your kernel is not configured quite right.

I have 50 altogether currently and that's with Firefox running. This surprises me though, with Firefox I usually have over 100. That's the desktop though, let me check the netbook... The netbook has 30 right after being turned on, which means openbox, lxpanel and conky.

Offline

#15 2010-11-18 19:36:00

Meskarune
Member
From: Helsinki, Finland
Registered: 2009-03-21
Posts: 361
Website

Re: Lightweight, not so lightweight?

Gusar wrote:
Meskarune wrote:

Powertop only listed this as a problem:
35.9% (600.6)   [kernel scheduler] Load balancing tick

600, WTF? That's a lot. I mean *really* a lot. There's something waking up your CPU a lot or your kernel is not configured quite right.

I have 50 altogether currently and that's with Firefox running. This surprises me though, with Firefox I usually have over 100. That's the desktop though, let me check the netbook... The netbook has 30 right after being turned on, which means openbox, lxpanel and conky.

Would frequent sleeping and waking cause the kernel scheduler to to do that? I put my computer to sleep at the end of one class, wake it up for the next class, etc, and probably do this about 20+ times a day. My netbook also hasn't been rebooted in over a week... How do I find out what is causing the "problem"

Thanks for all of your help everyone.


Homepage  | Arch Linux Women | Arch Linux Classroom
Acer Aspire E5-575G-53VG:
Intel Dual-Core i5-6200U 2.3 GHz; Skylake rev3 | 8GB DDR4 ram | Intel HD Graphics 520 + NVIDIA GeForce 940MX
Qualcomm Atheros QCA9377 802.11ac | Realtek RTL8111/8168/8411 Gigabit Ethernet Controller

Offline

#16 2010-11-18 20:31:52

Gusar
Member
Registered: 2009-08-25
Posts: 3,606

Re: Lightweight, not so lightweight?

Meskarune wrote:

Would frequent sleeping and waking cause the kernel scheduler to to do that?

No, it's an app (or more of them) that's running. As I said, python is an offender, or better said certain python apps. If I fire up emesene right now, I'll immediately get 128 additional wake-ups and more. Constant C-state switching uses power, as well as the CPU not being able to sleep for long periods of time. So finding the offender would possibly get you a few more minutes.

Offline

#17 2010-11-18 23:00:58

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Lightweight, not so lightweight?

Your CPU's power draw is linked to the number of wakeups per second.  I get twice as many wakeups when running X.  A pure CLI environment should stretch out your battery a bit more.

I also seem to remember reading that many wifi cards will use more power when "off", because they'll actively scan for APs when not told what to do.  Can't find the link right now.

Edit: This one just came up on #archlinux.  Running Compiz might save some juice.  If you have a GPU, it is usually more efficient than your CPU.

Last edited by keenerd (2010-11-19 01:00:48)

Offline

#18 2010-11-19 14:51:32

Unia
Member
From: Stockholm, Sweden
Registered: 2010-03-30
Posts: 2,486
Website

Re: Lightweight, not so lightweight?

I also noticed that when I'm running XFCE my CPU/RAM is lower than when I'm running Openbox. No difference in applications though


If you can't sit by a cozy fire with your code in hand enjoying its simplicity and clarity, it needs more work. --Carlos Torres

Offline

#19 2010-11-20 02:33:18

AngryKoala
Member
Registered: 2009-01-22
Posts: 197

Re: Lightweight, not so lightweight?

You could always clock down your cpu if you don't need the power

Offline

#20 2010-11-20 16:37:21

Gusar
Member
Registered: 2009-08-25
Posts: 3,606

Re: Lightweight, not so lightweight?

AngryKoala wrote:

You could always clock down your cpu if you don't need the power

That happens anyway with the ondemand governor. Unless you mean undervolting, but doesn't that have implications on stability?

Offline

#21 2010-11-20 22:26:41

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Lightweight, not so lightweight?

@Awebb: they're both lightweight browsers sporting webkit, but with different implementations. Either one could be on top.

@Hide: I've found with both MOC  and Deadbeef, if I turn them on and don't play any music, they'll eventually eat up resources. Someone reported the same issue in MOC, and no solution has been provided.

Offline

#22 2010-11-21 00:40:02

AngryKoala
Member
Registered: 2009-01-22
Posts: 197

Re: Lightweight, not so lightweight?

Gusar wrote:
AngryKoala wrote:

You could always clock down your cpu if you don't need the power

That happens anyway with the ondemand governor. Unless you mean undervolting, but doesn't that have implications on stability?

I guess I mean manually making cpu the minimum if you know you aren't doing anything requiring more.  Sometimes, my laptop uses more cpu than I think it needs to.

Offline

#23 2010-11-21 00:58:37

Hide
Member
From: Castalia
Registered: 2007-02-02
Posts: 368

Re: Lightweight, not so lightweight?

@Berticus
Interesting. I'll certainly try to reproduce that.

Last edited by Hide (2010-11-21 01:00:41)

Offline

#24 2010-11-21 05:00:31

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Lightweight, not so lightweight?

tNjkwZw

This is with the alpha version. One reason I'm using this version is because I thought the problem would be fixed. That, and I can use lastfmpost bash script to scrobble. Not sure how long it took to do that. Maybe half an hour? It's also the reason I'm trying out deadbeef and getting the same issue.

---edit---
I have mocp reporting what music is playing on dzen2, as you can see in the picture. Nothing is playing. It still uses 87% CPU, and if I let it keep going, the RAM usage should go up too.

Last edited by Berticus (2010-11-21 05:01:48)

Offline

#25 2010-11-21 10:52:30

Hide
Member
From: Castalia
Registered: 2007-02-02
Posts: 368

Re: Lightweight, not so lightweight?

@Berticus
mocp has been running for half an hour now and I still don't notice the behaviour you presented. Its resource usage is at a minimum.

Sorry for OT-ing, I just wanted to try to set the record straight.

Offline

Board footer

Powered by FluxBB