]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic/166: speed up on slow disks
authorDave Chinner <dchinner@redhat.com>
Wed, 11 Oct 2017 23:15:44 +0000 (10:15 +1100)
committerEryu Guan <eguan@redhat.com>
Thu, 12 Oct 2017 03:05:49 +0000 (11:05 +0800)
commit132f37916d2c5f64b857ecaf2072ce7891c5f5ba
tree5271ce78ff308b4613f1afef7e8a05f94ad9aaca
parent76ddf492fb0450a1203a1b9b40b0507c83eef4b2
generic/166: speed up on slow disks

generic/166 is takes way too long to run on iscsi disks - over an
*hour* on flash based iscsi targets. In comparison, it takes 18s to
run on a pmem device.

The issue is that it takes 3-4s per file write cycle on slow disks,
and it does a thousand write cycles. The problem is taht reflink is
so much faster than the write cycle that it's doing many more
snapshots on slow disks than fast disks, and this slows it down even
more.

e.g. the pmem system that takes 18s to run does just under 1000
snapshots - roughly one per file write. 20 minutes into the iscsi
based test, it's only done ~300 write cycles but there are almost
10,000 snapshots been taken. IOWs, we're doing 30 snapshots a file
write, not ~1.

Fix this by rate limiting snapshots to at most 1 per whole file
write. This reduces the number of snapshots taken on fast devices by
~50% (runtime on pmem device went from 18s -> 8s) but reduced it to
1000 on slow devices and reduced runtime from 3671s to just 311s.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/generic/166