xfs
[Top] [All Lists]

Re: [PATCH 09/12] xfstests: add a new test that runs fsstress under ENOS

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 09/12] xfstests: add a new test that runs fsstress under ENOSPC conditions
From: Dmitry Monakhov <dmonakhov@xxxxxxxxxx>
Date: Tue, 08 Nov 2011 12:32:05 +0400
Cc: linux-fsdevel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, hch@xxxxxx, aelder@xxxxxxx, tytso@xxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type; bh=3XCQnW/ZKl3UBhNvO4pJcG85DcMuWpcswMoEV4KlepY=; b=TceRhVAY1rt+1ZEYR1nlBpGJckuH1PyJMyHa0t2HYtRIVJL96NNAj2ka7CDLnUR5EQ yDunDjD5mriOn3M+TA5h+UxEhc0/oAsli7X14hGlIDwI0b953RppbxEZeQ/wLsKVb4H7 UDH3mZcA7OrM8iJg0ZOTlc/lSow/VlYBG4rPw=
In-reply-to: <20111107212235.GH5534@dastard>
References: <1320330301-2682-1-git-send-email-dmonakhov@xxxxxxxxxx> <1320330301-2682-10-git-send-email-dmonakhov@xxxxxxxxxx> <20111107212235.GH5534@dastard>
Sender: Dmitry Monakhov <rjevskiy@xxxxxxxxx>
User-agent: Notmuch/0.5-69-g3e4a9d6 (http://notmuchmail.org) Emacs/23.1.1 (i486-pc-linux-gnu)
On Tue, 8 Nov 2011 08:22:35 +1100, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> On Thu, Nov 03, 2011 at 06:24:58PM +0400, Dmitry Monakhov wrote:
> > During stress testing we want to cover as much code paths as possible
> > fsstress is very good for this purpose. But it has expandable nature
> > (disk usage almost continually grow). So once it goes in no ENOSPC
> > condition it will be where till the end. But by running 'dd' writers
> > in parallel we can regularly trigger ENOSPC but only for a limited
> > periods of time because each time it opens the same file with O_TRUNC.
> 
> .....
> 
> So you have a 512MB filesystem, and you do:
> 
> > +# Disable all sync operations to get higher load
> > +FSSTRESS_AVOID="$FSSTRESS_AVOID -ffsync=0 -fsync=0 -ffdatasync=0"
> > +_workout()
> > +{
> > +   echo ""
> > +   echo "Run fsstress"
> > +   echo ""
> > +   num_iterations=10
> > +   enospc_time=2
> > +   out=$SCRATCH_MNT/fsstress.$$
> > +   args="-p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out"
> > +   echo "fsstress $args" >> $here/$seq.full
> > +   $FSSTRESS_PROG $args > /dev/null 2>&1 &
> 
> run a bunch of fsstress processes
> 
> > +   pid=$!
> > +   echo "Run dd writers in parallel"
> > +   for ((i=0; i < num_iterations; i++))
> > +   do
> > +           # File will be opened with O_TRUNC each time
> > +           dd if=/dev/zero of=$SCRATCH_MNT/SPACE_CONSUMER bs=1M count=1 \
> > +                   > /dev/null 2>&1
> > +           sleep $enospc_time
> > +   done
> 
> Then write the same 1MB file 10 times, 2 seconds apart, giving a
> total space usage of the dd processes of 1MB over 20s.
Hmm.. definitely it should not have count parameter at all, it
supposed to run until ENOSPC (that's why it's called spaceconsumer),
similar to 270'th testcase.
Patch will be in the list in a minute.
> 
> > +   kill $pid
> > +   wait $pid
> > +}
> 
> Then kill the fsstress.
> 
> AFAICT, fsstress won't always fill 511MB in 20s - on my test systems
> the fill rate is typically around 5s per 100MB, which would result
> in the filesystem not being filled with this test and hence not
> exercising ENOSPC.  Perhaps this would be better done like test 083,
> which uses a fixed number of write-only operations per fsstress
> process that is known to end up at ENOSPC, rather than hoping it
> gets there in 20s. 
> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@xxxxxxxxxxxxx
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>