Skip to content

Commit 95c49a3

Browse files
Merge pull request #223430 from khdownie/kendownie010923
workaround for metadata heavy workloads
2 parents 3837113 + 73fcf84 commit 95c49a3

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

articles/storage/files/storage-troubleshooting-files-performance.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,22 @@ To determine whether most of your requests are metadata-centric, start by follow
7878

7979
![Screenshot of the metrics options for premium file shares, showing an "API name" property filter.](media/storage-troubleshooting-premium-fileshares/MetadataMetrics.png)
8080

81-
#### Workaround
81+
#### Workarounds
8282

8383
- Check to see whether the application can be modified to reduce the number of metadata operations.
84-
- Add a virtual hard disk (VHD) on the file share and mount the VHD from the client to perform file operations against the data. This approach works for single writer/reader scenarios or scenarios with multiple readers and no writers. Because the file system is owned by the client rather than Azure Files, this allows metadata operations to be local. The setup offers performance similar to that of local directly attached storage.
85-
- To mount a VHD on a Windows client, use the [`Mount-DiskImage`](/powershell/module/storage/mount-diskimage) PowerShell cmdlet.
86-
- To mount a VHD on Linux, consult the documentation for your Linux distribution. [Here's an example](https://man7.org/linux/man-pages/man5/nfs.5.html).
84+
- Separate the file share into multiple file shares within the same storage account.
85+
- Add a virtual hard disk (VHD) on the file share and mount the VHD from the client to perform file operations against the data. This approach works for single writer/reader scenarios or scenarios with multiple readers and no writers. Because the file system is owned by the client rather than Azure Files, this allows metadata operations to be local. The setup offers performance similar to that of local directly attached storage. However, because the data is in a VHD, it can't be accessed via any other means other than the SMB mount, such as REST API or through the Azure portal.
86+
1. From the machine which needs to access the Azure file share, mount the file share using the storage account key and map it to an available network drive (for example, Z:).
87+
1. Go to **Disk Management** and select **Action > Create VHD**.
88+
1. Set **Location** to the network drive that the Azure file share is mapped to, set **Virtual hard disk size** as needed, and select **Fixed size**.
89+
1. Select **OK**. Once the VHD creation is complete, it will automatically mount, and a new unallocated disk will appear.
90+
1. Right-click the new unknown disk and select **Initialize Disk**.
91+
1. Right-click the unallocated area and create a **New Simple Volume**.
92+
1. You should see a new drive letter appear in **Disk Management** representing this VHD with read/write access (for example, E:). In **File Explorer**, you should see the new VHD on the mapped Azure file share's network drive (Z: in this example). To be clear, there should be two drive letters present: the standard Azure file share network mapping on Z:, and the VHD mapping on the E: drive.
93+
1. There should be much better performance on heavy metadata operations against files on the VHD mapped drive (E:) versus the Azure file share mapped drive (Z:). If desired, it should be possible to disconnect the mapped network drive (Z:) and still access the mounted VHD drive (E:).
94+
95+
- To mount a VHD on a Windows client, you can also use the [`Mount-DiskImage`](/powershell/module/storage/mount-diskimage) PowerShell cmdlet.
96+
- To mount a VHD on Linux, consult the documentation for your Linux distribution. [Here's an example](https://man7.org/linux/man-pages/man5/nfs.5.html).
8797

8898
### Cause 3: Single-threaded application
8999

0 commit comments

Comments
 (0)