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
+52-1Lines changed: 52 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ author: khdownie
5
5
ms.service: azure-file-storage
6
6
ms.custom: linux-related-content
7
7
ms.topic: conceptual
8
-
ms.date: 05/09/2024
8
+
ms.date: 01/22/2025
9
9
ms.author: kendownie
10
10
---
11
11
@@ -68,6 +68,57 @@ The following chart compares the time it takes to output results using unaliased
68
68
69
69
:::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":::
70
70
71
+
### Increase the number of hash buckets
72
+
73
+
The total amount of RAM present on the system doing the enumeration influences the internal working of filesystem protocols like NFS. Even if users aren't experiencing high memory usage, the amount of memory available influences the amount of hash buckets the system has, which impacts/improves enumeration performance for large directories. You can modify the amount of hash buckets the system has to reduce the hash collisions that can occur during large enumeration workloads.
74
+
75
+
To do this, you'll need to modify your boot configuration settings by providing an additional kernel command that takes effect during boot to increase the number of hash buckets. Follow these steps.
76
+
77
+
1. Edit the /etc/default/grub file.
78
+
79
+
```bash
80
+
sudo vim /etc/default/grub
81
+
```
82
+
83
+
1. Add the following text to the file. This command will set apart 128MB as the hash table size, increasing system memory consumption by a maximum of 128MB.
84
+
85
+
```bash
86
+
GRUB_CMDLINE_LINUX="ihash_entries=16777216"
87
+
```
88
+
89
+
If `GRUB_CMDLINE_LINUX` already exists, add `ihash_entries=16777216` separated by a space, like this:
When copying data from an NFS file share or backing up from NFS file shares to another location, for optimal performance we recommend using a share snapshot as the source instead of the live file share with active I/O. Backup applications should run commands on the snapshot directly. For more information, see [NFS file share snapshots](storage-files-how-to-mount-nfs-shares.md#nfs-file-share-snapshots).
0 commit comments