From 0021f3014cc0b070324692cd6245f1aa5422002f Mon Sep 17 00:00:00 2001 From: Yuke Peng Date: Thu, 18 Jul 2024 15:23:04 +0800 Subject: [PATCH] Add memory-related benchmarks --- test/benchmark/lmbench-mem-fcp/config.json | 5 +++++ .../benchmark/lmbench-mem-fcp/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-mem-fcp/run.sh | 9 +++++++++ test/benchmark/lmbench-mem-frd/config.json | 5 +++++ .../benchmark/lmbench-mem-frd/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-mem-frd/run.sh | 9 +++++++++ test/benchmark/lmbench-mem-fwr/config.json | 5 +++++ .../benchmark/lmbench-mem-fwr/result_template.json | 14 ++++++++++++++ test/benchmark/lmbench-mem-fwr/run.sh | 9 +++++++++ 9 files changed, 84 insertions(+) create mode 100644 test/benchmark/lmbench-mem-fcp/config.json create mode 100644 test/benchmark/lmbench-mem-fcp/result_template.json create mode 100644 test/benchmark/lmbench-mem-fcp/run.sh create mode 100644 test/benchmark/lmbench-mem-frd/config.json create mode 100644 test/benchmark/lmbench-mem-frd/result_template.json create mode 100644 test/benchmark/lmbench-mem-frd/run.sh create mode 100644 test/benchmark/lmbench-mem-fwr/config.json create mode 100644 test/benchmark/lmbench-mem-fwr/result_template.json create mode 100644 test/benchmark/lmbench-mem-fwr/run.sh diff --git a/test/benchmark/lmbench-mem-fcp/config.json b/test/benchmark/lmbench-mem-fcp/config.json new file mode 100644 index 000000000..762ccdcd8 --- /dev/null +++ b/test/benchmark/lmbench-mem-fcp/config.json @@ -0,0 +1,5 @@ +{ + "alert_threshold": "125%", + "pattern": "134.22", + "field": "2" +} diff --git a/test/benchmark/lmbench-mem-fcp/result_template.json b/test/benchmark/lmbench-mem-fcp/result_template.json new file mode 100644 index 000000000..7bee160ee --- /dev/null +++ b/test/benchmark/lmbench-mem-fcp/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average memory copy bandwidth on Linux", + "unit": "MB/s", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average memory copy bandwidth on Asterinas", + "unit": "MB/s", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-mem-fcp/run.sh b/test/benchmark/lmbench-mem-fcp/run.sh new file mode 100644 index 000000000..8a645a708 --- /dev/null +++ b/test/benchmark/lmbench-mem-fcp/run.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench memory-copy bandwidth test ***" + +/benchmark/bin/lmbench/bw_mem -P 1 128m fcp \ No newline at end of file diff --git a/test/benchmark/lmbench-mem-frd/config.json b/test/benchmark/lmbench-mem-frd/config.json new file mode 100644 index 000000000..4a7978e35 --- /dev/null +++ b/test/benchmark/lmbench-mem-frd/config.json @@ -0,0 +1,5 @@ +{ + "alert_threshold": "125%", + "pattern": "268.44", + "field": "2" +} diff --git a/test/benchmark/lmbench-mem-frd/result_template.json b/test/benchmark/lmbench-mem-frd/result_template.json new file mode 100644 index 000000000..22a0f9221 --- /dev/null +++ b/test/benchmark/lmbench-mem-frd/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average memory read bandwidth on Linux", + "unit": "MB/s", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average memory read bandwidth on Asterinas", + "unit": "MB/s", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-mem-frd/run.sh b/test/benchmark/lmbench-mem-frd/run.sh new file mode 100644 index 000000000..3e998800c --- /dev/null +++ b/test/benchmark/lmbench-mem-frd/run.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench memory-read bandwidth test ***" + +/benchmark/bin/lmbench/bw_mem -P 1 256m frd \ No newline at end of file diff --git a/test/benchmark/lmbench-mem-fwr/config.json b/test/benchmark/lmbench-mem-fwr/config.json new file mode 100644 index 000000000..4a7978e35 --- /dev/null +++ b/test/benchmark/lmbench-mem-fwr/config.json @@ -0,0 +1,5 @@ +{ + "alert_threshold": "125%", + "pattern": "268.44", + "field": "2" +} diff --git a/test/benchmark/lmbench-mem-fwr/result_template.json b/test/benchmark/lmbench-mem-fwr/result_template.json new file mode 100644 index 000000000..9b74462f9 --- /dev/null +++ b/test/benchmark/lmbench-mem-fwr/result_template.json @@ -0,0 +1,14 @@ +[ + { + "name": "Average memory write bandwidth on Linux", + "unit": "MB/s", + "value": 0, + "extra": "linux_avg" + }, + { + "name": "Average memory write bandwidth on Asterinas", + "unit": "MB/s", + "value": 0, + "extra": "aster_avg" + } +] \ No newline at end of file diff --git a/test/benchmark/lmbench-mem-fwr/run.sh b/test/benchmark/lmbench-mem-fwr/run.sh new file mode 100644 index 000000000..8770f1100 --- /dev/null +++ b/test/benchmark/lmbench-mem-fwr/run.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +set -e + +echo "*** Running the LMbench memory-write bandwidth test ***" + +/benchmark/bin/lmbench/bw_mem -P 1 256m fwr \ No newline at end of file