* [PATCH] generic/072: limit max cpu number to 8 to avoid long run time and high system pressure
@ 2016-02-11 9:28 Eryu Guan
0 siblings, 0 replies; only message in thread
From: Eryu Guan @ 2016-02-11 9:28 UTC (permalink / raw)
To: fstests; +Cc: Eryu Guan
Right now generic/072 scales the loop count based on the cpu count. But
on hosts with many cpus(100+), generic/072 runs for hours and generates
very high system load.
Given that the original bug can be reproduced easily on unpatched
kernel, the great number of loops and long run time are not needed. So
limiting the cpu number to 8 (which gives around 20 seconds run time on
my test vm with 8 vcpus) seems reasonable.
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
tests/generic/072 | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/generic/072 b/tests/generic/072
index 6e59d84..ece71fb 100755
--- a/tests/generic/072
+++ b/tests/generic/072
@@ -51,6 +51,10 @@ _require_xfs_io_command "fcollapse"
testfile=$TEST_DIR/testfile.$seq
NCPUS=`$here/src/feature -o`
+# cap NCPUS to 8 at maximum to avoid long run time on hosts with many cpus
+if [ $NCPUS -gt 8 ]; then
+ NCPUS=8
+fi
OUTER_LOOPS=$((10 * $NCPUS * $LOAD_FACTOR))
INNER_LOOPS=$((50 * $NCPUS * $LOAD_FACTOR))
# fcollapse/truncate continuously and simultaneously a same file
--
2.5.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-02-11 9:29 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-11 9:28 [PATCH] generic/072: limit max cpu number to 8 to avoid long run time and high system pressure Eryu Guan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox