Skip to content

Commit f3af121

Browse files
Merge pull request #257276 from khdownie/kendownie-metadata-caching
Azure Files metadata caching
2 parents 76debc1 + 29317c0 commit f3af121

File tree

4 files changed

+68
-6
lines changed

4 files changed

+68
-6
lines changed
36.1 KB
Loading
32.5 KB
Loading
36.5 KB
Loading

articles/storage/files/smb-performance.md

Lines changed: 68 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
---
22
title: SMB performance - Azure Files
3-
description: Learn about different ways to improve performance for SMB Azure file shares, including SMB Multichannel.
3+
description: Learn about different ways to improve performance for premium SMB Azure file shares, including SMB Multichannel and metadata caching.
44
author: khdownie
55
ms.service: azure-file-storage
66
ms.topic: conceptual
7-
ms.date: 08/31/2023
7+
ms.date: 01/26/2024
88
ms.author: kendownie
9+
ms.custom: references_regions
910
---
1011

1112
# Improve SMB Azure file share performance
12-
This article explains how you can improve performance for SMB Azure file shares, including using SMB Multichannel.
13+
14+
This article explains how you can improve performance for premium SMB Azure file shares, including using SMB Multichannel and metadata caching.
1315

1416
## Applies to
17+
1518
| File share type | SMB | NFS |
1619
|-|:-:|:-:|
1720
| Standard file shares (GPv2), LRS/ZRS | ![No](../media/icons/no-icon.png) | ![No](../media/icons/no-icon.png) |
@@ -22,7 +25,7 @@ This article explains how you can improve performance for SMB Azure file shares,
2225

2326
The following tips might help you optimize performance:
2427

25-
- Ensure that your storage account and your client are colocated in the same Azure region to reduce network latency.
28+
- Ensure that your storage account and your client are co-located in the same Azure region to reduce network latency.
2629
- Use multi-threaded applications and spread load across multiple files.
2730
- Performance benefits of SMB Multichannel increase with the number of files distributing load.
2831
- Premium share performance is bound by provisioned share size (IOPS/egress/ingress) and single file limits. For details, see [Understanding provisioning for premium file shares](understanding-billing.md#provisioned-model).
@@ -37,9 +40,11 @@ The following tips might help you optimize performance:
3740
Higher I/O sizes drive higher throughput and will have higher latencies, resulting in a lower number of net IOPS. Smaller I/O sizes will drive higher IOPS, but will result in lower net throughput and latencies. To learn more, see [Understand Azure Files performance](understand-performance.md).
3841

3942
## SMB Multichannel
43+
4044
SMB Multichannel enables an SMB 3.x client to establish multiple network connections to an SMB file share. Azure Files supports SMB Multichannel on premium file shares (file shares in the FileStorage storage account kind) for Windows clients. On the service side, SMB Multichannel is disabled by default in Azure Files, but there's no additional cost for enabling it.
4145

4246
### Benefits
47+
4348
SMB Multichannel enables clients to use multiple network connections that provide increased performance while lowering the cost of ownership. Increased performance is achieved through bandwidth aggregation over multiple NICs and utilizing Receive Side Scaling (RSS) support for NICs to distribute the I/O load across multiple CPUs.
4449

4550
- **Increased throughput**:
@@ -58,15 +63,18 @@ To learn more about SMB Multichannel, refer to the [Windows documentation](/azur
5863
This feature provides greater performance benefits to multi-threaded applications but typically doesn't help single-threaded applications. See the [Performance comparison](#performance-comparison) section for more details.
5964

6065
### Limitations
66+
6167
SMB Multichannel for Azure file shares currently has the following restrictions:
68+
6269
- Only supported on Windows clients that are using SMB 3.1.1. Ensure SMB client operating systems are patched to recommended levels.
6370
- Not currently supported or recommended for Linux clients.
6471
- Maximum number of channels is four, for details see [here](/troubleshoot/azure/azure-storage/files-troubleshoot-performance?toc=/azure/storage/files/toc.json#cause-4-number-of-smb-channels-exceeds-four).
6572

6673
### Configuration
74+
6775
SMB Multichannel only works when the feature is enabled on both client-side (your client) and service-side (your Azure storage account).
6876

69-
On Windows clients, SMB Multichannel is enabled by default. You can verify your configuration by running the following PowerShell command:
77+
On Windows clients, SMB Multichannel is enabled by default. You can verify your configuration by running the following PowerShell command:
7078

7179
```PowerShell
7280
Get-SmbClientConfiguration | Select-Object -Property EnableMultichannel
@@ -75,6 +83,7 @@ Get-SmbClientConfiguration | Select-Object -Property EnableMultichannel
7583
On your Azure storage account, you'll need to enable SMB Multichannel. See [Enable SMB Multichannel](files-smb-protocol.md#smb-multichannel).
7684

7785
### Disable SMB Multichannel
86+
7887
In most scenarios, particularly multi-threaded workloads, clients should see improved performance with SMB Multichannel. However, for some specific scenarios such as single-threaded workloads or for testing purposes, you might want to disable SMB Multichannel. See [Performance comparison](#performance-comparison) for more details.
7988

8089
### Verify SMB Multichannel is configured correctly
@@ -84,7 +93,7 @@ In most scenarios, particularly multi-threaded workloads, clients should see imp
8493
1. Mount a file share to your client.
8594
1. Generate load with your application.
8695
A copy tool such as robocopy /MT, or any performance tool such as Diskspd to read/write files can generate load.
87-
1. Open PowerShell as an admin and use the following command:
96+
1. Open PowerShell as an admin and use the following command:
8897
`Get-SmbMultichannelConnection |fl`
8998
1. Look for **MaxChannels** and **CurrentChannels** properties.
9099

@@ -140,6 +149,59 @@ The load was generated against a single 128 GiB file. With SMB Multichannel enab
140149
- For smaller I/O sizes, there was a slight impact of ~10% on performance with SMB Multichannel enabled. This could be mitigated by spreading the load over multiple files, or disabling the feature.
141150
- Performance is still bound by [single file limits](storage-files-scale-targets.md#file-scale-targets).
142151

152+
## Metadata caching for premium SMB file shares (preview)
153+
154+
Metadata caching introduces a layer of cache to the Azure Files service to reduce metadata latency, increase available IOPS, and boost network throughput. This feature improves the following metadata APIs and can be used from both Windows and Linux clients:
155+
156+
- Create
157+
- Open
158+
- Close
159+
- Delete
160+
161+
To onboard, [sign up for the limited public preview](https://aka.ms/PremiumFilesMetadataCachingPreview) and we'll provide you with additional details. Currently this preview feature is only available for premium SMB file shares (file shares in the FileStorage storage account kind). There are no additional costs associated with using this feature.
162+
163+
### Regional availability
164+
165+
Currently the metadata caching preview is only available in the following Azure regions.
166+
167+
- Australia East
168+
- Germany West Central
169+
- Switzerland North
170+
- UAE North
171+
- US West Central
172+
173+
### Performance improvements with metadata caching
174+
175+
Most workloads or usage patterns that contain metadata can benefit from metadata caching. To determine if your workload contains metadata, you can [use Azure Monitor](analyze-files-metrics.md#monitor-utilization) to split the transactions by API dimension.
176+
177+
Typical metadata-heavy workloads and usage patterns include:
178+
179+
- Web/app services
180+
- DevOps tasks
181+
- Indexing/batch jobs
182+
- Virtual desktops with home directories or other workloads that are primarily interacting with many small files, directories, or handles
183+
184+
The following diagrams depict potential results.
185+
186+
#### Reduce metadata latency
187+
188+
By caching file and directory paths for future lookups, metadata caching can reduce latency on frequently accessed files and directories by 30% or more for metadata-heavy workloads at scale.
189+
190+
:::image type="content" source="media/smb-performance/metadata-caching-latency.jpg" alt-text="Chart showing latency in milliseconds with and without metadata caching." border="false":::
191+
192+
#### Increase available IOPS
193+
194+
Metadata caching can increase available IOPS by more than 60% for metadata-heavy workloads at scale.
195+
196+
:::image type="content" source="media/smb-performance/metadata-caching-iops.jpg" alt-text="Chart showing available IOPS with and without metadata caching." border="false":::
197+
198+
#### Increase network throughput
199+
200+
Metadata caching can increase network throughput by more than 60% for metadata-heavy workloads at scale.
201+
202+
:::image type="content" source="media/smb-performance/metadata-caching-throughput.jpg" alt-text="Chart showing network throughput with and without metadata caching." border="false":::
203+
143204
## Next steps
205+
144206
- [Enable SMB Multichannel](files-smb-protocol.md#smb-multichannel)
145207
- See the [Windows documentation](/azure-stack/hci/manage/manage-smb-multichannel) for SMB Multichannel

0 commit comments

Comments
 (0)