public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-fsdevel@vger.kernel.org, aelder@sgi.com, tytso@mit.edu,
	hch@lst.de, xfs@oss.sgi.com
Subject: Re: [PATCH 09/12] xfstests: add a new test that runs fsstress under ENOSPC conditions
Date: Tue, 08 Nov 2011 12:32:05 +0400	[thread overview]
Message-ID: <87lirrkoai.fsf@dmbot.sw.ru> (raw)
In-Reply-To: <20111107212235.GH5534@dastard>

On Tue, 8 Nov 2011 08:22:35 +1100, Dave Chinner <david@fromorbit.com> 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@fromorbit.com
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  reply	other threads:[~2011-11-08  8:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 14:24 [PATCH 00/12] Bunch of new stress tests -v4 Dmitry Monakhov
2011-11-03 14:24 ` [PATCH 01/12] xfstests: fsstress dump inode info when possible Dmitry Monakhov
2011-11-03 14:24 ` [PATCH 02/12] xfstests: add different logging option to fsstress Dmitry Monakhov
2011-11-03 14:24 ` [PATCH 03/12] xfstests: fsstress should kill children tasks before exit Dmitry Monakhov
2011-11-03 14:24 ` [PATCH 04/12] xfstests: fsstress add command line style output for show_opts Dmitry Monakhov
2011-11-03 14:24 ` [PATCH 05/12] xfstests: freeze fsstress options for 117'th Dmitry Monakhov
2011-11-03 14:24 ` [PATCH 06/12] xfstests: add fallocate support to fsstress Dmitry Monakhov
2011-11-03 14:24 ` [PATCH 07/12] xfstests: fsstress add FS_IOC_{SET, GET}FLAGS operations v2 Dmitry Monakhov
2011-11-03 14:24 ` [PATCH 08/12] xfstests: add fiemap operation to fsstress Dmitry Monakhov
2011-11-03 14:24 ` [PATCH 09/12] xfstests: add a new test that runs fsstress under ENOSPC conditions Dmitry Monakhov
2011-11-07 21:22   ` Dave Chinner
2011-11-08  8:32     ` Dmitry Monakhov [this message]
2011-11-07 21:25   ` Dave Chinner
2011-11-03 14:24 ` [PATCH 10/12] xfstests: add a new quota " Dmitry Monakhov
2011-11-03 14:25 ` [PATCH 11/12] xfstress: add regression testcase for d583fb87a3ff0 Dmitry Monakhov
2011-11-03 14:25 ` [PATCH 12/12] xfstress: Test data journaling flag switch for a single file Dmitry Monakhov
2011-11-03 14:55 ` [PATCH 00/12] Bunch of new stress tests -v4 Christoph Hellwig
2011-11-03 15:21   ` Dmitry Monakhov

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=87lirrkoai.fsf@dmbot.sw.ru \
    --to=dmonakhov@openvz.org \
    --cc=aelder@sgi.com \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    --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