From 771dbb520cc51ca16c7762c8cf4fcdba08a64250 Mon Sep 17 00:00:00 2001 From: Vincent Fu Date: Mon, 18 May 2020 14:14:12 -0400 Subject: [PATCH] testing: use max-jobs to speed up testing Allocating fio's default memory footprint takes a few moments. Following https://www.spinics.net/lists/fio/msg08529.html, use the max-jobs option to reduce fio's memory footprint. This reduces the runtime of the full test suite by about 40s. Signed-off-by: Vincent Fu --- t/jsonplus2csv_test.py | 2 ++ t/latency_percentiles.py | 1 + t/readonly.py | 1 + t/run-fio-tests.py | 1 + t/steadystate_tests.py | 2 +- t/strided.py | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) diff --git a/t/jsonplus2csv_test.py b/t/jsonplus2csv_test.py index 34084b14..f01a9f32 100755 --- a/t/jsonplus2csv_test.py +++ b/t/jsonplus2csv_test.py @@ -53,6 +53,7 @@ def run_fio(fio): aio = 'posixaio' fio_args = [ + "--max-jobs=4", "--output=fio-output.json", "--output-format=json+", "--filename=fio_jsonplus_clat2csv.test", @@ -88,6 +89,7 @@ def check_output(fio_output, script_path): """ if fio_output.returncode != 0: + print("ERROR: fio run failed") return False if platform.system() == 'Windows': diff --git a/t/latency_percentiles.py b/t/latency_percentiles.py index 972e2642..6ce4579a 100755 --- a/t/latency_percentiles.py +++ b/t/latency_percentiles.py @@ -109,6 +109,7 @@ class FioLatTest(): """Run a test.""" fio_args = [ + "--max-jobs=16", "--name=latency", "--randrepeat=0", "--norandommap", diff --git a/t/readonly.py b/t/readonly.py index 43686c9c..464847c6 100755 --- a/t/readonly.py +++ b/t/readonly.py @@ -36,6 +36,7 @@ def parse_args(): def run_fio(fio, test, index): fio_args = [ + "--max-jobs=16", "--name=readonly", "--ioengine=null", "--time_based", diff --git a/t/run-fio-tests.py b/t/run-fio-tests.py index c12dee7a..763e0103 100755 --- a/t/run-fio-tests.py +++ b/t/run-fio-tests.py @@ -226,6 +226,7 @@ class FioJobTest(FioExeTest): self.json_data = None self.fio_output = "{0}.output".format(os.path.basename(self.fio_job)) self.fio_args = [ + "--max-jobs=16", "--output-format={0}".format(self.output_format), "--output={0}".format(self.fio_output), self.fio_job, diff --git a/t/steadystate_tests.py b/t/steadystate_tests.py index b55a67ac..e99b655c 100755 --- a/t/steadystate_tests.py +++ b/t/steadystate_tests.py @@ -122,7 +122,7 @@ if __name__ == '__main__': for job in reads: tf = "steadystate_job{0}.json".format(jobnum) - parameters = [ "--name=job{0}".format(jobnum) ] + parameters = [ "--max-jobs=16", "--name=job{0}".format(jobnum) ] parameters.extend([ "--thread", "--output-format=json", "--output={0}".format(tf), diff --git a/t/strided.py b/t/strided.py index aac15d10..6d34be8a 100755 --- a/t/strided.py +++ b/t/strided.py @@ -52,6 +52,7 @@ def parse_args(): def run_fio(fio, test, index): filename = "strided" fio_args = [ + "--max-jobs=16", "--name=strided", "--zonemode=strided", "--log_offset=1", -- 2.25.1