forked from Azure/azure-storage-fuse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
blobfuse2-perf.yaml
415 lines (364 loc) · 16.3 KB
/
blobfuse2-perf.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
schedules:
# Cron string < minute hour day-of-month month day-of-week>
# * means all like '*' in day of month means everyday
# Run only on main branch
# 'always' controls whether to run only if there is a change or not
# Run this pipeline every 15:00 time
- cron: '0 15 * * 6'
displayName: 'Weekly Perf Blobfuse2 Perf Run'
branches:
include:
- main
parameters:
- name: resnet_test
displayName: 'ResNet50 Test'
type: boolean
default: false
stages:
- stage: ShortRunning
jobs:
- job: PerformanceEval
timeoutInMinutes: 2800 # two day timeout
strategy:
matrix:
Ubuntu-20:
DistroVer: "Ubn20_PERF"
AgentName: "blobfuse-ubuntu20"
Description: "Blobfuse2 Perf Test"
pool:
name: "blobfuse-perf-pool"
demands:
- ImageOverride -equals $(AgentName)
variables:
- group: NightlyBlobFuse
- name: MOUNT_DIR
value: "/home/vsts/workv2/blobfuse2mnt"
- name: TEMP_DIR
value: "/mnt/blobfuse2tmp"
- name: BLOBFUSE2_CFG
value: "$(System.DefaultWorkingDirectory)/blobfuse2_manual_perf.yaml"
- name: BLOBFUSE2_FILE_CFG
value: "$(System.DefaultWorkingDirectory)/blobfuse2_file_perf.yaml"
- name: BLOBFUSE2_BLOCK_CFG
value: "$(System.DefaultWorkingDirectory)/blobfuse2_block_perf.yaml"
- name: BLOBFUSE_CFG
value: "$(System.DefaultWorkingDirectory)/blobfuse_manual_perf.cfg"
- name: GOPATH
value: "/home/vsts/workv2/go"
- name: ROOT_DIR
value: "/home/vsts/workv2/"
- name: WORK_DIR
value: "/home/vsts/workv2/go/src/azure-storage-fuse"
steps:
- checkout: none
- script: |
echo $(Description)
hostnamectl
displayName: 'Print Agent Info'
- script: |
df -h
displayName: 'Print Storage details'
- script: |
sudo apt-get update --fix-missing -o Dpkg::Options::="--force-confnew"
sudo apt-get install fuse3 make cmake gcc g++ python3-setuptools python3-pip parallel fio -y -o Dpkg::Options::="--force-confnew"
displayName: 'Install libraries'
- script: |
sudo apt-get install blobfuse -y -o Dpkg::Options::="--force-confnew"
displayName: 'Install blobfuse'
# Prestart cleanup
- script: |
sudo fusermount3 -u $(MOUNT_DIR)
sudo kill -9 `pidof blobfuse2`
sudo rm -rf $(ROOT_DIR)
displayName: 'PreBuild Cleanup'
# Create directory structure
- script: |
sudo rm -rf $(ROOT_DIR)
sudo mkdir -p $(ROOT_DIR)
sudo chown -R `whoami` $(ROOT_DIR)
chmod 777 $(ROOT_DIR)
mkdir -p $(ROOT_DIR)/go/src
sudo mkdir -p $(TEMP_DIR)
sudo chown -R `whoami` $(TEMP_DIR)
sudo chmod 777 $(TEMP_DIR)
displayName: 'Create Directory Structure'
# Checkout the code
- script: |
git clone https://github.com/Azure/azure-storage-fuse
displayName: 'Checkout Code'
workingDirectory: $(ROOT_DIR)/go/src
# Pull the branch
- script: |
git checkout `echo $(Build.SourceBranch) | cut -d "/" -f 1,2 --complement`
displayName: 'Checkout Branch'
workingDirectory: $(WORK_DIR)
# -------------------------------------------------------
# Pull and build the code
- template: 'azure-pipeline-templates/build.yml'
parameters:
working_directory: $(WORK_DIR)
root_dir: $(ROOT_DIR)
mount_dir: $(MOUNT_DIR)
temp_dir: $(TEMP_DIR)
gopath: $(GOPATH)
container: cont1
skip_ut: true
- script: |
cd $(WORK_DIR)
$(WORK_DIR)/blobfuse2 gen-test-config --config-file=azure_key_perf.yaml --container-name=cont1 --temp-path=$(TEMP_DIR) --output-file=$(BLOBFUSE2_CFG)
cat $(BLOBFUSE2_CFG)
displayName: "Generate v2 Config File"
env:
NIGHTLY_STO_ACC_NAME: $(PERF_WEEKLY_STO_BLOB_ACC_NAME)
NIGHTLY_STO_ACC_KEY: $(PERF_WEEKLY_STO_BLOB_ACC_KEY)
ACCOUNT_TYPE: 'block'
ACCOUNT_ENDPOINT: 'https://$(PERF_WEEKLY_STO_BLOB_ACC_NAME).blob.core.windows.net'
continueOnError: false
- script: |
cd $(WORK_DIR)
$(WORK_DIR)/blobfuse2 gen-test-config --config-file=azure_key_perf.yaml --container-name=cont1 --temp-path=$(TEMP_DIR) --output-file=$(BLOBFUSE2_FILE_CFG)
$(WORK_DIR)/blobfuse2 gen-test-config --config-file=azure_block_perf.yaml --container-name=cont1 --temp-path=$(TEMP_DIR) --output-file=$(BLOBFUSE2_BLOCK_CFG)
echo "---------------------------------------------------"
echo " File Cache config"
echo "---------------------------------------------------"
cat $(BLOBFUSE2_FILE_CFG)
echo "---------------------------------------------------"
echo " Block Cache config"
echo "---------------------------------------------------"
cat $(BLOBFUSE2_BLOCK_CFG)
echo "---------------------------------------------------"
displayName: "Generate v2 Config File for File vs Block"
env:
NIGHTLY_STO_ACC_NAME: $(PERF_WEEKLY_STO_BLOB_ACC_NAME)
NIGHTLY_STO_ACC_KEY: $(PERF_WEEKLY_STO_BLOB_ACC_KEY)
ACCOUNT_TYPE: 'block'
ACCOUNT_ENDPOINT: 'https://$(PERF_WEEKLY_STO_BLOB_ACC_NAME).blob.core.windows.net'
continueOnError: false
- script: |
touch $(BLOBFUSE_CFG)
echo "accountName $(PERF_WEEKLY_STO_BLOB_ACC_NAME)" >> $(BLOBFUSE_CFG)
echo "accountKey $(PERF_WEEKLY_STO_BLOB_ACC_KEY)" >> $(BLOBFUSE_CFG)
echo "authType Key" >> $(BLOBFUSE_CFG)
echo "containerName cont1" >> $(BLOBFUSE_CFG)
cat $(BLOBFUSE_CFG)
displayName: "Generate v1 Config File"
continueOnError: false
# --------------------------------------------------------------------------------------------
# Block vs File Tests
- script: |
chmod 777 ./test/scripts/file_block_compare.sh
rm -rf $(MOUNT_DIR)/fio/*
./test/scripts/file_block_compare.sh $(MOUNT_DIR)/fio $(TEMP_DIR) $(BLOBFUSE2_FILE_CFG) $(BLOBFUSE2_BLOCK_CFG) rw
displayName: 'Block-File Compare Test'
workingDirectory: $(WORK_DIR)
- script: |
echo "-----------------------------------------------------------------------------"
echo "Write test results with dd"
echo "-----------------------------------------------------------------------------"
cat file_block_write.txt
echo .
# echo "-----------------------------------------------------------------------------"
# echo "Read test results with dd"
# cat file_block_read_dd.txt
# echo .
echo "-----------------------------------------------------------------------------"
echo "Read test results with FIO"
echo "-----------------------------------------------------------------------------"
cat file_block_read.txt
echo .
echo "-----------------------------------------------------------------------------"
displayName: 'Block-File Compare Test'
workingDirectory: $(WORK_DIR)
# --------------------------------------------------------------------------------------------
# FIO Tests
- script: |
chmod 777 ./test/scripts/fio.sh
rm -rf $(MOUNT_DIR)/fio/*
./test/scripts/fio.sh $(MOUNT_DIR)/fio $(TEMP_DIR) $(BLOBFUSE2_CFG) $(BLOBFUSE_CFG) rw
displayName: 'FIO Sequential Test'
workingDirectory: $(WORK_DIR)
- script: |
cat results_fio_rw.txt
displayName: 'FIO Sequential Results'
workingDirectory: $(WORK_DIR)
- script: |
chmod 777 ./test/scripts/fio.sh
rm -rf $(MOUNT_DIR)/fio/*
./test/scripts/fio.sh $(MOUNT_DIR)/fio $(TEMP_DIR) $(BLOBFUSE2_CFG) $(BLOBFUSE_CFG) randrw
displayName: 'FIO Random Test'
workingDirectory: $(WORK_DIR)
- script: |
cat results_fio_randrw.txt
displayName: 'FIO Random Results'
workingDirectory: $(WORK_DIR)
- script: |
chmod 777 ./test/scripts/fio.sh
rm -rf $(MOUNT_DIR)/fio/*
./test/scripts/fio.sh $(MOUNT_DIR)/fio $(TEMP_DIR) $(BLOBFUSE2_CFG) $(BLOBFUSE_CFG) rw csi
displayName: 'FIO CSI Test'
workingDirectory: $(WORK_DIR)
- script: |
cat results_fio_rw.txt
displayName: 'FIO CSI Results'
workingDirectory: $(WORK_DIR)
# --------------------------------------------------------------------------------------------
# Upload-DownloadFIO Tests
- script: |
chmod 777 ./test/scripts/run.sh
./test/scripts/run.sh $(MOUNT_DIR)/run $(TEMP_DIR) $(BLOBFUSE2_CFG) $(BLOBFUSE_CFG) $(BLOBFUSE2_BLOCK_CFG)
displayName: 'Upload Download'
workingDirectory: $(WORK_DIR)
- script: |
cat results.txt
displayName: 'Upload Download Results'
workingDirectory: $(WORK_DIR)
# --------------------------------------------------------------------------------------------
# Git clone test
- script: |
chmod 777 ./test/scripts/git_clone.sh
./test/scripts/git_clone.sh $(MOUNT_DIR)/git $(TEMP_DIR) $(BLOBFUSE2_CFG) $(BLOBFUSE_CFG)
displayName: 'Git Clone'
workingDirectory: $(WORK_DIR)
- script: |
cat results_git_clone.txt
displayName: 'Git Clone Results'
workingDirectory: $(WORK_DIR)
- ${{ if eq(parameters.resnet_test, true) }}:
- stage: LongRunning
dependsOn: ShortRunning
jobs:
- job: ResNet50
timeoutInMinutes: 2800 # two day timeout
strategy:
matrix:
Ubuntu-20:
DistroVer: "Ubn20_PERF"
AgentName: "blobfuse-ubuntu20"
Description: "Blobfuse2 Perf Test"
pool:
name: "blobfuse-perf-pool"
demands:
- ImageOverride -equals $(AgentName)
variables:
- group: NightlyBlobFuse
- name: MOUNT_DIR
value: "/home/vsts/workv2/blob_mnt"
- name: TEMP_DIR
value: "/mnt/blobfuse2tmp"
- name: BLOBFUSE2_CFG
value: "$(System.DefaultWorkingDirectory)/blobfuse2_manual_perf.yaml"
- name: GOPATH
value: "/home/vsts/workv2/go"
- name: ROOT_DIR
value: "/home/vsts/workv2/"
- name: WORK_DIR
value: "/home/vsts/workv2/go/src/azure-storage-fuse"
steps:
- checkout: none
- script: |
sudo apt-get update --fix-missing -o Dpkg::Options::="--force-confnew"
sudo apt-get install fuse3 make cmake gcc g++ python3-setuptools python3-pip parallel fio -y -o Dpkg::Options::="--force-confnew"
displayName: 'Install libraries'
# Prestart cleanup
- script: |
sudo fusermount3 -u $(MOUNT_DIR)
sudo kill -9 `pidof blobfuse2`
sudo rm -rf $(ROOT_DIR)
displayName: 'PreBuild Cleanup'
# Create directory structure
- script: |
sudo rm -rf $(ROOT_DIR)
sudo mkdir -p $(ROOT_DIR)
sudo chown -R `whoami` $(ROOT_DIR)
chmod 777 $(ROOT_DIR)
mkdir -p $(ROOT_DIR)/go/src
sudo mkdir -p $(TEMP_DIR)
sudo chown -R `whoami` $(TEMP_DIR)
sudo chmod 777 $(TEMP_DIR)
displayName: 'Create Directory Structure'
# Checkout the code
- script: |
git clone https://github.com/Azure/azure-storage-fuse
displayName: 'Checkout Code'
workingDirectory: $(ROOT_DIR)/go/src
# Pull the branch
- script: |
git checkout `echo $(Build.SourceBranch) | cut -d "/" -f 1,2 --complement`
displayName: 'Checkout Branch'
workingDirectory: $(WORK_DIR)
# -------------------------------------------------------
# Pull and build the code
- template: 'azure-pipeline-templates/build.yml'
parameters:
working_directory: $(WORK_DIR)
root_dir: $(ROOT_DIR)
mount_dir: $(MOUNT_DIR)
temp_dir: $(TEMP_DIR)
gopath: $(GOPATH)
container: cont1
skip_ut: true
- script: |
cd $(ROOT_DIR)
pip install numpy tensorflow Pillow
displayName: "Install Python Dependencies"
continueOnError: false
- script: |
cd $(WORK_DIR)
$(WORK_DIR)/blobfuse2 gen-test-config --config-file=azure_key_perf.yaml --container-name=cont1 --temp-path=$(TEMP_DIR) --output-file=$(BLOBFUSE2_CFG)
cat $(BLOBFUSE2_CFG)
displayName: "Generate v2 Config File"
env:
NIGHTLY_STO_ACC_NAME: $(PERF_WEEKLY_STO_BLOB_ACC_NAME)
NIGHTLY_STO_ACC_KEY: $(PERF_WEEKLY_STO_BLOB_ACC_KEY)
ACCOUNT_TYPE: 'block'
ACCOUNT_ENDPOINT: 'https://$(PERF_WEEKLY_STO_BLOB_ACC_NAME).blob.core.windows.net'
continueOnError: false
- script: |
cd $(ROOT_DIR)
wget https://github.com/Azure/azure-storage-fuse/releases/download/blobfuse2-2.0.0-preview.1/blobfuse2-2.0.0-preview.1-ubuntu-20.04-x86-64.deb
sudo dpkg -i $(ROOT_DIR)/blobfuse2-2.0.0-preview.1-ubuntu-20.04-x86-64.deb
sudo apt-get install -f
sudo apt-get install fuse3
blobfuse2 mount $(MOUNT_DIR) --config-file=$(BLOBFUSE2_CFG) --default-working-dir=$(WORK_DIR)
sleep 10
cd $(WORK_DIR)
python3 $(WORK_DIR)/test/perf_test/resnet50_classify.py --dataset='$(MOUNT_DIR)/data' --job='binary' --log=$(ROOT_DIR)/blobfuse2-perf.json
displayName: "Blobfuse2 ResNet50 Binary"
continueOnError: false
- script: |
sudo fusermount3 -u ${MOUNT_DIR}
sudo kill -9 `pidof blobfuse2` || true
displayName: "Unmount Blobfuse2 Binary Run"
- script: |
cd $(WORK_DIR)
$(WORK_DIR)/blobfuse2 gen-test-config --config-file=azure_key.yaml --container-name=cont1 --temp-path=$(TEMP_DIR) --output-file=$(BLOBFUSE2_CFG)
$(WORK_DIR)/blobfuse2 mount $(MOUNT_DIR) --config-file=$(BLOBFUSE2_CFG) --default-working-dir=$(WORK_DIR)
sleep 10
python3 $(WORK_DIR)/test/perf_test/resnet50_classify.py --dataset='$(MOUNT_DIR)/data' --job='main' --log=$(ROOT_DIR)/blobfuse2-perf.json
displayName: "Blobfuse2 ResNet50 on Main"
env:
NIGHTLY_STO_ACC_NAME: $(PERF_WEEKLY_STO_BLOB_ACC_NAME)
NIGHTLY_STO_ACC_KEY: $(PERF_WEEKLY_STO_BLOB_ACC_KEY)
ACCOUNT_TYPE: 'block'
ACCOUNT_ENDPOINT: 'https://$(PERF_WEEKLY_STO_BLOB_ACC_NAME).blob.core.windows.net'
VERBOSE_LOG: false
USE_HTTP: false
continueOnError: false
- script: |
cd $(WORK_DIR)
python3 $(WORK_DIR)/test/perf_test/generate_perf_report.py --metrics=images/second --log=$(ROOT_DIR)/blobfuse2-perf.json
displayName: "Perf Regression Test"
continueOnError: false
- publish: $(ROOT_DIR)/blobfuse2-perf.json
artifact: Blobfuse2_performance_report
displayName: Publish Performance Report
- script: |
sudo fusermount3 -u ${MOUNT_DIR}
sudo kill -9 `pidof blobfuse2` || true
displayName: "Unmount Blobfuse2 Main Branch Run"
# Cleanup
- template: 'azure-pipeline-templates/cleanup.yml'
parameters:
working_dir: $(WORK_DIR)
mount_dir: $(MOUNT_DIR)
temp_dir: $(TEMP_DIR)