From 781cb179ff0e506137aef37c99beca6b30202ac1 Mon Sep 17 00:00:00 2001 From: Zejun Zhao Date: Fri, 13 Dec 2024 20:47:42 +0800 Subject: [PATCH] Add scheduler benchmarks to benchmark CI --- .github/workflows/benchmark_asterinas.yml | 9 ++++++++- test/Makefile | 2 ++ .../hackbench/group8_smp1/bench_result.json | 16 +++++++++++++++ test/benchmark/hackbench/group8_smp1/run.sh | 5 +++++ .../hackbench/group8_smp16/bench_result.json | 19 ++++++++++++++++++ test/benchmark/hackbench/group8_smp16/run.sh | 5 +++++ .../hackbench/group8_smp8/bench_result.json | 19 ++++++++++++++++++ test/benchmark/hackbench/group8_smp8/run.sh | 5 +++++ test/benchmark/hackbench/summary.json | 4 ++++ .../smp1/bench_results/p50_rps_smp1.json | 17 ++++++++++++++++ .../p99_request_latency_smp1.json | 17 ++++++++++++++++ .../p99_wakeup_latency_smp1.json | 17 ++++++++++++++++ test/benchmark/schbench/smp1/run.sh | 8 ++++++++ .../smp8/bench_results/p50_rps_smp1.json | 20 +++++++++++++++++++ .../p99_request_latency_smp1.json | 20 +++++++++++++++++++ .../p99_wakeup_latency_smp1.json | 20 +++++++++++++++++++ test/benchmark/schbench/smp8/run.sh | 8 ++++++++ test/benchmark/schbench/summary.json | 4 ++++ 18 files changed, 214 insertions(+), 1 deletion(-) create mode 100644 test/benchmark/hackbench/group8_smp1/bench_result.json create mode 100644 test/benchmark/hackbench/group8_smp1/run.sh create mode 100644 test/benchmark/hackbench/group8_smp16/bench_result.json create mode 100644 test/benchmark/hackbench/group8_smp16/run.sh create mode 100644 test/benchmark/hackbench/group8_smp8/bench_result.json create mode 100644 test/benchmark/hackbench/group8_smp8/run.sh create mode 100644 test/benchmark/hackbench/summary.json create mode 100644 test/benchmark/schbench/smp1/bench_results/p50_rps_smp1.json create mode 100644 test/benchmark/schbench/smp1/bench_results/p99_request_latency_smp1.json create mode 100644 test/benchmark/schbench/smp1/bench_results/p99_wakeup_latency_smp1.json create mode 100644 test/benchmark/schbench/smp1/run.sh create mode 100644 test/benchmark/schbench/smp8/bench_results/p50_rps_smp1.json create mode 100644 test/benchmark/schbench/smp8/bench_results/p99_request_latency_smp1.json create mode 100644 test/benchmark/schbench/smp8/bench_results/p99_wakeup_latency_smp1.json create mode 100644 test/benchmark/schbench/smp8/run.sh create mode 100644 test/benchmark/schbench/summary.json diff --git a/.github/workflows/benchmark_asterinas.yml b/.github/workflows/benchmark_asterinas.yml index 8bb06332..80237fdd 100644 --- a/.github/workflows/benchmark_asterinas.yml +++ b/.github/workflows/benchmark_asterinas.yml @@ -59,7 +59,7 @@ jobs: - fio/ext2_seq_read_bw - fio/ext2_seq_write_bw_no_iommu - fio/ext2_seq_read_bw_no_iommu - # Network-related benchmark + # Network-related benchmarks - lmbench/tcp_loopback_bw_4k - lmbench/tcp_loopback_bw_64k - lmbench/tcp_loopback_lat @@ -70,6 +70,13 @@ jobs: - lmbench/tcp_virtio_lat - lmbench/udp_loopback_lat - iperf3/tcp_virtio_bw + # Scheduler-related benchmarks + - hackbench/group8_smp1 + # FIXME: hackbench panics on multi-core settings now. + # - hackbench/group8_smp8 + # - hackbench/group8_smp16 + - schbench/smp1 + - schbench/smp8 # Nginx benchmarks - nginx/http_req10k_conc1_bw - nginx/http_req10k_conc20_bw diff --git a/test/Makefile b/test/Makefile index fee03f0d..f876de02 100644 --- a/test/Makefile +++ b/test/Makefile @@ -122,6 +122,8 @@ $(INITRAMFS)/benchmark/bin: @cp /usr/local/leveldb/benchmark/db_bench $@ @mv $@/db_bench $@/db_bench_leveldb @cp /usr/local/leveldb/benchmark/db_bench_sqlite3 $@ + @cp /usr/local/benchmark/hackbench $@ + @cp /usr/local/benchmark/schbench $@ # Make necessary directories. $(INITRAMFS_EMPTY_DIRS): diff --git a/test/benchmark/hackbench/group8_smp1/bench_result.json b/test/benchmark/hackbench/group8_smp1/bench_result.json new file mode 100644 index 00000000..0d9a9135 --- /dev/null +++ b/test/benchmark/hackbench/group8_smp1/bench_result.json @@ -0,0 +1,16 @@ +{ + "alert": { + "threshold": "130%", + "bigger_is_better": false + }, + "result_extraction": { + "search_pattern": "Time:", + "result_index": 2 + }, + "chart": { + "title": "[Scheduler] Turnaround time of 8 groups using 1 CPU", + "description": "hackbench -g 8 -l 1000 -p -T", + "unit": "sec", + "legend": "Turnaround time of hackbench on {system}" + } +} \ No newline at end of file diff --git a/test/benchmark/hackbench/group8_smp1/run.sh b/test/benchmark/hackbench/group8_smp1/run.sh new file mode 100644 index 00000000..e50432ea --- /dev/null +++ b/test/benchmark/hackbench/group8_smp1/run.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +/benchmark/bin/hackbench -g 8 -l 1000 -p -T diff --git a/test/benchmark/hackbench/group8_smp16/bench_result.json b/test/benchmark/hackbench/group8_smp16/bench_result.json new file mode 100644 index 00000000..6898995f --- /dev/null +++ b/test/benchmark/hackbench/group8_smp16/bench_result.json @@ -0,0 +1,19 @@ +{ + "alert": { + "threshold": "130%", + "bigger_is_better": false + }, + "result_extraction": { + "search_pattern": "Time:", + "result_index": 2 + }, + "chart": { + "title": "[Scheduler] Turnaround time of 8 groups using 16 CPU", + "description": "hackbench -g 8 -l 1000 -p -T", + "unit": "sec", + "legend": "Turnaround time of hackbench on {system}" + }, + "runtime_config": { + "smp": 16 + } +} \ No newline at end of file diff --git a/test/benchmark/hackbench/group8_smp16/run.sh b/test/benchmark/hackbench/group8_smp16/run.sh new file mode 100644 index 00000000..e50432ea --- /dev/null +++ b/test/benchmark/hackbench/group8_smp16/run.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +/benchmark/bin/hackbench -g 8 -l 1000 -p -T diff --git a/test/benchmark/hackbench/group8_smp8/bench_result.json b/test/benchmark/hackbench/group8_smp8/bench_result.json new file mode 100644 index 00000000..1801107d --- /dev/null +++ b/test/benchmark/hackbench/group8_smp8/bench_result.json @@ -0,0 +1,19 @@ +{ + "alert": { + "threshold": "130%", + "bigger_is_better": false + }, + "result_extraction": { + "search_pattern": "Time:", + "result_index": 2 + }, + "chart": { + "title": "[Scheduler] Turnaround time of 8 groups using 8 CPU", + "description": "hackbench -g 8 -l 1000 -p -T", + "unit": "sec", + "legend": "Turnaround time of hackbench on {system}" + }, + "runtime_config": { + "smp": 8 + } +} \ No newline at end of file diff --git a/test/benchmark/hackbench/group8_smp8/run.sh b/test/benchmark/hackbench/group8_smp8/run.sh new file mode 100644 index 00000000..e50432ea --- /dev/null +++ b/test/benchmark/hackbench/group8_smp8/run.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +/benchmark/bin/hackbench -g 8 -l 1000 -p -T diff --git a/test/benchmark/hackbench/summary.json b/test/benchmark/hackbench/summary.json new file mode 100644 index 00000000..335faa68 --- /dev/null +++ b/test/benchmark/hackbench/summary.json @@ -0,0 +1,4 @@ +{ + "benchmarks": [ + ] +} \ No newline at end of file diff --git a/test/benchmark/schbench/smp1/bench_results/p50_rps_smp1.json b/test/benchmark/schbench/smp1/bench_results/p50_rps_smp1.json new file mode 100644 index 00000000..200ecfc6 --- /dev/null +++ b/test/benchmark/schbench/smp1/bench_results/p50_rps_smp1.json @@ -0,0 +1,17 @@ +{ + "alert": { + "threshold": "130%", + "bigger_is_better": true + }, + "result_extraction": { + "search_pattern": "\\*", + "nth_occurrence": 3, + "result_index": 3 + }, + "chart": { + "title": "[Scheduler] P50 RPS while max-loading the only CPU", + "description": "schbench -F 256 -n 5 -r 90", + "unit": "requests per second", + "legend": "P50 RPS of schbench on {system}" + } +} \ No newline at end of file diff --git a/test/benchmark/schbench/smp1/bench_results/p99_request_latency_smp1.json b/test/benchmark/schbench/smp1/bench_results/p99_request_latency_smp1.json new file mode 100644 index 00000000..2331603d --- /dev/null +++ b/test/benchmark/schbench/smp1/bench_results/p99_request_latency_smp1.json @@ -0,0 +1,17 @@ +{ + "alert": { + "threshold": "130%", + "bigger_is_better": false + }, + "result_extraction": { + "search_pattern": "\\*", + "nth_occurrence": 2, + "result_index": 3 + }, + "chart": { + "title": "[Scheduler] P99 request latency while max-loading the only CPU", + "description": "schbench -F 256 -n 5 -r 90", + "unit": "\u00b5s", + "legend": "P99 request latency of schbench on {system}" + } +} \ No newline at end of file diff --git a/test/benchmark/schbench/smp1/bench_results/p99_wakeup_latency_smp1.json b/test/benchmark/schbench/smp1/bench_results/p99_wakeup_latency_smp1.json new file mode 100644 index 00000000..134a0c6b --- /dev/null +++ b/test/benchmark/schbench/smp1/bench_results/p99_wakeup_latency_smp1.json @@ -0,0 +1,17 @@ +{ + "alert": { + "threshold": "130%", + "bigger_is_better": false + }, + "result_extraction": { + "search_pattern": "\\*", + "nth_occurrence": 1, + "result_index": 3 + }, + "chart": { + "title": "[Scheduler] P99 wakeup latency while max-loading the only CPU", + "description": "schbench -F 256 -n 5 -r 90", + "unit": "\u00b5s", + "legend": "P99 wakeup latency of schbench on {system}" + } +} \ No newline at end of file diff --git a/test/benchmark/schbench/smp1/run.sh b/test/benchmark/schbench/smp1/run.sh new file mode 100644 index 00000000..9b62fd7f --- /dev/null +++ b/test/benchmark/schbench/smp1/run.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +RUNTIME=90 +REPORT_INTERVAL=$((RUNTIME+10)) + +/benchmark/bin/schbench -F 256 -n 5 -r $RUNTIME -i $REPORT_INTERVAL diff --git a/test/benchmark/schbench/smp8/bench_results/p50_rps_smp1.json b/test/benchmark/schbench/smp8/bench_results/p50_rps_smp1.json new file mode 100644 index 00000000..ee7d76ad --- /dev/null +++ b/test/benchmark/schbench/smp8/bench_results/p50_rps_smp1.json @@ -0,0 +1,20 @@ +{ + "alert": { + "threshold": "130%", + "bigger_is_better": true + }, + "result_extraction": { + "search_pattern": "\\*", + "nth_occurrence": 3, + "result_index": 3 + }, + "chart": { + "title": "[Scheduler] P50 RPS while max-loading the only CPU", + "description": "schbench -F 256 -n 5 -r 90", + "unit": "requests per second", + "legend": "P50 RPS of schbench on {system}" + }, + "runtime_config": { + "smp": 8 + } +} \ No newline at end of file diff --git a/test/benchmark/schbench/smp8/bench_results/p99_request_latency_smp1.json b/test/benchmark/schbench/smp8/bench_results/p99_request_latency_smp1.json new file mode 100644 index 00000000..98aa36ac --- /dev/null +++ b/test/benchmark/schbench/smp8/bench_results/p99_request_latency_smp1.json @@ -0,0 +1,20 @@ +{ + "alert": { + "threshold": "130%", + "bigger_is_better": false + }, + "result_extraction": { + "search_pattern": "\\*", + "nth_occurrence": 2, + "result_index": 3 + }, + "chart": { + "title": "[Scheduler] P99 request latency while max-loading the only CPU", + "description": "schbench -F 256 -n 5 -r 90", + "unit": "\u00b5s", + "legend": "P99 request latency of schbench on {system}" + }, + "runtime_config": { + "smp": 8 + } +} \ No newline at end of file diff --git a/test/benchmark/schbench/smp8/bench_results/p99_wakeup_latency_smp1.json b/test/benchmark/schbench/smp8/bench_results/p99_wakeup_latency_smp1.json new file mode 100644 index 00000000..2ea5eb06 --- /dev/null +++ b/test/benchmark/schbench/smp8/bench_results/p99_wakeup_latency_smp1.json @@ -0,0 +1,20 @@ +{ + "alert": { + "threshold": "130%", + "bigger_is_better": false + }, + "result_extraction": { + "search_pattern": "\\*", + "nth_occurrence": 1, + "result_index": 3 + }, + "chart": { + "title": "[Scheduler] P99 wakeup latency while max-loading the only CPU", + "description": "schbench -F 256 -n 5 -r 90", + "unit": "\u00b5s", + "legend": "P99 wakeup latency of schbench on {system}" + }, + "runtime_config": { + "smp": 8 + } +} \ No newline at end of file diff --git a/test/benchmark/schbench/smp8/run.sh b/test/benchmark/schbench/smp8/run.sh new file mode 100644 index 00000000..9b62fd7f --- /dev/null +++ b/test/benchmark/schbench/smp8/run.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +RUNTIME=90 +REPORT_INTERVAL=$((RUNTIME+10)) + +/benchmark/bin/schbench -F 256 -n 5 -r $RUNTIME -i $REPORT_INTERVAL diff --git a/test/benchmark/schbench/summary.json b/test/benchmark/schbench/summary.json new file mode 100644 index 00000000..335faa68 --- /dev/null +++ b/test/benchmark/schbench/summary.json @@ -0,0 +1,4 @@ +{ + "benchmarks": [ + ] +} \ No newline at end of file