summaryrefslogtreecommitdiff
path: root/Microbenchmarks/CPU-DPU/run-alloc.sh
blob: d3e509e13107019f2a5174c8c2e6cbe7878d2d6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash

trap 'pkill -f "stress -c 32"' INT

set -e

: > tinos-idle.txt
: > tinos-stress-c32.txt
: > tinos-nice-stress-c32.txt

for i in 1 2 4 8 16 32 48 64 80 96 112 $(seq 128 32 2543) 2543; do
	for j in $(seq 0 32); do
		echo $i/2543 $j/32
		./make-size.sh $j
		n_nops=$((j * 128))
		if make -B NR_DPUS=$i NR_TASKLETS=1 BL=10 DPU_BINARY=\'\"bin/dpu_size\"\'; then
			uptime
			for l in $(seq 1 40); do
				bin/host_code -w 1 -e 0 -x 1 -i 65536 -N $n_nops >> tinos-idle.txt || true
			done
			stress -c 32 &
			sleep 2
			uptime
			for l in $(seq 1 40); do
				bin/host_code -w 1 -e 0 -x 1 -i 65536 -N $n_nops >> tinos-stress-c32.txt || true
			done
			pkill -f 'stress -c 32'
			sleep 30
			nice stress -c 32 &
			sleep 2
			uptime
			for l in $(seq 1 40); do
				bin/host_code -w 1 -e 0 -x 1 -i 65536 -N $n_nops >> tinos-nice-stress-c32.txt || true
			done
			pkill -f 'stress -c 32'
			sleep 30
		fi
	done
done