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/storage/files/nfs-large-directories.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn recommendations for working with large directories in NFS Azu
4
4
author: khdownie
5
5
ms.service: azure-file-storage
6
6
ms.topic: conceptual
7
-
ms.date: 03/12/2024
7
+
ms.date: 03/13/2024
8
8
ms.author: kendownie
9
9
---
10
10
@@ -28,11 +28,11 @@ The following mount options are specific to enumeration and can reduce latency w
28
28
29
29
Specifying `actimeo` sets all of `acregmin`, `acregmax`, `acdirmin`, and `acdirmax` to the same value. If `actimeo` isn't specified, the NFS client uses the defaults for each of these options.
30
30
31
-
We recommend setting `actimeo` higher than the default values. Setting a higher value (between 30 and 60 seconds) makes the attributes remain valid for a longer time period in the client's attribute cache, allowing operations to get file attributes from the cache instead of fetching them over the wire. Therefore, higher values can reduce latency in situations where the cached attributes expire while the operation is still running.
31
+
We recommend setting `actimeo` higher than the default values when working with large directories. Setting a higher value (between 30 and 60 seconds) makes the attributes remain valid for a longer time period in the client's attribute cache, allowing operations to get file attributes from the cache instead of fetching them over the wire. Therefore, higher values can reduce latency in situations where the cached attributes expire while the operation is still running.
32
32
33
-
The following graph compares the total time it takes to finish different operations with default mount versus setting an `actimeo` value of 30 for a workload that has 1 million files. The total completion time reduced by as much as 77% for some operations. All operations were done with [unaliased ls](#use-unaliased-ls).
33
+
The following graph compares the total time it takes to finish different operations with default mount versus setting an `actimeo` value of 30 for a workload that has 1 million files. In our testing, the total completion time reduced by as much as 77% for some operations. All operations were done with [unaliased ls](#use-unaliased-ls).
34
34
35
-
:::image type="content" source="media/nfs-large-directories/default-mount-versus-actimeo.png" alt-text="Graph comparing the time to finish different operations with default mount versus setting an actimeo value of 30 for a workload with 1 million files.":::
35
+
:::image type="content" source="media/nfs-large-directories/default-mount-versus-actimeo.png" alt-text="Graph comparing the time to finish different operations with default mount versus setting an actimeo value of 30 for a workload with 1 million files." border="false":::
36
36
37
37
### nconnect
38
38
@@ -59,13 +59,17 @@ In some Linux distributions, the shell automatically sets default options for th
59
59
60
60
When using `ls` with other commands, you can improve performance by preventing `ls` from sorting its output in situations where you don't care about the order that `ls` returns the files. Sorting the output adds significant overhead.
61
61
62
-
For example, instead of running `ls -l | wc -l` to get the total number of files, you can use the `-f` or `-U` options with `ls` to prevent the output from being sorted. The difference is that `-f` will also show hidden files, and `-U` won't.
62
+
Instead of running `ls -l | wc -l` to get the total number of files, you can use the `-f` or `-U` options with `ls` to prevent the output from being sorted. The difference is that `-f` will also show hidden files, and `-U` won't.
63
63
64
64
For example, if you're directly calling the `ls` binary in Ubuntu, you would run `/usr/bin/ls -1f | wc -l` or `/usr/bin/ls -1U | wc -l`.
65
65
66
+
The following chart compares the time it takes to output results using unaliased, unsorted `ls` versus sorted `ls`.
67
+
68
+
:::image type="content" source="media/nfs-large-directories/sorted-versus-unsorted-ls.png" alt-text="Graph comparing the total time in seconds to complete a sorted ls operation versus unsorted." border="false":::
69
+
66
70
## File copy and backup operations
67
71
68
-
When copying data from an NFS file share or backing up from NFS file shares to another location, we recommend using a share snapshot as the source instead of the live file share. Backup applications should run commands on the snapshot directly, because the snapshots aren't affected by any operations on the file share that are happening. For more information, see [NFS file share snapshots](storage-files-how-to-mount-nfs-shares.md#nfs-file-share-snapshots).
72
+
When copying data from an NFS file share or backing up from NFS file shares to another location, we recommend using a share snapshot as the source instead of the live file share. Backup applications should run commands on the snapshot directly, because the snapshots aren't affected by any operations on the file share. For more information, see [NFS file share snapshots](storage-files-how-to-mount-nfs-shares.md#nfs-file-share-snapshots).
0 commit comments