[dundee] laptop mode power saving

Sean McRobbie lug at seany.us
Sun Oct 18 22:51:45 UTC 2009


Try the 'powertop' program. Very handy.

Maybe hdparm -B too.

Bear in mind that many believe there is a higher risk of drive failure with many start/stop cycles so it might not be such a healthy choice. Who knows for sure?

Regards,
Sean McRobbie

----- Original Message -----
From: "Lee Hughes" <toxicnaan at yahoo.co.uk>
To: "Tayside Linux User Group" <dundee at lists.lug.org.uk>
Sent: Sunday, 18 October, 2009 11:37:04 PM
Subject: Re: [dundee] laptop mode power saving


i found this very interesting post on the subject. 
and it seems to be tru 

if i kill x on the same system, then the hard disk spins down, it's been down 
for 9 min's now...and that's great. it seems gnome is not interested in not 
writing data to the disk every 20 seconds. it must be a absolute killer 
for home area's mounted over nfs. yikes... 

i found a great post tucked away on a forum...sums everything up really. 

so it's not really a gnome problem, it's a fundamental unix problem.... 

i'm betting macs suffer from this as well!! i wonder how bsd handles this.i bet 
it's a lot cooler. 

interesting stuff. 


quote------------ 

@andrewc231: My understanding is that it's a combination of 3 things that lead to this effect. 1 and 2) The Bios and the hard drive have some power-management settings and logic that control how aggressively the disk tries to save power by spinning down when idle. A big factor in this aggressiveness is how long a drive should be "idle" before spinning down. With laptops shooting for better battery-lifetime reviews, and with a big green/environmental focus of reviewers benchmarking power consumption, the trend has been to set these settings more aggressively. Apparently spinning down a drive after 30-60 seconds of being idle is not uncommon. 3) Software that makes requests to the hard disk that would force it to spin up. These include any reads not cached by the OS, and any writes forced through the OS's buffers with fsync() or sync() or fdatasync() or write() with O_DIRECT or the equivalents. A whole lot of software seems to wake up more and more frequently triggering this problem. If the software polls at slightly shorter time period than the spin-down time, you never spin down the disk; so you never hear it park - but you never save power either. (for example if the disk spins down after 50 seconds of idle time; and software polls the drive every 30 seconds). If the software polls at slightly longer time period than the spin-down time, you're in the worst case situation of spinning down and up constantly. (for example if the disk spins down after 50 seconds of idle time; and software polls the drive every 60 seconds). I blame richer GUIs on Linux that tend to poll for stuff like email, IMs, skype calls, software updates, etc very frequently and write their status to disk when they poll. On my laptop if I log in a text-only shell login; and don't have postgres running, the disk spins down and stays quiet for long periods of time. On my laptop if I log in with Gnome and my typical desktop full of apps I can see the exact same "problem" everyone else is seeing. Perhaps the software and hardware guys should get together and discuss what's a "reasonable" period of idle time; and how much should an "idle" machine be accessing disks anyway. 

----------------- 


--- On Sun, 18/10/09, Antony D'Auritura <antony at nekorb.co.uk> wrote: 



From: Antony D'Auria <antony at nekorb.co.uk> 
Subject: Re: [dundee] laptop mode power saving 
To: "Tayside Linux User Group" <dundee at lists.lug.org.uk> 
Date: Sunday, 18 October, 2009, 8:13 PM 


Yep, 

http://www.srware.net/en/software_srware_iron.php 
http://www.srware.net/forum/viewtopic.php?f=18&t=561 

It's stilll alpha but great for my Netbook. The Linux version can just be unpacked and run. There's a portable version if you like it that much. 


2009/10/18 Nicholas Walker < tel0seh at googlemail.com > 


SRiron is the modified Chromium amirite? 





On Sun, Oct 18, 2009 at 6:48 PM, Antony D'Auria < antony at nekorb.co.uk > wrote: 


My netbook does run like it's on speed with Arch & Openbox :) Battery life great. SRIron runs nice & quick, although not very configurable it does the job for just a bit of general browsing. 

Ant 


2009/10/18 Nicholas Walker < tel0seh at googlemail.com > 





remove those bloated UI's and run openbox instead :D 





On Sun, Oct 18, 2009 at 4:44 PM, Lee Hughes < toxicnaan at yahoo.co.uk > wrote: 


hehe.. i suppose i could, just trying to get extended battery life. tee hee.. 

it's seems to be working a little better now.... looks like gnome is full a fsync's 

fsync's seem to wake my system up!!! 

how do i get rid of them. 


--- On Sun, 18/10/09, Jennifer higgins < sauntering.with.scissors at gmail.com > wrote: 



From: Jennifer higgins < sauntering.with.scissors at gmail.com > 
Subject: Re: [dundee] laptop mode power saving 

To: "Tayside Linux User Group" < dundee at lists.lug.org.uk > 
Date: Sunday, 18 October, 2009, 3:20 PM 





oh just power the laptop down you big geek ;) 


2009/10/18 Lee Hughes < toxicnaan at yahoo.co.uk > 


hmm. well it seems that firefox writes one more file which is not to it's cache or 
it's profile...it's... 

lsof | grep firefox | grep tmp 

