public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Andy Bennett <andyjpb@ashurst.eu.org>
Cc: xfs@oss.sgi.com
Subject: Re: Disk spin down
Date: Mon, 13 Feb 2012 09:35:11 +1100	[thread overview]
Message-ID: <20120212223511.GK12836@dastard> (raw)
In-Reply-To: <4F382F00.9040100@ashurst.eu.org>

On Sun, Feb 12, 2012 at 09:28:32PM +0000, Andy Bennett wrote:
> Hi,
> 
> >> Seems to me that something is still dirtying an inode regularly.
> >>
> >> Perhaps you need to look at the XFS and writeback event traces to
> >> find out what process is dirtying the inode. trace-cmd is your
> >> friend...
> > 
> > Something like this?
> > 
> > -----
> > echo 1 > /sys/kernel/debug/tracing/events/xfs/enable
> > 
> > echo 0 > /sys/kernel/debug/tracing/events/xfs/enable
> > 
> > more /sys/kernel/debug/tracing/trace
> > -----
> > 
> > 
> > I tried recreating the situation of the last 2 days (clean boot, stopped
> > services) and it's currently quiescing nicely. :-(
> > 
> > I'll keep an eye on it and try to catch it in the act but every time I
> > turn the tracing on the HDD light stays firmly off. :-(
> 
> There is more interesting news already.
> 
> I had used 'hdparm -S 120' to set the spindown_timeout to 10 minutes. It
> appears that that was sticking through a cold boot. Setting that back to
> its previous value of 1 (5 seconds) makes the disk constantly spin up
> and down when I suspect it is idle.

Well, that's kind of important to know.

It takes XFS a minimum of 90s to idle a filesystem properly after
any modification. Setting a spindown time shorter than this will
cause the disk to spin up and down all the time until the filesystem
idles itself.

What else have you tuned on your system?

> I've caught a trace over the course of a few spinup/downs and attached
> it (gzipped as it's 208K unpacked).

Which you've taken about 90s after boot, so while there is probably
still dirty inodes due to the boot process. Indeed:

       flush-8:0-1225  [002]    91.103273: xfs_ilock: dev 8:6 ino 0x80a124 flags ILOCK_EXCL caller xfs_iomap_write_allocate
       flush-8:0-1225  [002]    91.103287: xfs_perag_get: dev 8:6 agno 2 refcount 28 caller xfs_bmap_btalloc_nullfb
       flush-8:0-1225  [002]    91.103290: xfs_perag_put: dev 8:6 agno 2 refcount 27 caller xfs_bmap_btalloc_nullfb
       flush-8:0-1225  [002]    91.103292: xfs_perag_get: dev 8:6 agno 3 refcount 32 caller xfs_bmap_btalloc_nullfb
       flush-8:0-1225  [002]    91.103293: xfs_perag_put: dev 8:6 agno 3 refcount 31 caller xfs_bmap_btalloc_nullfb
       flush-8:0-1225  [002]    91.103295: xfs_perag_get: dev 8:6 agno 2 refcount 28 caller xfs_alloc_vextent

That's data writeback happening, so filesystem idling is still at
least 90s away from this.  So, it's no surprise your disk is
spinning up and down here because there is IO being done every 5-10
seconds which is in the same order of frequency as the IO the system
is issuing....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-02-12 22:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-12 18:23 Disk spin down Andy Bennett
2012-02-12 20:06 ` Dave Chinner
2012-02-12 21:15   ` Andy Bennett
2012-02-12 21:28     ` Andy Bennett
2012-02-12 22:35       ` Dave Chinner [this message]
2012-02-12 22:57         ` Andy Bennett
2012-02-13  8:36 ` Brian Candler
2012-02-13 23:41   ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120212223511.GK12836@dastard \
    --to=david@fromorbit.com \
    --cc=andyjpb@ashurst.eu.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox