From c7404f8139cb8b64e674f2adcf4952d502e1a4f4 Mon Sep 17 00:00:00 2001 From: Shaowei Song Date: Fri, 8 Nov 2024 05:28:08 +0000 Subject: [PATCH] Add several FIO tests to the benchmark CI --- .github/workflows/benchmark_asterinas.yml | 4 ++++ .../fio/ext2_iommu_seq_read_bw/config.json | 9 +++++++++ .../ext2_iommu_seq_read_bw/result_template.json | 14 ++++++++++++++ test/benchmark/fio/ext2_iommu_seq_read_bw/run.sh | 12 ++++++++++++ .../fio/ext2_iommu_seq_write_bw/config.json | 9 +++++++++ .../ext2_iommu_seq_write_bw/result_template.json | 14 ++++++++++++++ test/benchmark/fio/ext2_iommu_seq_write_bw/run.sh | 12 ++++++++++++ test/benchmark/fio/ext2_seq_read_bw/config.json | 8 ++++++++ .../fio/ext2_seq_read_bw/result_template.json | 14 ++++++++++++++ test/benchmark/fio/ext2_seq_read_bw/run.sh | 12 ++++++++++++ test/benchmark/fio/ext2_seq_write_bw/config.json | 8 ++++++++ .../fio/ext2_seq_write_bw/result_template.json | 14 ++++++++++++++ test/benchmark/fio/ext2_seq_write_bw/run.sh | 12 ++++++++++++ test/benchmark/fio/summary.json | 8 ++++++++ .../lmbench/ext2_copy_files_bw/config.json | 2 +- 15 files changed, 151 insertions(+), 1 deletion(-) create mode 100644 test/benchmark/fio/ext2_iommu_seq_read_bw/config.json create mode 100644 test/benchmark/fio/ext2_iommu_seq_read_bw/result_template.json create mode 100644 test/benchmark/fio/ext2_iommu_seq_read_bw/run.sh create mode 100644 test/benchmark/fio/ext2_iommu_seq_write_bw/config.json create mode 100644 test/benchmark/fio/ext2_iommu_seq_write_bw/result_template.json create mode 100644 test/benchmark/fio/ext2_iommu_seq_write_bw/run.sh create mode 100644 test/benchmark/fio/ext2_seq_read_bw/config.json create mode 100644 test/benchmark/fio/ext2_seq_read_bw/result_template.json create mode 100644 test/benchmark/fio/ext2_seq_read_bw/run.sh create mode 100644 test/benchmark/fio/ext2_seq_write_bw/config.json create mode 100644 test/benchmark/fio/ext2_seq_write_bw/result_template.json create mode 100644 test/benchmark/fio/ext2_seq_write_bw/run.sh create mode 100644 test/benchmark/fio/summary.json diff --git a/.github/workflows/benchmark_asterinas.yml b/.github/workflows/benchmark_asterinas.yml index 373a90b6c..396abfaa6 100644 --- a/.github/workflows/benchmark_asterinas.yml +++ b/.github/workflows/benchmark_asterinas.yml @@ -54,6 +54,10 @@ jobs: - lmbench/ext2_create_delete_files_0k_ops - lmbench/ext2_create_delete_files_10k_ops - lmbench/ext2_copy_files_bw + - fio/ext2_seq_write_bw + - fio/ext2_seq_read_bw + - fio/ext2_iommu_seq_write_bw + - fio/ext2_iommu_seq_read_bw # Network-related benchmark - lmbench/tcp_loopback_bw_4k - lmbench/tcp_loopback_bw_64k diff --git a/test/benchmark/fio/ext2_iommu_seq_read_bw/config.json b/test/benchmark/fio/ext2_iommu_seq_read_bw/config.json new file mode 100644 index 000000000..a6865298f --- /dev/null +++ b/test/benchmark/fio/ext2_iommu_seq_read_bw/config.json @@ -0,0 +1,9 @@ +{ + "alert_threshold": "125%", + "alert_tool": "customBiggerIsBetter", + "search_pattern": "bw=", + "result_index": "2", + "description": "fio -filename=/ext2/fio-test -size=1G -bs=1M -direct=1", + "title": "[Ext2] The bandwidth of sequential reads (IOMMU enabled on Asterinas)", + "aster_scheme": "iommu" +} \ No newline at end of file diff --git a/test/benchmark/fio/ext2_iommu_seq_read_bw/result_template.json b/test/benchmark/fio/ext2_iommu_seq_read_bw/result_template.json new file mode 100644 index 000000000..b582df449 --- /dev/null +++ b/test/benchmark/fio/ext2_iommu_seq_read_bw/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average file read bandwidth on Linux", + "unit": "MB/s", + "value": 0, + "extra": "linux_result" + }, + { + "name": "Average file read bandwidth on Asterinas", + "unit": "MB/s", + "value": 0, + "extra": "aster_result" + } +] \ No newline at end of file diff --git a/test/benchmark/fio/ext2_iommu_seq_read_bw/run.sh b/test/benchmark/fio/ext2_iommu_seq_read_bw/run.sh new file mode 100644 index 000000000..fdf4c42d6 --- /dev/null +++ b/test/benchmark/fio/ext2_iommu_seq_read_bw/run.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the FIO sequential read test (Ext2) ***" + +/benchmark/bin/fio -rw=read -filename=/ext2/fio-test -name=seqread \ +-size=1G -bs=1M \ +-ioengine=sync -direct=1 -numjobs=1 -fsync_on_close=1 \ +-time_based=1 -runtime=60 \ No newline at end of file diff --git a/test/benchmark/fio/ext2_iommu_seq_write_bw/config.json b/test/benchmark/fio/ext2_iommu_seq_write_bw/config.json new file mode 100644 index 000000000..463f7188b --- /dev/null +++ b/test/benchmark/fio/ext2_iommu_seq_write_bw/config.json @@ -0,0 +1,9 @@ +{ + "alert_threshold": "125%", + "alert_tool": "customBiggerIsBetter", + "search_pattern": "bw=", + "result_index": "2", + "description": "fio -filename=/ext2/fio-test -size=1G -bs=1M -direct=1", + "title": "[Ext2] The bandwidth of sequential writes (IOMMU enabled on Asterinas)", + "aster_scheme": "iommu" +} \ No newline at end of file diff --git a/test/benchmark/fio/ext2_iommu_seq_write_bw/result_template.json b/test/benchmark/fio/ext2_iommu_seq_write_bw/result_template.json new file mode 100644 index 000000000..068dbc7b0 --- /dev/null +++ b/test/benchmark/fio/ext2_iommu_seq_write_bw/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average file write bandwidth on Linux", + "unit": "MB/s", + "value": 0, + "extra": "linux_result" + }, + { + "name": "Average file write bandwidth on Asterinas", + "unit": "MB/s", + "value": 0, + "extra": "aster_result" + } +] \ No newline at end of file diff --git a/test/benchmark/fio/ext2_iommu_seq_write_bw/run.sh b/test/benchmark/fio/ext2_iommu_seq_write_bw/run.sh new file mode 100644 index 000000000..f6c22fa8b --- /dev/null +++ b/test/benchmark/fio/ext2_iommu_seq_write_bw/run.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the FIO sequential write test (Ext2) ***" + +/benchmark/bin/fio -rw=write -filename=/ext2/fio-test -name=seqwrite \ +-size=1G -bs=1M \ +-ioengine=sync -direct=1 -numjobs=1 -fsync_on_close=1 \ +-time_based=1 -runtime=60 \ No newline at end of file diff --git a/test/benchmark/fio/ext2_seq_read_bw/config.json b/test/benchmark/fio/ext2_seq_read_bw/config.json new file mode 100644 index 000000000..6ae6330ff --- /dev/null +++ b/test/benchmark/fio/ext2_seq_read_bw/config.json @@ -0,0 +1,8 @@ +{ + "alert_threshold": "125%", + "alert_tool": "customBiggerIsBetter", + "search_pattern": "bw=", + "result_index": "2", + "description": "fio -filename=/ext2/fio-test -size=1G -bs=1M -direct=1", + "title": "[Ext2] The bandwidth of sequential reads" +} \ No newline at end of file diff --git a/test/benchmark/fio/ext2_seq_read_bw/result_template.json b/test/benchmark/fio/ext2_seq_read_bw/result_template.json new file mode 100644 index 000000000..b582df449 --- /dev/null +++ b/test/benchmark/fio/ext2_seq_read_bw/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average file read bandwidth on Linux", + "unit": "MB/s", + "value": 0, + "extra": "linux_result" + }, + { + "name": "Average file read bandwidth on Asterinas", + "unit": "MB/s", + "value": 0, + "extra": "aster_result" + } +] \ No newline at end of file diff --git a/test/benchmark/fio/ext2_seq_read_bw/run.sh b/test/benchmark/fio/ext2_seq_read_bw/run.sh new file mode 100644 index 000000000..fdf4c42d6 --- /dev/null +++ b/test/benchmark/fio/ext2_seq_read_bw/run.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the FIO sequential read test (Ext2) ***" + +/benchmark/bin/fio -rw=read -filename=/ext2/fio-test -name=seqread \ +-size=1G -bs=1M \ +-ioengine=sync -direct=1 -numjobs=1 -fsync_on_close=1 \ +-time_based=1 -runtime=60 \ No newline at end of file diff --git a/test/benchmark/fio/ext2_seq_write_bw/config.json b/test/benchmark/fio/ext2_seq_write_bw/config.json new file mode 100644 index 000000000..6492e0361 --- /dev/null +++ b/test/benchmark/fio/ext2_seq_write_bw/config.json @@ -0,0 +1,8 @@ +{ + "alert_threshold": "125%", + "alert_tool": "customBiggerIsBetter", + "search_pattern": "bw=", + "result_index": "2", + "description": "fio -filename=/ext2/fio-test -size=1G -bs=1M -direct=1", + "title": "[Ext2] The bandwidth of sequential writes" +} \ No newline at end of file diff --git a/test/benchmark/fio/ext2_seq_write_bw/result_template.json b/test/benchmark/fio/ext2_seq_write_bw/result_template.json new file mode 100644 index 000000000..068dbc7b0 --- /dev/null +++ b/test/benchmark/fio/ext2_seq_write_bw/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average file write bandwidth on Linux", + "unit": "MB/s", + "value": 0, + "extra": "linux_result" + }, + { + "name": "Average file write bandwidth on Asterinas", + "unit": "MB/s", + "value": 0, + "extra": "aster_result" + } +] \ No newline at end of file diff --git a/test/benchmark/fio/ext2_seq_write_bw/run.sh b/test/benchmark/fio/ext2_seq_write_bw/run.sh new file mode 100644 index 000000000..f6c22fa8b --- /dev/null +++ b/test/benchmark/fio/ext2_seq_write_bw/run.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the FIO sequential write test (Ext2) ***" + +/benchmark/bin/fio -rw=write -filename=/ext2/fio-test -name=seqwrite \ +-size=1G -bs=1M \ +-ioengine=sync -direct=1 -numjobs=1 -fsync_on_close=1 \ +-time_based=1 -runtime=60 \ No newline at end of file diff --git a/test/benchmark/fio/summary.json b/test/benchmark/fio/summary.json new file mode 100644 index 000000000..284a4a70d --- /dev/null +++ b/test/benchmark/fio/summary.json @@ -0,0 +1,8 @@ +{ + "benchmarks": [ + "ext2_seq_write_bw", + "ext2_seq_read_bw", + "ext2_iommu_seq_write_bw", + "ext2_iommu_seq_read_bw" + ] +} \ No newline at end of file diff --git a/test/benchmark/lmbench/ext2_copy_files_bw/config.json b/test/benchmark/lmbench/ext2_copy_files_bw/config.json index bb87a7b3d..779d691b4 100644 --- a/test/benchmark/lmbench/ext2_copy_files_bw/config.json +++ b/test/benchmark/lmbench/ext2_copy_files_bw/config.json @@ -4,5 +4,5 @@ "search_pattern": "lmdd result:", "result_index": "8", "description": "lmdd", - "title": "[EXT2] The bandwidth of copying data between files" + "title": "[Ext2] The bandwidth of copying data between files" } \ No newline at end of file