From 855e9e1e67ee0bad1d745565a4551d92610e571f Mon Sep 17 00:00:00 2001 From: Roman Maslennikov Date: Wed, 22 May 2024 19:00:24 +0400 Subject: [PATCH] taskset II --- .github/workflows/benchmarks.yml | 2 ++ scripts/benchmarking/run_all_benchmarks.sh | 30 +++++++++++++++++++--- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index c7a012077eb..0f237e47030 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -108,7 +108,9 @@ jobs: - name: print cpu flags run: | + echo "CPU cores: $(nproc)" cat /proc/cpuinfo | grep flags | head -n 1 + sleep 1 - name: Run all benchmarks run: | diff --git a/scripts/benchmarking/run_all_benchmarks.sh b/scripts/benchmarking/run_all_benchmarks.sh index 83da8da7f58..bf3b8ac5fdc 100755 --- a/scripts/benchmarking/run_all_benchmarks.sh +++ b/scripts/benchmarking/run_all_benchmarks.sh @@ -155,14 +155,38 @@ for PALLET in "${PALLETS[@]}"; do echo "[+] Benchmarking $PALLET with weight file $WEIGHT_FILE"; OUTPUT=$( - $GEAR benchmark pallet \ + tasket -c 8 $GEAR benchmark pallet \ --chain="$chain_spec" \ --steps=$BENCHMARK_STEPS \ --repeat=$BENCHMARK_REPEAT \ --pallet="$PALLET" \ --extrinsic="$(IFS=, ; echo "${EXTRINSICS[*]}")" \ --heap-pages=4096 \ - --output="$WEIGHT_FILE" \ + --output="./${WEIGHTS_OUTPUT}/${PALLET}_1_core.json" \ + --template=.maintain/dump_weights.hbs 2>&1 + ) + + OUTPUT=$( + taskset -c 3-8 $GEAR benchmark pallet \ + --chain="$chain_spec" \ + --steps=$BENCHMARK_STEPS \ + --repeat=$BENCHMARK_REPEAT \ + --pallet="$PALLET" \ + --extrinsic="$(IFS=, ; echo "${EXTRINSICS[*]}")" \ + --heap-pages=4096 \ + --output="./${WEIGHTS_OUTPUT}/${PALLET}_6_cores.json" \ + --template=.maintain/dump_weights.hbs 2>&1 + ) + + OUTPUT=$( + taskset -c 3-10 $GEAR benchmark pallet \ + --chain="$chain_spec" \ + --steps=$BENCHMARK_STEPS \ + --repeat=$BENCHMARK_REPEAT \ + --pallet="$PALLET" \ + --extrinsic="$(IFS=, ; echo "${EXTRINSICS[*]}")" \ + --heap-pages=4096 \ + --output="./${WEIGHTS_OUTPUT}/${PALLET}_8_cores.json" \ --template=.maintain/dump_weights.hbs 2>&1 ) @@ -176,7 +200,7 @@ for PALLET in "${PALLETS[@]}"; do then echo "[+] Benchmarking $PALLET one-time syscalls with weight file ./${WEIGHTS_OUTPUT}/${PALLET}_onetime.rs"; OUTPUT=$( - taskset -c 3-8 $GEAR benchmark pallet \ + $GEAR benchmark pallet \ --chain="$chain_spec" \ --steps=$BENCHMARK_STEPS_ONE_TIME_EXTRINSICS \ --repeat=$BENCHMARK_REPEAT_ONE_TIME_EXTRINSICS \