Why would Linux be waking up every 5 to 10 seconds to write to the disk when I am sitting at my desktop or sitting at the login screen? (i.e. No programs running. Only 40 total wakeups seen in powertop)
- Seagate 320gig SATA - XFS filesystem, relatime mount option enabled - link_power_management_policy set to min_power - vm.dirty_writeback_centisecs is set to 1500
I even unmounted /boot (default ext3) but that did not change anything. Every 5 to 10 seconds I see the HDD light flash and sometimes I hear a very faint "beeping" like the drive is waking up or powering off, whichever it is doing.
Thanks, Michael
Michael Cronenworth wrote:
Why would Linux be waking up every 5 to 10 seconds to write to the disk when I am sitting at my desktop or sitting at the login screen? (i.e. No programs running. Only 40 total wakeups seen in powertop)
- Seagate 320gig SATA
- XFS filesystem, relatime mount option enabled
- link_power_management_policy set to min_power
- vm.dirty_writeback_centisecs is set to 1500
I even unmounted /boot (default ext3) but that did not change anything. Every 5 to 10 seconds I see the HDD light flash and sometimes I hear a very faint "beeping" like the drive is waking up or powering off, whichever it is doing.
Thanks, Michael
If it is really the hard drive, it is probably rsyslogd doing something with the log files. When you are logged in, the CD/DVD drive is also checked to see if there is a disk in the drive. This will also light the HDD light in most systems.
Mikkel
Mikkel L. Ellertson wrote:
If it is really the hard drive, it is probably rsyslogd doing something with the log files. When you are logged in, the CD/DVD drive is also checked to see if there is a disk in the drive. This will also light the HDD light in most systems.
I forgot to add that I disabled hal polling on /dev/sr0. I guess the beeping could be the dvd drive, but that would mean that hal is broken, which isn't that unlikely.
I performed an ls -lrt /var/log and the last touched file was wtmp over two minutes ago. messages hadn't been written to in 15 minutes.
On Mon, 2009-03-02 at 21:39 -0600, Michael Cronenworth wrote:
Every 5 to 10 seconds I see the HDD light flash and sometimes I hear a very faint "beeping" like the drive is waking up or powering off, whichever it is doing.
Is it doing it all the time, or just now? There could be a CRON job running makewhatis on the drive, or something similar.
I had to turn off power saving features on my laptop hard drive, because it was doing something similar (which WOULD wear the drive out a lot quicker than normal), but I don't think the period was as short as that.
In the past, going back as far as Fedora Core 4, I found that CUPS was doing that every-few-seconds drive tick, though I wasn't sure what it was doing at that time - I saw nothing logged about what it was doing.
Michael Cronenworth wrote:
Why would Linux be waking up every 5 to 10 seconds to write to the disk when I am sitting at my desktop or sitting at the login screen? (i.e. No programs running. Only 40 total wakeups seen in powertop)
Try this:
yum install blktrace mount a /sys/kernel/debug -t debugfs btrace /dev/sda umount /sys/kernel/debug
btrace will dump all disk activity, PID number is in column number 5.
Best regards.
Roberto Ragusa wrote:
btrace will dump all disk activity, PID number is in column number 5.
Looks like it was xfsbufd writing unnecessarily. By default, xfsbufd_centisecs is set to 100. I changed it to 1500. Now pdflush wakes up every 15 seconds, and xfssyncd wakes up every 30 seconds (default setting). No programs were causing these wakeups. btrace only showed "pdflush," "xfsbufd," and "xfssyncd" as the processes responsible.
Any way to get pdflush and/or xfssyncd to shut up or am I stuck with them?
Michael Cronenworth wrote:
Why would Linux be waking up every 5 to 10 seconds to write to the disk when I am sitting at my desktop or sitting at the login screen? (i.e. No programs running. Only 40 total wakeups seen in powertop)
- Seagate 320gig SATA
- XFS filesystem, relatime mount option enabled
- link_power_management_policy set to min_power
- vm.dirty_writeback_centisecs is set to 1500
I even unmounted /boot (default ext3) but that did not change anything. Every 5 to 10 seconds I see the HDD light flash and sometimes I hear a very faint "beeping" like the drive is waking up or powering off, whichever it is doing.
Have you added noatime to your /etc/fstab?
This is one important item to stop disk writes.
Also consider changing /boot to ext2....
-------- Original Message -------- Subject: Re: Laptop: Hard drive wakes up every 5-10 seconds From: Robert Moskowitz rgm@htt-consult.com To: Community assistance, encouragement, and advice for using Fedora. fedora-list@redhat.com Date: 03/03/2009 06:46 AM
Michael Cronenworth wrote:
- XFS filesystem, relatime mount option enabled
Have you added noatime to your /etc/fstab?
relatime > noatime
Also consider changing /boot to ext2....
I guess we need to ask FESco to adopt ext2 as the default /boot filesystem instead.... but seriously, that will not affect anything.
I may have been overly bored yesterday. I logged out and let the laptop sit for 5 minutes and it eventually stopped flickering so much. It would flicker after 30 seconds to 1 minute, which is better.
I'll consider the debug output Roberto mentioned when I get bored again.
Thanks, Michael
On Tue, 2009-03-03 at 07:46 -0500, Robert Moskowitz wrote:
Also consider changing /boot to ext2....
Not sure what that's going to gain. How often do you have to change the contents of /boot? It's mostly treated as read-only, and only used when you boot it up. Short of doing kernel updates, you rarely have to do anything with it. And other than for that (kernel updates), you rarely even need to have it mounted post bootup.
Tim wrote:
On Tue, 2009-03-03 at 07:46 -0500, Robert Moskowitz wrote:
Also consider changing /boot to ext2....
Not sure what that's going to gain. How often do you have to change the contents of /boot? It's mostly treated as read-only, and only used when you boot it up. Short of doing kernel updates, you rarely have to do anything with it. And other than for that (kernel updates), you rarely even need to have it mounted post bootup.
So you avoid whatever occational journalling entries occur for the general purpose of journalling. Yeah it probably is all during startup and shutdown.
On Tue, 2009-03-03 at 12:17 -0500, Robert Moskowitz wrote:
So you avoid whatever occational journalling entries occur for the general purpose of journalling. Yeah it probably is all during startup and shutdown.
It's sort of rare to change the contents of /boot, so I can't see there needing much journalling.
I want to run OpenVPN over IPv6. The FAQ indicates that this requires a patch and "This patch will probably be merged into the mainline post-2.0."
I read through the man pages and it was not evident if this patch is in FC10 (or earlier versions).
Does anyone know?
Michael Cronenworth wrote:
Why would Linux be waking up every 5 to 10 seconds to write to the disk when I am sitting at my desktop or sitting at the login screen? (i.e. No programs running. Only 40 total wakeups seen in powertop)
- Seagate 320gig SATA
- XFS filesystem, relatime mount option enabled
- link_power_management_policy set to min_power
- vm.dirty_writeback_centisecs is set to 1500
I even unmounted /boot (default ext3) but that did not change anything. Every 5 to 10 seconds I see the HDD light flash and sometimes I hear a very faint "beeping" like the drive is waking up or powering off, whichever it is doing.
Try tweaking your hdparm settings.
Adding this to your rc.local might help: /sbin/hdparm -S 255 /dev/sda /sbin/hdparm -B 255 /dev/sda
Kevin Kofler
On Tuesday 03 March 2009 08:05:34 pm Kevin Kofler wrote:
Try tweaking your hdparm settings.
Adding this to your rc.local might help: /sbin/hdparm -S 255 /dev/sda /sbin/hdparm -B 255 /dev/sda
Be careful with the -S values over 240. If you read the man page, values over 240 are interpreted differently than lower values and unfortunately there is no complete list of which drives interpret it how... I had a really old drive where 255 reset the firmware. I tried over values and when I hit 250, the drive locked up ...
Peter.
Peter Arremann wrote:
Be careful with the -S values over 240. If you read the man page, values over 240 are interpreted differently than lower values and unfortunately there is no complete list of which drives interpret it how... I had a really old drive where 255 reset the firmware. I tried over values and when I hit 250, the drive locked up ...
Well, the manpage claims the behavior of 255 is actually well-defined except for older drives. That said, the behavior of values above 240 is indeed not intuitive (even for the drives which do follow the specs), bad me for not RTFM before playing around with it.
Looks like 0 is actually the best value to use according to the manpage, as it disables that timeout completely (hopefully it won't also do weird things on some older drives). 240, or maybe even 239, just in case, is probably the safest.
The manpage also says that -B 255 (disable advanced power management entirely) doesn't always work, so -B 254 is also worth a try.
Kevin Kofler
Kevin Kofler wrote:
Michael Cronenworth wrote:
Why would Linux be waking up every 5 to 10 seconds to write to the disk when I am sitting at my desktop or sitting at the login screen? (i.e. No programs running. Only 40 total wakeups seen in powertop)
- Seagate 320gig SATA
- XFS filesystem, relatime mount option enabled
- link_power_management_policy set to min_power
- vm.dirty_writeback_centisecs is set to 1500
I even unmounted /boot (default ext3) but that did not change anything. Every 5 to 10 seconds I see the HDD light flash and sometimes I hear a very faint "beeping" like the drive is waking up or powering off, whichever it is doing.
Try tweaking your hdparm settings.
Adding this to your rc.local might help: /sbin/hdparm -S 255 /dev/sda /sbin/hdparm -B 255 /dev/sda
I think the O.P. was trying not to spin up the drive so often, not keep it running to pull the battery down... setting the filesystem flush and /proc/sys/vm/dirty* values to be reluctant to write will halp here, and allow powersave (-B) with a low value is more likely to be what is wanted.
NOTE: setting the flush time to a high value leaves data in memory and not on the drive, use of a manual "sync" command is desirable if you modify critical data!