Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to really put hard disk into stanby mode
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
rooturner
n00b
n00b


Joined: 20 Aug 2008
Posts: 6

PostPosted: Thu Aug 28, 2008 7:52 pm    Post subject: how to really put hard disk into stanby mode Reply with quote

Hi,

Trying to make work putting hard drives into standby mode - it means when computer is idle (no access - mean read/write to it), it could spin-down and pc may become silent/with less noise and it helps to preserve some energy too. My idea is to run bittorrent client overnight to download some torrents to usb flash memory and during this operation hdd can go into standby mode. But encountered numerous problems. Little info on this, this is part of man hdparm:
Code:
-y Force an IDE drive to immediately enter the low power consump-
tion standby mode, usually causing it to spin down. The current
power mode status can be checked using the -C flag.

So /me is doing with following setup while testing: disabled all services that could access hard drive, swap is off, installed gentoo with ext2 filesystem as ext3 is known to flush buffers to hard drive almost every 5sec so it can't leave hdd to rest - follows quote from one ubuntu bug report:
Code:
Without having laptop-mode enabled, setting the hard drive to spin down rapidly is just silly -- ext3 will try to flush buffers every 5 seconds, and the kernel will think that tricking writes is OK. As a result, anything you do that dirties buffers will cause the hard drive to spin up.

Calling hdparm -y /dev/sda /dev/sdb makes disks go into standby mode but they wake up (various tries) in between immidiately and 40sec. Why is this happening and how could I find what process is responsible to this behavior. Found on some forums that people keep their drives in standby by 7hours or more if there is no read/write access to them. One use case is web surfing - for it /me don't need hdd at all making noise and that noise is very noticable with my 7200rpms hdd. What can be involved in this process, can you test this on yours machines, please - one hdparm -y /dev/sdX is start.

Hope some of you will find this interesting too and be kind to help.
Thank you
Back to top
View user's profile Send private message
rooturner
n00b
n00b


Joined: 20 Aug 2008
Posts: 6

PostPosted: Fri Aug 29, 2008 12:30 am    Post subject: Reply with quote

Code:
echo "1" > /proc/sys/vm/laptop_mode
makes all this much better followed with
Code:
hdparm -y /dev/sdX
. Not ideal though , please, if you are interested help to make this much better.

I was thinking about several use cases
1. User wants to listen to the Internet radio stations (streaming) - if it is not for recording hdd should be in standby-mode
2. For web surfing - hdd is in standby mode until user wants to save an image, or bookmark link. how browser on/off cache behaves, there are many tunables in /proc/sys/vm regarding filesystem commit interval.

If you sleep in the room where pc is located, standby mode means less noise, warm, and keeps power at least a bit.
3. Listen to the music from USB stick memory
4. Run bittorrent in the background where destination folder is on USB stick
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Aug 29, 2008 6:16 am    Post subject: Reply with quote

This is what laptop-mode-tools is for - just configure its conf file properly. It works fine with ext3.

Usual problem with the drives waking up often is because the syslogger calls fsync, which is why laptop-mode-tools contains options in its conf file to set up the syslogger to prevent it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum