View previous topic :: View next topic |
Author |
Message |
psdasilva Apprentice
Joined: 03 Sep 2005 Posts: 239
|
Posted: Sun May 20, 2012 3:55 am Post subject: Periodic disk accesses |
|
|
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 |
|
|
BillWho Veteran
Joined: 03 Mar 2012 Posts: 1600 Location: US
|
Posted: Sun May 20, 2012 4:36 am Post subject: |
|
|
psdasilva,
Take a look at man hdparm. -S0 should disable standby mode.
Good luck _________________ Good luck
Since installing gentoo, my life has become one long emerge |
|
Back to top |
|
|
Aquous l33t
Joined: 08 Jan 2011 Posts: 700
|
Posted: Sun May 20, 2012 12:26 pm Post subject: |
|
|
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 |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Mon May 21, 2012 2:58 pm Post subject: |
|
|
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 |
|
|
psdasilva Apprentice
Joined: 03 Sep 2005 Posts: 239
|
Posted: Tue May 22, 2012 12:01 am Post subject: |
|
|
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 |
|
|
psdasilva Apprentice
Joined: 03 Sep 2005 Posts: 239
|
Posted: Tue May 22, 2012 2:57 am Post subject: |
|
|
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 |
|
|
kimmie Guru
Joined: 08 Sep 2004 Posts: 531 Location: Australia
|
Posted: Tue May 22, 2012 9:16 am Post subject: |
|
|
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 |
|
|
psdasilva Apprentice
Joined: 03 Sep 2005 Posts: 239
|
Posted: Tue May 22, 2012 2:14 pm Post subject: |
|
|
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 |
|
|
kimmie Guru
Joined: 08 Sep 2004 Posts: 531 Location: Australia
|
Posted: Tue May 22, 2012 5:11 pm Post subject: |
|
|
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 |
|
|
psdasilva Apprentice
Joined: 03 Sep 2005 Posts: 239
|
Posted: Thu Nov 01, 2012 6:25 am Post subject: |
|
|
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 |
|
|
kimmie Guru
Joined: 08 Sep 2004 Posts: 531 Location: Australia
|
Posted: Thu Nov 01, 2012 10:52 am Post subject: |
|
|
You're welcome! |
|
Back to top |
|
|
|