Skip to content

Commit c3f1fef

Browse files
Merge pull request #310146 from grover2754/user/agroves/SMBMCLinux
SMB MC for Linux
2 parents f293b31 + 160ffc9 commit c3f1fef

2 files changed

Lines changed: 38 additions & 5 deletions

File tree

articles/storage/files/smb-performance.md

Lines changed: 37 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,33 @@ Higher I/O sizes drive higher throughput and have higher latencies, resulting in
5151

5252
## SMB Multichannel
5353

54-
SMB Multichannel enables an SMB client to establish multiple network connections to an SMB file share. Azure Files supports SMB Multichannel on SSD file shares for Windows clients. On the service side, SMB Multichannel is now enabled by default for all newly created storage accounts in all Azure regions. There's no extra cost for enabling SMB Multichannel.
54+
SMB Multichannel enables an SMB client to establish multiple network connections to an SMB file share, improving throughput and resiliency. Azure Files supports SMB Multichannel on SSD file shares for both Windows and Linux SMB clients.
55+
For supported OS versions and detailed configuration, see the Linux SMB Multichannel section below.
56+
57+
### Linux SMB Multichannel Support
58+
Azure Files supports SMB Multichannel with native Linux SMB clients on the following distributions:
59+
60+
- *Ubuntu 22.04*
61+
- *Ubuntu 24.04*
62+
- *AzLinux 3.0*
63+
- *RHEL 9.7*
64+
- *RHEL 10.1*
65+
66+
These clients must be running the appropriate kernel stack and CIFS utilities that support multichannel. SMB Multichannel support on Linux enables performance scaling similar to Windows by establishing multiple parallel TCP connections to the same file share endpoint.
67+
68+
#### Prerequisites
69+
- Kernel with SMB multichannel support enabled (typically 6.8+ and up with *max_channel=4* mount flags)
70+
- SMB 3.1.1
71+
- Multiple network interfaces or network paths (if available)
72+
- Port 445/TCP open between client and Azure Files endpoint
73+
- Ensure client side receive-side scaling (RSS) is enabled for multi-queue support
74+
75+
#### Example
76+
```Bash
77+
mount -t cifs //<storageaccount>.file.core.windows.net/<share> /mnt/azfiles \
78+
-o vers=3.1.1,username=<account>,password=<key>,dir_mode=0777,file_mode=0777, \
79+
multiuser,serverino,actimeo=30,max_channel=4
80+
```
5581

5682
### Benefits
5783

@@ -67,6 +93,12 @@ SMB Multichannel enables clients to use multiple network connections that provid
6793
When SMB Multichannel is enabled on clients and storage accounts, it allows for dynamic discovery of existing connections, and can create addition connection paths as necessary.
6894
- **Cost optimization**:
6995
Workloads can achieve higher scale from a single VM, or a small set of VMs, while connecting to SSD file shares. This could reduce the total cost of ownership by reducing the number of VMs necessary to run and manage a workload.
96+
- **Linux client performance scaling**:
97+
Linux SMB clients can now leverage multichannel to increase throughput and IOPS similar to Windows.
98+
- **Cross-platform consistency**:
99+
Enables hybrid environments with both Windows and Linux clients achieving optimal performance.
100+
- **Resiliency**:
101+
Multiple channels improve fault tolerance over heterogeneous networking.
70102

71103
For more information about SMB Multichannel, see the [Windows documentation](/azure-stack/hci/manage/manage-smb-multichannel).
72104

@@ -80,7 +112,7 @@ SMB Multichannel for Azure file shares currently has the following restrictions:
80112
- Only supported on clients that are using SMB 3.1.1. Ensure SMB client operating systems are patched to recommended levels.
81113
- 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).
82114

83-
### Configuration
115+
### Windows Configuration
84116

85117
SMB Multichannel only works when the feature is enabled on both client-side (your client) and service-side (your Azure storage account).
86118

@@ -92,11 +124,11 @@ Get-SmbClientConfiguration | Select-Object -Property EnableMultichannel
92124

93125
If SMB Multichannel isn't enabled on your Azure storage account, see [SMB Multichannel status](files-smb-protocol.md#smb-multichannel).
94126

95-
### Disable SMB Multichannel
127+
#### Disable SMB Multichannel
96128

97129
In most scenarios, particularly multi-threaded workloads, clients 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) and [SMB Multichannel status](files-smb-protocol.md#smb-multichannel) for more details.
98130

99-
### Verify SMB Multichannel is configured correctly
131+
#### Verify SMB Multichannel is configured correctly
100132

101133
1. Create a new SSD file share or use an existing SSD file share.
102134
1. Ensure your client supports SMB Multichannel (one or more network adapters has receive-side scaling enabled). Refer to the [Windows documentation](/azure-stack/hci/manage/manage-smb-multichannel) for more details.
@@ -114,7 +146,7 @@ There are two categories of read/write workload patterns: single-threaded and mu
114146
- **Multi-threaded/multiple files**:
115147
Depending on the workload pattern, you should see significant performance improvement in read and write I/Os over multiple channels. The performance gains vary from anywhere between 2x to 4x in terms of IOPS, throughput, and latency. For this category, SMB Multichannel should be enabled for the best performance.
116148
- **Multi-threaded/single file**:
117-
For most use cases in this category, workloads benefit from having SMB Multichannel enabled, especially if the workload has an average I/O size greater than 16 KiB. A few example scenarios that benefit from SMB Multichannel are backup or recovery of a single large file. An exception where you might want to disable SMB Multichannel is if your workload is heavy on small I/Os. In that case, you might observe a slight performance loss of 10%. Depending on the use case, consider spreading load across multiple files, or disable the feature. See the [Configuration](#configuration) section for details.
149+
For most use cases in this category, workloads benefit from having SMB Multichannel enabled, especially if the workload has an average I/O size > ~16k. A few example scenarios that benefit from SMB Multichannel are backup or recovery of a single large file. An exception where you might want to disable SMB Multichannel is if your workload is heavy on small I/Os. In that case, you might observe a slight performance loss of ~10%. Depending on the use case, consider spreading load across multiple files, or disable the feature.
118150
- **Single-threaded/multiple files or single file**:
119151
For most single-threaded workloads, there are minimum performance benefits due to lack of parallelism. Usually there is a slight performance degradation of 10% if SMB Multichannel is enabled. In this case, it's ideal to disable SMB Multichannel, with one exception. If the single-threaded workload can distribute load across multiple files and uses on an average larger I/O size (greater than 16 KiB), then there should be slight performance benefits from SMB Multichannel.
120152

articles/storage/files/storage-how-to-use-files-linux.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ You can use the following mount options when mounting SMB Azure file shares on L
458458
| `file_mode=` | n/a | Optional. If the server doesn't support the CIFS Unix extensions, this overrides the default file mode. |
459459
| `dir_mode=` | n/a | Optional. If the server doesn't support the CIFS Unix extensions, this overrides the default mode for directories. |
460460
| `handletimeout=` | n/a | Optional. The time (in milliseconds) for which the server should reserve the file handle after a failover waiting for the client to reconnect. |
461+
| `max_channel=` | 4 | Enables SMB Multichannel on Linux CIFS mounts. Customers should always use the recommended value (4) of SMB Multichannel connections when accessing Azure Files from Linux clients. |
461462
462463
## Next step
463464

0 commit comments

Comments
 (0)