[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Saving battery power


Am Dienstag, 13. März 2007 22:29 schrieb Michael:
> Thanks Thorsten.
> I'm on road next week, can't tell if i got the time and the nerves to
> fiddle with the then-production-system ;) but i definitely  will go for it.
> > Well, once I opened dozens of big-html pages in firefox. Firefox went
> > crazy, eat a lot of ram and my kernel began killing processes.

I didn't loose data.
However, If some app has a memory leak, you'll loose data in this scenario 
even if you use swap.
You just have more time to notice, that your hd is spinning crazy. (Even if 
you don't have swap your HD-Spinnig will increase dramatically if your system 
is unable to cache data efficiently)

> Hmmm...i would not like to risk loosing data. How about a RAM swap
> partition (is this possible?) with priority 2 and a legacy disk swap with
> priority 1 ? Where the disk swap hopefully would take over if ram is filled
> up.

Well, I use loop-aes for encrypting my data. Using /tmp/ (on persistant 
memory) and swap would increase my CPU load since I've to encrypt it as well, 
thus I don't use it.

> > But I guess 1 GB is sufficient for desktop usage.
> This laptop has 1.5G, but anyway, i think it really depends on usage.

Of course. How much RAM do you use?

> > Btw. I created a user tmp (home is /tmp) for vaious reasons (SSH'ing to
> > dfferent hosts with same IPs, etc.) one positiv site-effect is, that I'm
> > able to start a KDE session using my ramdisk only.
> That's cool.
> But is it still faster, since it get's new-installed every run  ?

What do you mean be getting new-installed every run? I »start« into this user 
by "kdesu konsole -u tmp". Hardly anything is installed then.

> Assumed you can't save session settings ?
> Or maybe you just always suspend to disk.
> > none            /tmp            tmpfs   noatime,size=100M       0       0
> AFAIK the defaults are: rw,suid,dev,exec,auto,nouser,async
rw, well, ramdisk are rw by default.
suid, dev, you don't need to set this for tmp and it doesn't hurt (on a single 
user system)
exec, is default imho.
auto,nouser: auto->nouser, and auto is default.
async, well, it's tmpfs. Who cares?

> - if that's correct you could try 'sync' too.
> Whatever that means for a ramdisk.
> > Btw. You might want to set noatime for all HD partitions
> I don't know if i ever needed atime at all.
> Maybe daemons like cron or stat collectors use it ? But probably not on
> /tmp.

I disabled atime for everything and I haven't run into problems yet.

> > consider linking /var/log/ to /tmp/log as well.
> That's also a nice idea. Perhaps it's possible to deinstall logrotate then
> too. I guess we laptop users can learn a lot from knoppix ;)
> > > (multimedia streams) temporarily stored in tmp.
> >
> > Don't store 'em in /tmp?
> I don't know if and how to configure this behaviour. Myspace audio player
> for example stores mp3's in /tmp, flashplayer sometimes in /tmp/plugtemp.
> But usually this would not exceed say 100M or so. Well, it would work
> assumed i reboot sometimes or clean up /tmp by some kind of cron script.
> It would be nice to collect some little reports under this thread.

> Uhh...i guess that was a shot in the own leg ;)
> Somehow i used to think swap is used only if RAM is exhausted. So if you
> ditch swap you would simply kill processes instead of getting slower (and
> using up battery). But maybe i'm wrong.  

Well, I don't know. An efficient swap-algorithm might swap memory areas unused 
for hours in order to cache data accessed more frequently, of course, caching 
behaviour is tuneable, but since I don't need swap (and wasting CPU-Cycles 
for swap encryption), there is no reason for me to care about it.


Reply to: