Skip to content

Commit 412e0a5

Browse files
authored
Merge pull request #2386 from kubernetes-sigs/optimize-azcopy-perf-1.31
[release-1.31] feat: optimize azcopy perf in volume snapshot restore and cloning
2 parents cf7d1f4 + 32f5f16 commit 412e0a5

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed
67 Bytes
Binary file not shown.

charts/latest/azurefile-csi-driver/templates/csi-azurefile-controller.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,12 @@ spec:
239239
{{- end }}
240240
- name: AZURE_GO_SDK_LOG_LEVEL
241241
value: {{ .Values.driver.azureGoSDKLogLevel }}
242+
- name: AZCOPY_CONCURRENCY_VALUE
243+
value: "10"
244+
- name: AZCOPY_CONCURRENT_FILES
245+
value: "20"
246+
- name: AZCOPY_BUFFER_GB
247+
value: "1"
242248
imagePullPolicy: {{ .Values.image.azurefile.pullPolicy }}
243249
volumeMounts:
244250
- mountPath: /csi

deploy/csi-azurefile-controller.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ spec:
166166
optional: true
167167
- name: CSI_ENDPOINT
168168
value: unix:///csi/csi.sock
169+
- name: AZCOPY_CONCURRENCY_VALUE
170+
value: "10"
171+
- name: AZCOPY_CONCURRENT_FILES
172+
value: "20"
173+
- name: AZCOPY_BUFFER_GB
174+
value: "1"
169175
volumeMounts:
170176
- mountPath: /csi
171177
name: socket-dir

pkg/azurefile/azurefile.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,9 @@ var (
204204
retriableErrors = []string{accountNotProvisioned, tooManyRequests, shareBeingDeleted, clientThrottled}
205205

206206
// azcopyCloneVolumeOptions used in volume cloning and set --check-length to false because volume data may be in changing state, copy volume is not same as current source volume
207-
azcopyCloneVolumeOptions = []string{"--recursive", "--check-length=false"}
207+
azcopyCloneVolumeOptions = []string{"--recursive", "--check-length=false", "--log-level=ERROR"}
208208
// azcopySnapshotRestoreOptions used in smb snapshot restore and set --check-length to true because snapshot data is changeless
209-
azcopySnapshotRestoreOptions = []string{"--recursive", "--check-length=true"}
209+
azcopySnapshotRestoreOptions = []string{"--recursive", "--check-length=true", "--log-level=ERROR"}
210210
)
211211

212212
// Driver implements all interfaces of CSI drivers

0 commit comments

Comments
 (0)