-
Notifications
You must be signed in to change notification settings - Fork 222
/
perf-test.yaml
152 lines (135 loc) · 6.17 KB
/
perf-test.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
trigger: none
pr: none
stages:
- stage: Smallfiles
jobs:
- job: PerformanceTest
timeoutInMinutes: 720
strategy:
matrix:
Ubuntu-22:
imageName: "azcopyPerfTestUbuntu22.04"
Description: "AzCopy Perf Test"
pool:
name: "AzCopyPerfTestUbuntu"
demands:
- ImageOverride -equals $(imageName)
variables:
- group: AzCopyPerfTestTargets
- name: localPath
value: "/mnt/storage"
steps:
- script: |
echo $(Description)
hostnamectl
displayName: 'Print Agent Info'
- task: GoTool@0
inputs:
version: '1.23.1'
- script: |
go build -o $GOROOT/bin/azcopy
azcopy --version
displayName: 'Build Azcopy'
- script: |
time azcopy copy $(Blob2BlobSmallFilesSrc) $(Blob2BlobSmallFilesDst) --recursive --check-length=false --log-level=ERROR
displayName: 'Blob2Blob - Small Files'
condition: always()
env:
AZCOPY_AUTO_LOGIN_TYPE: $(AZCOPY_AUTO_LOGIN_TYPE)
AZCOPY_MSI_CLIENT_ID: $(AZCOPY_MSI_CLIENT_ID)
AZCOPY_LOG_LOCATION: $(Build.ArtifactStagingDirectory)/logs
AZCOPY_CONCURRENCY_VALUE: "256"
AZCOPY_SHOW_PERF_STATES: "1"
- script: |
time azcopy copy $(Blob2BlobSmallAndMedFilesSrc) $(Blob2BlobSmallAndMedFilesDst) --recursive --block-size-mb=128 --log-level=ERROR
displayName: 'Blob2Blob - Small to Medium sized files'
condition: always()
env:
AZCOPY_AUTO_LOGIN_TYPE: $(AZCOPY_AUTO_LOGIN_TYPE)
AZCOPY_MSI_CLIENT_ID: $(AZCOPY_MSI_CLIENT_ID)
AZCOPY_LOG_LOCATION: $(Build.ArtifactStagingDirectory)/logs
AZCOPY_CONCURRENCY_VALUE: "256"
AZCOPY_SHOW_PERF_STATES: "1"
- script: |
time azcopy copy $(Blob2BlobLargeFilesSrc) $(Blob2BlobLargeFilesDst) --recursive --block-size-mb=128 --log-level=ERROR --cap-mbps=40000
displayName: 'Blob2Blob - Large Files'
condition: always()
env:
AZCOPY_AUTO_LOGIN_TYPE: $(AZCOPY_AUTO_LOGIN_TYPE)
AZCOPY_MSI_CLIENT_ID: $(AZCOPY_MSI_CLIENT_ID)
AZCOPY_LOG_LOCATION: $(Build.ArtifactStagingDirectory)/logs
AZCOPY_CONCURRENCY_VALUE: "256"
AZCOPY_SHOW_PERF_STATES: "1"
- script: |
sudo mkdir -m 777 $(localPath)/smallFiles/
time azcopy copy $(Blob2BlobSmallFilesSrc) /dev/null --recursive --check-length=false --log-level=ERROR
displayName: 'Download - Small Files'
condition: always()
env:
AZCOPY_AUTO_LOGIN_TYPE: $(AZCOPY_AUTO_LOGIN_TYPE)
AZCOPY_MSI_CLIENT_ID: $(AZCOPY_MSI_CLIENT_ID)
AZCOPY_SHOW_PERF_STATES: "1"
AZCOPY_LOG_LOCATION: $(Build.ArtifactStagingDirectory)/logs
- script: |
time azcopy bench $(Blob2BlobSmallFilesDst) --size-per-file=5k --file-count=8000000 --check-length=false --log-level=ERROR --delete-test-data=false
sudo rm -rf $(localPath)/*
displayName: 'Upload - Small Files'
condition: always()
env:
AZCOPY_AUTO_LOGIN_TYPE: $(AZCOPY_AUTO_LOGIN_TYPE)
AZCOPY_MSI_CLIENT_ID: $(AZCOPY_MSI_CLIENT_ID)
AZCOPY_SHOW_PERF_STATES: "1"
AZCOPY_LOG_LOCATION: $(Build.ArtifactStagingDirectory)/logs
- script: |
sudo mkdir -m 777 $(localPath)/smallToMediumFiles/
time azcopy copy $(Blob2BlobSmallAndMedFilesSrc) $(localPath)/smallToMediumFiles --recursive --log-level=ERROR
displayName: 'Download - Small to Medium sized files'
condition: always()
env:
AZCOPY_AUTO_LOGIN_TYPE: $(AZCOPY_AUTO_LOGIN_TYPE)
AZCOPY_MSI_CLIENT_ID: $(AZCOPY_MSI_CLIENT_ID)
AZCOPY_SHOW_PERF_STATES: "1"
AZCOPY_LOG_LOCATION: $(Build.ArtifactStagingDirectory)/logs
- script: |
time azcopy copy $(localPath)/smallToMediumFiles/ $(Blob2BlobSmallAndMedFilesDst) --recursive --log-level=ERROR
sudo rm -rf $(localPath)/*
displayName: 'Upload - Small to Medium sized files'
condition: always()
env:
AZCOPY_AUTO_LOGIN_TYPE: $(AZCOPY_AUTO_LOGIN_TYPE)
AZCOPY_MSI_CLIENT_ID: $(AZCOPY_MSI_CLIENT_ID)
AZCOPY_SHOW_PERF_STATES: "1"
AZCOPY_LOG_LOCATION: $(Build.ArtifactStagingDirectory)/logs
- script: |
sudo mkdir -m 777 $(localPath)/largeFiles/
time azcopy copy $(Blob2BlobLargeFilesSrc) /dev/null --recursive --log-level=ERROR
displayName: 'Download - Large files'
condition: always()
env:
AZCOPY_AUTO_LOGIN_TYPE: $(AZCOPY_AUTO_LOGIN_TYPE)
AZCOPY_MSI_CLIENT_ID: $(AZCOPY_MSI_CLIENT_ID)
AZCOPY_SHOW_PERF_STATES: "1"
AZCOPY_LOG_LOCATION: $(Build.ArtifactStagingDirectory)/logs
- script: |
time azcopy bench $(Blob2BlobLargeFilesDst) --log-level=ERROR --size-per-file=50G --file-count=50 --put-md5=false --delete-test-data=false
sudo rm -rf $(localPath)/*
displayName: 'Upload - Large files'
condition: always()
env:
AZCOPY_AUTO_LOGIN_TYPE: $(AZCOPY_AUTO_LOGIN_TYPE)
AZCOPY_MSI_CLIENT_ID: $(AZCOPY_MSI_CLIENT_ID)
AZCOPY_SHOW_PERF_STATES: "1"
AZCOPY_LOG_LOCATION: $(Build.ArtifactStagingDirectory)/logs
- task: PublishBuildArtifacts@1
condition: always()
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: Logs
- script: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az login --identity --username $(AZCOPY_MSI_CLIENT_ID)
for container in `az storage container list --account-name $(DestinationAccount) --query "[*].[name]" --output tsv --auth-mode login`; do
az storage container delete --account-name $(DestinationAccount) --name $container --auth-mode login
done
displayName: 'Clean destination storage Account'
condition: always()