Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Periodic disk accesses
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
psdasilva
Apprentice
Apprentice


Joined: 03 Sep 2005
Posts: 239

PostPosted: Sun May 20, 2012 3:55 am    Post subject: Periodic disk accesses Reply with quote

Hi.

I have periodic disk accesses (1 about each 20s) to my disk.
This is a problem when running on low battery because the disk is always shuting down and then started again.

Any way to avoid this situation?

Thanks for any comments/help.
Back to top
View user's profile Send private message
BillWho
Veteran
Veteran


Joined: 03 Mar 2012
Posts: 1600
Location: US

PostPosted: Sun May 20, 2012 4:36 am    Post subject: Reply with quote

psdasilva,

Take a look at man hdparm. -S0 should disable standby mode.

Good luck :wink:
_________________
Good luck :wink:

Since installing gentoo, my life has become one long emerge :)
Back to top
View user's profile Send private message
Aquous
l33t
l33t


Joined: 08 Jan 2011
Posts: 700

PostPosted: Sun May 20, 2012 12:26 pm    Post subject: Reply with quote

Or try looking at the iotop output (sys-process/iotop) to see what's responsible for starting up your disk over and over.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon May 21, 2012 2:58 pm    Post subject: Reply with quote

Probably logging. If you use metalog you can put a tmpfs inside /var/log and tell it to dump anything you don't care about in there.
Back to top
View user's profile Send private message
psdasilva
Apprentice
Apprentice


Joined: 03 Sep 2005
Posts: 239

PostPosted: Tue May 22, 2012 12:01 am    Post subject: Reply with quote

Identifying what is causing the disk accesses seems to be a dificult task! It is a very short access. I am thinking of something related to the reiserfs journaling.

Stopping disks from spinning down ... it seems that something issues an hdparm when switching to battery. Default "-S", whatever it is, does not stop the disks when on AC. After switching to battery, the disks immediately began to spin down. I issued a hdparm -S12 (1min) and they never spun down again.

I put -S12 and -B254 in /etc/conf.d/hdparm. Let's see what happen.

Another recurrent problem (never got this fixed) is that rarely removing the power causes kde appelet to recognize it! It detects that the battery is discharging but still says AC is plugged in! (see https://forums.gentoo.org/viewtopic-p-6488216.html#6488216 please).

May be I'll try to install kubuntu on a different partition and see how does it behave.
Back to top
View user's profile Send private message
psdasilva
Apprentice
Apprentice


Joined: 03 Sep 2005
Posts: 239

PostPosted: Tue May 22, 2012 2:57 am    Post subject: Reply with quote

I can confirm

After switching to battery disks stop immediatly and reactivate on every access stopping again!
Restarting hdparm (with /etc/conf.d/hdparm having -S12) stops this behaviour. Disks remain spinning.
Something is changing hdparm behaviour when switching to battery. What?
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Tue May 22, 2012 9:16 am    Post subject: Reply with quote

Hey psdasilva,

You can identify what is causing you disk accesses by running:
Code:
sudo sysctl vm.block_dump=1

After this your syslog should tell you what is writing to the disk and waking it up. To turn it off again do ...=0
Back to top
View user's profile Send private message
psdasilva
Apprentice
Apprentice


Joined: 03 Sep 2005
Posts: 239

PostPosted: Tue May 22, 2012 2:14 pm    Post subject: Reply with quote

Ok kimmie. I think the culprit is zfs-fuse. I still couldn't see what it is doing. I'll dig a little more.

Neverthless the main problem (for me) is how to avoid the disks to sleep! Besides, when disks are sleeping when zfs-fuse wakes them up they went to sleep again almost immediately! As I said I need to stop/restart hdparm service to have disks always awake.

There must be something that changes normal hdparm behavior when the computer goes into (low?) battery mode. The kde applet? There is nothing in its configuration about disks!

Thanks
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Tue May 22, 2012 5:11 pm    Post subject: Reply with quote

Ah... I guess FUSE is a problem, normally you get to see which process is actually causing the I/O, maybe with FUSE all you see is the FUSE process, which isn't really helpful.

Do you have pm-utils installed? Have a look at the /usr/lib/pm-utils/power.d/harddrive script.. you can change the default settings you see /usr/lib/pm-utils/power.d/harddrive by creating a file in /etc/pm/config.d : man pm-utils and man pm-powersave describe how do do this.

pm-powersave is the command which applies all these settings. It is invoked for you by upower. You can turn this off altogether in /etc/Upower/Upower.conf.
Back to top
View user's profile Send private message
psdasilva
Apprentice
Apprentice


Joined: 03 Sep 2005
Posts: 239

PostPosted: Thu Nov 01, 2012 6:25 am    Post subject: Reply with quote

kimmie I forgot to thank you at the time :-(
Thank you very much. This was very useful. Just wrote a "do nothing" script harddrive in /etc/pm/power.d and that did the job of not spinning disks down.
Back to top
View user's profile Send private message
kimmie
Guru
Guru


Joined: 08 Sep 2004
Posts: 531
Location: Australia

PostPosted: Thu Nov 01, 2012 10:52 am    Post subject: Reply with quote

You're welcome! 8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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