From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>,
zlang@redhat.com, linux-xfs@vger.kernel.org,
fstests@vger.kernel.org
Subject: Re: [PATCH 09/12] generic/251: constrain runtime via time/load/soak factors
Date: Wed, 20 Nov 2024 08:04:43 +1100 [thread overview]
Message-ID: <Zzz9a9RhImWP4F02@dread.disaster.area> (raw)
In-Reply-To: <20241119154520.GM9425@frogsfrogsfrogs>
On Tue, Nov 19, 2024 at 07:45:20AM -0800, Darrick J. Wong wrote:
> On Mon, Nov 18, 2024 at 10:13:23PM -0800, Christoph Hellwig wrote:
> > On Tue, Nov 19, 2024 at 12:45:05PM +1100, Dave Chinner wrote:
> > > Question for you: Does your $here directory contain a .git subdir?
> > >
> > > One of the causes of long runtime for me has been that $here might
> > > only contain 30MB of files, but the .git subdir balloons to several
> > > hundred MB over time, resulting is really long runtimes because it's
> > > copying GBs of data from the .git subdir.
> >
> > Or the results/ directory when run in a persistent test VM like the
> > one for quick runs on my laptop. I currently need to persistently
> > purge that for just this test.
Yeah, I use persistent VMs and that's why the .git dir grows...
> > > --- a/tests/generic/251
> > > +++ b/tests/generic/251
> > > @@ -175,9 +175,12 @@ nproc=20
> > > # Copy $here to the scratch fs and make coipes of the replica. The fstests
> > > # output (and hence $seqres.full) could be in $here, so we need to snapshot
> > > # $here before computing file checksums.
> > > +#
> > > +# $here/* as the files to copy so we avoid any .git directory that might be
> > > +# much, much larger than the rest of the fstests source tree we are copying.
> > > content=$SCRATCH_MNT/orig
> > > mkdir -p $content
> > > -cp -axT $here/ $content/
> > > +cp -ax $here/* $content/
> >
> > Maybe we just need a way to generate more predictable file system
> > content?
>
> How about running fsstress for ~50000ops or so, to generate some test
> files and directory tree?
Do we even need to do that? It's a set of small files distributed
over a few directories. There are few large files in the mix, so we
could just create a heap of 1-4 block files across a dozen or so
directories and get the same sort of data set to copy.
And given this observation, if we are generating the data set in the
first place, why use cp to copy it every time? Why not just have
each thread generate the data set on the fly?
# create a directory structure with numdirs directories and numfiles
# files per directory. Files are 0-3 blocks in length, space is
# allocated by fallocate to avoid needing to write data. Files are
# created concurrently across directories to create the data set as
# fast as possible.
create_files()
{
local numdirs=$1
local numfiles=$2
local basedir=$3
for ((i=0; i<$numdirs; i++)); do
mkdir -p $basedir/$i
for ((j=0; j<$numfiles; j++); do
local len=$((RANDOM % 4))
$XFS_IO_PROG -fc "falloc 0 ${len}b" $basedir/$i/$j
done &
done
wait
}
-Dave
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2024-11-19 21:04 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 23:01 [PATCHSET] fstests: random fixes for v2024.11.17 Darrick J. Wong
2024-11-18 23:01 ` [PATCH 01/12] generic/757: fix various bugs in this test Darrick J. Wong
2024-11-21 9:56 ` Zorro Lang
2024-11-21 10:05 ` Christoph Hellwig
2024-11-21 10:13 ` Christoph Hellwig
2024-11-21 10:52 ` Christoph Hellwig
2024-11-21 16:33 ` Darrick J. Wong
2024-11-21 17:19 ` Darrick J. Wong
2024-11-22 12:35 ` Christoph Hellwig
2024-11-21 12:28 ` Brian Foster
2024-11-21 13:12 ` Christoph Hellwig
2024-11-21 14:11 ` Brian Foster
2024-11-22 12:31 ` Christoph Hellwig
2024-11-22 13:49 ` Brian Foster
2024-11-22 16:13 ` Darrick J. Wong
2024-11-22 16:20 ` Christoph Hellwig
2024-11-22 16:33 ` Brian Foster
2024-11-22 16:37 ` Darrick J. Wong
2024-11-21 16:04 ` Darrick J. Wong
2024-11-22 12:34 ` Christoph Hellwig
2024-11-18 23:01 ` [PATCH 02/12] xfs/113: fix failure to corrupt the entire directory Darrick J. Wong
2024-11-18 23:02 ` [PATCH 03/12] xfs/508: fix test for 64k blocksize Darrick J. Wong
2024-11-18 23:02 ` [PATCH 04/12] common/rc: capture dmesg when oom kills happen Darrick J. Wong
2024-11-18 23:02 ` [PATCH 05/12] generic/562: handle ENOSPC while cloning gracefully Darrick J. Wong
2024-11-19 0:17 ` Filipe Manana
2024-11-19 0:31 ` Darrick J. Wong
2024-11-25 5:18 ` Darrick J. Wong
2024-11-18 23:02 ` [PATCH 06/12] xfs/163: skip test if we can't shrink due to enospc issues Darrick J. Wong
2024-11-19 6:11 ` Christoph Hellwig
2024-11-18 23:03 ` [PATCH 07/12] xfs/009: allow logically contiguous preallocations Darrick J. Wong
2024-11-19 6:11 ` Christoph Hellwig
2024-11-18 23:03 ` [PATCH 08/12] generic/251: use sentinel files to kill the fstrim loop Darrick J. Wong
2024-11-19 6:11 ` Christoph Hellwig
2024-11-18 23:03 ` [PATCH 09/12] generic/251: constrain runtime via time/load/soak factors Darrick J. Wong
2024-11-19 1:45 ` Dave Chinner
2024-11-19 6:13 ` Christoph Hellwig
2024-11-19 15:45 ` Darrick J. Wong
2024-11-19 21:04 ` Dave Chinner [this message]
2024-11-19 21:16 ` Darrick J. Wong
2024-11-19 15:50 ` Darrick J. Wong
2024-11-18 23:03 ` [PATCH 10/12] common/rc: _scratch_mkfs_sized supports extra arguments Darrick J. Wong
2024-11-18 23:04 ` [PATCH 11/12] xfs/157: do not drop necessary mkfs options Darrick J. Wong
2024-11-21 10:03 ` Zorro Lang
2024-11-18 23:04 ` [PATCH 12/12] xfs/157: fix test failures when MKFS_OPTIONS has -L options Darrick J. Wong
2024-11-21 10:17 ` Zorro Lang
2024-11-21 17:19 ` Darrick J. Wong
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=Zzz9a9RhImWP4F02@dread.disaster.area \
--to=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=zlang@redhat.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