public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET v2 0/4] fstests: filesystem population fixes
@ 2023-01-18  0:42 Darrick J. Wong
  2023-01-18  0:43 ` [PATCH 1/4] populate: ensure btree directories are created reliably Darrick J. Wong
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Darrick J. Wong @ 2023-01-18  0:42 UTC (permalink / raw)
  To: djwong, zlang; +Cc: Dave Chinner, linux-xfs, fstests, guan, david

Hi all,

[original patchset cover letter from Dave]

common/populate operations are slow. They are not coded for
performance, and do things in very slow ways. Mainly doing loops to
create/remove files and forcing a task to be created and destroy for
every individual operation. We can only fork a few thousand
processes a second, whilst we can create or remove tens of thousands
of files a second. Hence population speed is limited by fork/exit
overhead, not filesystem speed. I also changed it to run all the
creation steps in parallel, which means they run as fast as the
filesystem can handle them rather than as fast as a single CPU can
handle them.

patch 1 and patch 3 address these issues for common/populate and
xfs/294.  I may update a bunch of other tests that use loop { touch
file } to create thousands of files to speed them up as well.

The other patch in this series (patch 2) fixes the problem with
populating an Xfs btree format directory, which currently fails
because the removal step that creates sparse directory data also
causes the dabtree index to get smaller and free blocks, taking the
inode from btree to extent format and hence failing the populate
checks.

More details are in the commit messages for change.

[further changes from Darrick]

This series moves the FMT_BTREE creation bugfix to be first in line,
since it's a bug fix.  Next, I convert the directory and xattr creation
loops into separate programs to reduce the execve overhead.  This alone
is sufficient for a 10x reduction in runtime without substantially
altering what gets written to disk and comes out in the xfs fsck fuzz
tests.

The last patch in this series starts parallelizing things, but I've left
most of that out since the parallelization patches make it harder to
reliably generate a filesystem image where we can fuzz a two-level inobt
and still mount the fs to run online fsck.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=fix-populate-slowness
---
 common/populate |   89 ++++++++++++++++++++++++++++++-------------------------
 src/popattr.py  |   62 ++++++++++++++++++++++++++++++++++++++
 src/popdir.pl   |   72 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 182 insertions(+), 41 deletions(-)
 create mode 100755 src/popattr.py
 create mode 100755 src/popdir.pl


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-01-20  5:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18  0:42 [PATCHSET v2 0/4] fstests: filesystem population fixes Darrick J. Wong
2023-01-18  0:43 ` [PATCH 1/4] populate: ensure btree directories are created reliably Darrick J. Wong
2023-01-18  0:44 ` [PATCH 2/4] populate: remove file creation loops that take forever Darrick J. Wong
2023-01-18 15:09   ` Zorro Lang
2023-01-18  0:44 ` [PATCH 3/4] populate: improve attr creation runtime Darrick J. Wong
2023-01-18 15:15   ` Zorro Lang
2023-01-18  0:44 ` [PATCH 4/4] populate: improve runtime of __populate_fill_fs Darrick J. Wong
2023-01-18 15:54   ` Zorro Lang
2023-01-18 19:22     ` Darrick J. Wong
2023-01-19  5:04       ` Zorro Lang
2023-01-19 16:19         ` Darrick J. Wong
2023-01-18 14:24 ` [PATCHSET v2 0/4] fstests: filesystem population fixes Andrey Albershteyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox