public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Petre Rodan <petre.rodan@simplex.ro>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs@oss.sgi.com
Subject: Re: xfssyncd and disk spin down
Date: Sat, 25 Dec 2010 14:09:48 +0200	[thread overview]
Message-ID: <20101225120948.GA14200@pandora.simplex.ro> (raw)
In-Reply-To: <4D14E3D2.4000505@sandeen.net>


[-- Attachment #1.1.1: Type: text/plain, Size: 3186 bytes --]


Hi Eric,

On Fri, Dec 24, 2010 at 12:17:54PM -0600, Eric Sandeen wrote:
> Doesn't seem like that should happen.

music to my ears :)
having this fixed would make me a happy bunny.

> >   8,16   1    36591  6306.873151576  1352  A WBS 976985862 + 2 <- (8,17) 976985799
> > 
> > there was no file at or near the 976985799 inode (I presume that's an
> > inode?)
> 
> Nope that's a sector on the drive.

great, this should make debugging easier.

> I think we just need to figure out what's causing the writes, and
> what's being written.

not sure about the first thing, but do read on for the "what's written" chapter:

# mount -o remount /dev/sdb1        # to start fresh with no xfssyncd's poking arround
# cp -r /usr/src/linux* /mnt/space  # do some writes to the drive, then let it completely unused for at least 30 minutes after the cp finished
                                    # at this point the only thing active on sdb1 is xfssyncd at 36s intervals
# bin/blk_debug.sh > /dev/shm/stdout

blk_debug.sh parses the output of blktrace, blkparse and for each line containing 'A WBS' it uses dd to save 8 sectors from sdb starting with the mapped value I get from blkparse

blktrace -d /dev/sdb -o - | blkparse -i - | while read line; do
    echo "${line}"
    grep -q 'A WBS' <<< ${line} && {
        sect=$(echo "${line}" | awk '{ print $8 }' )
        # fork a dd and let xfssyncd time to finish writing
        ( 
            sleep 20
            # force dd to read the drive, not a cache
            echo 3 > /proc/sys/vm/drop_caches
            dd if=/dev/sdb of=/dev/shm/dump_${sect} skip=${sect} bs=512 count=8 && \
            	echo "* sectors ${sect}-$((${sect}+8)) saved into dump_${sect}"
        ) &
    }

done


I thought that since xfssyncd writes to sectors in increments of 2 it would be possible to run a diff between 2 consecutive samples and get some information that may help you see something. I provide an attachment with the entire stdout, sector dumps and scripts. also available here: http://incoming.avira.com/NOSYNC/peter/xfssyncd_debug.tar.bz2

there might be a slight misalignment of a few sectors between dd's seek and where it's been told to go, look closely at the blkparse. apparently xfssyncd is not 'appending' information, it looks more like a bucketload of a similarly-looking array of data each time.

hope this helps, if there is anything amiss I could fix it and try again anytime.

> On an idle fs though I wouldn't expect that we need any of this, so probably
> need to dig a little to see what's going on.  I don't think you need a mount
> option, I think we need an explanation and maybe a bugfix.  :)
> 
> I'll try to find time to look into it unless someone else knows what's going
> on off the top of their heads.

thank you for your interest.
I'll be glad to test kernel patches against 2.6.36.2 that you might come up with.

@Stan, thanks for your input, it's nice to see friendly communities gathered arround a mailing list again.

Happy Holidays everyone.

cheers,
peter

-- 
petre rodan
<petre.rodan@simplex.ro>
Technical Manager
Simplex SRL, Bucharest

[-- Attachment #1.1.2: xfssyncd_debug.tar.bz2 --]
[-- Type: application/x-bzip2, Size: 26065 bytes --]

[-- Attachment #1.2: Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

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

  reply	other threads:[~2010-12-25 12:06 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-23 16:55 xfssyncd and disk spin down Petre Rodan
2010-12-23 19:29 ` Stan Hoeppner
2010-12-23 21:16   ` Petre Rodan
2010-12-24  0:54     ` Stan Hoeppner
2010-12-24  5:15       ` Stan Hoeppner
2010-12-24  6:02       ` Petre Rodan
2010-12-24 23:00         ` Stan Hoeppner
2010-12-25  3:36           ` Eric Sandeen
2010-12-25  4:32             ` Stan Hoeppner
2010-12-24 18:17 ` Eric Sandeen
2010-12-25 12:09   ` Petre Rodan [this message]
2010-12-27  2:19 ` Dave Chinner
2010-12-27  6:16   ` Petre Rodan
2010-12-27 14:07     ` Dave Chinner
2010-12-27 17:19       ` Petre Rodan
2010-12-31  0:13         ` Dave Chinner
2011-01-20 10:01           ` Petre Rodan
2011-01-20 11:06             ` Dave Chinner
2011-01-20 12:07               ` Petre Rodan
2011-01-20 13:24                 ` Christoph Hellwig
2011-01-20 23:43             ` Dave Chinner
2011-02-10 20:42               ` Petre Rodan
2011-02-10 22:18                 ` Dave Chinner
2011-02-14 18:04                   ` Brian Duncan
2011-05-31 14:40                     ` Brian Duncan
2011-05-31 15:16                       ` Michael Weissenbacher
2011-06-01 23:37                         ` Dave Chinner
2011-07-11  4:02                           ` Brian Duncan
2011-07-11 14:34                             ` Michael Weissenbacher

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=20101225120948.GA14200@pandora.simplex.ro \
    --to=petre.rodan@simplex.ro \
    --cc=sandeen@sandeen.net \
    --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