]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic/038: speed up file creation
authorDave Chinner <dchinner@redhat.com>
Mon, 21 Sep 2015 01:03:22 +0000 (11:03 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 21 Sep 2015 01:03:22 +0000 (11:03 +1000)
commitc9b9d5f6a95804fbbfbff60a23656d376cd3d2a4
treedbde642c678210e9d03d71370181a17c13b9961d
parente1efba7d17110d1f747ad2029307baf385e9225e
generic/038: speed up file creation

Now that generic/038 is running on my test machine, I notice how
slow it is:

generic/038      692s

11-12 minutes for a single test is way too long.
The test is creating
400,000 single block files, which can be easily parallelised and
hence run much faster than the test is currently doing.

Split the file creation up into 4 threads that create 100,000 files
each. 4 is chosen because XFS defaults to 4AGs, ext4 still has decent
speedups at 4 concurrent creates, and other filesystems aren't hurt
by excessive concurrency. The result:

generic/038      237s

on the same machine, which is roughly 3x faster and so it (just)
fast enough to to be considered acceptible.

[Eryu Guan: reduced number of files to minimum needed to reproduce
 btrfs problem reliably, added $LOAD_FACTOR scaling for longer
 running.]

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
tests/generic/038