You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/azure-files-csi.md
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Use Container Storage Interface (CSI) driver for Azure Files on Azure Kub
3
3
description: Learn how to use the Container Storage Interface (CSI) driver for Azure Files in an Azure Kubernetes Service (AKS) cluster.
4
4
ms.topic: article
5
5
ms.custom: devx-track-linux
6
-
ms.date: 04/19/2023
6
+
ms.date: 09/12/2023
7
7
---
8
8
9
9
# Use Azure Files Container Storage Interface (CSI) driver in Azure Kubernetes Service (AKS)
@@ -313,6 +313,33 @@ This option is optimized for random access workloads with in-place data updates
313
313
> [!NOTE]
314
314
> You can use a private endpoint instead of allowing access to the selected VNet.
315
315
316
+
### Optimizing read and write size options
317
+
318
+
This section provides information about how to approach performance tuning NFS with the Azure Files CSI driver with the *rsize* and *wsize* options. The rsize and wsize options set the maximum transfer size of an NFS operation. If rsize or wsize are not specified on mount, the client and server negotiate the largest size supported by the two. Currently, both Azure NetApp Files and modern Linux distributions support read and write sizes as large as 1,048,576 Bytes (1 MiB).
319
+
320
+
Optimal performance is based on efficient client-server communication. Increasing or decreasing the **mount** read and write option size values can improve NFS performance. The default size of the read/write packets transferred between client and server are 8 KB for NFS version 2, and 32 KB for NFS version 3 and 4. These defaults may be too large or too small. Reducing the rsize and wsize might improve NFS performance in a congested network by sending smaller packets for each NFS-read reply and write request. However, this can increase the number of packets needed to send data across the network, increasing total network traffic and CPU utilization on the client and server.
321
+
322
+
It's important that you perform testing to find an rsize and wsize that sustains efficent packet transfer, where it doesn't decrease throughput and increase latency.
323
+
324
+
For more information on optimizing rsize and wsize, see [Linux NFS mount options best practices for Azure NetApp Files][azure-netapp-files-mount-options-best-practices].
325
+
326
+
For example, to configure a maximum *rsize* and *wsize* of 256-KiB, configure the `mountOptions` in the storage class as follows:
327
+
328
+
```yml
329
+
apiVersion: storage.k8s.io/v1
330
+
kind: StorageClass
331
+
metadata:
332
+
name: azurefile-csi-nfs
333
+
provisioner: file.csi.azure.com
334
+
allowVolumeExpansion: true
335
+
parameters:
336
+
protocol: nfs
337
+
mountOptions:
338
+
- nconnect=4
339
+
- rsize=262144
340
+
- wsize=262144
341
+
```
342
+
316
343
### Create NFS file share storage class
317
344
318
345
Create a file named `nfs-sc.yaml` and copy the manifest below.
@@ -481,3 +508,4 @@ The output of the commands resembles the following example:
0 commit comments