firefox 27357 user 72u REG 8,1 0 6177091 /var/tmp/etilqs_2SWFrJKOPJgPeet (deleted) 

etilqs seemed to be sqlite backwards? 

bizzare.... any idea's what that is or how to relocated it to my ramdisk? 

Cheers, 
Lee 



--- On Sun, 18/10/09, Lee Hughes < toxicnaan at yahoo.co.uk > wrote: 



From: Lee Hughes < toxicnaan at yahoo.co.uk > 
Subject: [dundee] laptop mode power saving 
To: "Tayside Linux User Group" < dundee at lists.lug.org.uk > 
Date: Sunday, 18 October, 2009, 3:06 PM 





Right, 

has any got laptop mode working successfully , i'm trying to get my hard disk to spin down as long as possible, 

i've been using a combination of lm-profile, iotop -o -d 10 -b 

now, i've nailed fire fox from fsyncing all the time, that's improved things some what, 
http://www.dslreports.com/forum/r23159573-Re-Make-Firefox-3x-more-responsive-with-a-simple-trick 

it's also faster too boot! 

however, my hard disk sleeps for about 2mins, i've zapped syslog and klog for testing, 
so there should be nothing on the system that should need to wake the disk for writing. 

however, kkjournald is waking the disk up, (presumable to write the journal to disk) 
but the file system is mounted with 

/dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro,commit=600) 

so, it should only commit every 10 mins, or when we run low on memory. 

PID USER DISK READ DISK WRITE SWAPIN IO COMMAND 
807 root 0 B/s 5.54 K/s 0.00 % 0.00 % [kjournald] 
3911 user 0 B/s 0.40 K/s 0.00 % 0.00 % gnome-power-manager 


oh,actually i wonder if it's the gnome power manager, how ironic.. looks like 
the gnome power manager might be forcing a sync... 

yes, it seems that a lot of gnome componets are doing a fsync, thus waking my disk 
up.. :-( 

all i want is, while i'm not reading new data(i.e uncached data from disk) , i want 
applications to write (but delay that write until I say, or a timeout value). 

i think over use of the fsync call may be answer, but i think there's more to it than that. 

my harddrives now been dormant for 10mins.... spin down nirvarna has been reached. 

looks like killing the gnome power meter has stopped the spin ups... now that's 
ironic.. any replacements? or shall i go and hack it. 

i wonder if this would do ssd's good too. 

thoughts? 

Cheers, 

Lee 












-----Inline Attachment Follows----- 


_______________________________________________ 
dundee GNU/Linux Users Group mailing list 
dundee at lists.lug.org.uk http://dundeelug.org.uk 
https://mailman.lug.org.uk/mailman/listinfo/dundee 
Chat on IRC, #tlug on irc.lug.org.uk 

_______________________________________________ 
dundee GNU/Linux Users Group mailing list 
dundee at lists.lug.org.uk http://dundeelug.org.uk 
https://mailman.lug.org.uk/mailman/listinfo/dundee 
Chat on IRC, #tlug on irc.lug.org.uk 


-----Inline Attachment Follows----- 


_______________________________________________ 
dundee GNU/Linux Users Group mailing list 
dundee at lists.lug.org.uk http://dundeelug.org.uk 
https://mailman.lug.org.uk/mailman/listinfo/dundee 
Chat on IRC, #tlug on irc.lug.org.uk 

_______________________________________________ 
dundee GNU/Linux Users Group mailing list 
dundee at lists.lug.org.uk http://dundeelug.org.uk 
https://mailman.lug.org.uk/mailman/listinfo/dundee 
Chat on IRC, #tlug on irc.lug.org.uk 



-- 


Nick Walker 
Vice President : The Linux Society 
UAD Ethical Hacker 

_______________________________________________ 
dundee GNU/Linux Users Group mailing list 
dundee at lists.lug.org.uk http://dundeelug.org.uk 
https://mailman.lug.org.uk/mailman/listinfo/dundee 
Chat on IRC, #tlug on irc.lug.org.uk 


_______________________________________________ 
dundee GNU/Linux Users Group mailing list 
dundee at lists.lug.org.uk http://dundeelug.org.uk 
https://mailman.lug.org.uk/mailman/listinfo/dundee 
Chat on IRC, #tlug on irc.lug.org.uk 



-- 


Nick Walker 
Vice President : The Linux Society 
UAD Ethical Hacker 

_______________________________________________ 
dundee GNU/Linux Users Group mailing list 
dundee at lists.lug.org.uk http://dundeelug.org.uk 
https://mailman.lug.org.uk/mailman/listinfo/dundee 
Chat on IRC, #tlug on irc.lug.org.uk 


-----Inline Attachment Follows----- 


_______________________________________________ 
dundee GNU/Linux Users Group mailing list 
dundee at lists.lug.org.uk http://dundeelug.org.uk 
https://mailman.lug.org.uk/mailman/listinfo/dundee 
Chat on IRC, #tlug on irc.lug.org.uk 

_______________________________________________
dundee GNU/Linux Users Group mailing list
dundee at lists.lug.org.uk  http://dundeelug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/dundee
Chat on IRC, #tlug on irc.lug.org.uk



More information about the dundee mailing list