-
Notifications
You must be signed in to change notification settings - Fork 0
145 lines (143 loc) · 6.36 KB
/
benchmark-arm-old.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Arm benchmark
on:
workflow_dispatch:
jobs:
arm-benchmarks:
name: Self-hosted ARM64 benchmarks
runs-on: [self-hosted, ARM64]
# timeout-minutes: 120
steps:
- run: sudo apt-get update
if: ${{ always() }}
### Network tests
- name: Download indico resource test
if: ${{ always() }}
run: |
python3 -c 'from urllib.request import Request, urlopen; from pathlib import Path; Path("image_location.json").write_bytes(urlopen("https://api.charmhub.io/api/v1/resources/download/charm_18zuSzvljyQo6mJMWjcjN2nMm1TiWKCF.indico-image_179").read())'
export INDICO_IMAGE_NAME=($(jq -r '.ImageName' image_location.json))
export CHARMHUB_REGISTRY_USERNAME=($(jq -r '.Username' image_location.json))
export CHARMHUB_REGISTRY_PASSWORD=($(jq -r '.Password' image_location.json))
sudo apt-get -y install skopeo
sudo skopeo login registry.jujucharms.com -u $CHARMHUB_REGISTRY_USERNAME -p $CHARMHUB_REGISTRY_PASSWORD
for ((i=0; i<10; i++)); do
time sudo skopeo copy docker://$INDICO_IMAGE_NAME docker-archive:./indico_image.tar
rm -f ./indico_image.tar
done
sleep 1
- name: Network speed test
if: ${{ always() }}
run: |
wget https://github.com/librespeed/speedtest-cli/releases/download/v1.0.10/librespeed-cli_1.0.10_linux_arm64.tar.gz
tar -xvzf librespeed-cli_1.0.10_linux_arm64.tar.gz
echo "---network speed test start---"
./librespeed-cli
sleep 1
- name: Docker image pull speed (pull through cache)
if: ${{ always() }}
run: |
echo "---docker image pull speed test start (pull through cache)---"
for ((i=0; i<10; i++)); do
time docker pull busybox --quiet
docker system prune --all -f
done
sleep 1
- name: Docker image pull speed (no pull through cache)
if: ${{ always() }}
run: |
echo "---docker image pull speed test start (no cache)---"
for ((i=0; i<10; i++)); do
time docker pull registry.hub.docker.com/library/busybox --quiet
docker system prune --all -f
done
sleep 1
- name: Docker image pull speed (mysql)
if: ${{ always() }}
run: |
echo "---docker image pull speed test start (mysql)---"
for ((i=0; i<10; i++)); do
time docker pull ghcr.io/canonical/charmed-mysql@sha256:5082c99baa7a77c82d73247674e270838dc0a8165c02f7619cf5642d1427cba7 --quiet
docker system prune --all -f
done
sleep 1
### CPU TESTS
- name: CPU benchmarks
if: ${{ always() }}
run: |
sudo apt-get install sysbench -y
echo "---CPU benchmark test start---"
sysbench cpu run
sleep 1
- uses: canonical/[email protected]
if: ${{ always() }}
- name: Charmcraft pack speed
if: ${{ always() }}
run: |
lxd init --auto
sudo snap install charmcraft --classic
git clone https://github.com/canonical/github-runner-operator.git
cd github-runner-operator
# First launch
echo "First launch"
echo "---Charmcraft pack first launch test start---"
time sudo charmcraft pack
sleep 1
# Subsequent launches with cache
echo "---Charmcraft pack with cache start---"
for ((i=0; i<10; i++)); do
time sudo charmcraft pack
sleep 1
done
sleep 1
# Subsequent launches without cache
echo "---Charmcraft pack without cache start---"
for ((i=0; i<10; i++)); do
sudo charmcraft clean
time sudo charmcraft pack
done
sleep 1
- name: Postgresql charm deploy speed
if: ${{ always() }}
run: |
time sudo snap install juju
mkdir -p ~/.local/share/juju
time juju bootstrap localhost localhost
sleep 1
echo "---Postgresql charm deploy speed test start---"
for ((i=0; i<10; i++)); do
juju add-model test
juju deploy postgresql --channel 14/stable --constraints="arch=arm64"
time juju wait-for unit postgresql/0 --timeout=15m0s
juju destroy-model test --no-prompt --destroy-storage
done
sleep 1
- name: Postgresql charm download speed
if: ${{ always() }}
run: |
echo "---Postgresql charm download speed test start---"
for ((i=0; i<10; i++)); do
time (juju download postgresql --channel "14/stable"; snap download charmed-postgresql --channel "14/edge")
done
sleep 1
### DISK TESTS
- run: sudo apt install -y fio
if: ${{ always() }}
- name: seq write
if: ${{ always() }}
run: sudo fio --name=write_throughput --directory=/ --numjobs=4 --size=3G --time_based --runtime=60s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=1M --iodepth=64 --rw=write --group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64
- run: sudo rm -f /write* /read*
if: ${{ always() }}
- name: rand write
if: ${{ always() }}
run: sudo fio --name=write_iops --directory=/ --numjobs=4 --size=3G --time_based --runtime=60s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=4k --iodepth=256 --rw=randwrite --group_reporting=1 --iodepth_batch_submit=256 --iodepth_batch_complete_max=256
- run: sudo rm -f /write* /read*
if: ${{ always() }}
- name: seq read
if: ${{ always() }}
run: sudo fio --name=write_throughput --directory=/ --numjobs=4 --size=3G --time_based --runtime=60s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=1M --iodepth=64 --rw=read --group_reporting=1 --iodepth_batch_submit=64 --iodepth_batch_complete_max=64
- run: sudo rm -f /write* /read*
if: ${{ always() }}
- name: rand read
if: ${{ always() }}
run: sudo fio --name=write_iops --directory=/ --numjobs=4 --size=3G --time_based --runtime=60s --ramp_time=2s --ioengine=libaio --direct=1 --verify=0 --bs=4k --iodepth=256 --rw=randread --group_reporting=1 --iodepth_batch_submit=256 --iodepth_batch_complete_max=256
- run: sudo rm -f /write* /read*
if: ${{ always() }}