tr-4740 - SMB 3.0 Multichannel
tr-4740 - SMB 3.0 Multichannel
tr-4740 - SMB 3.0 Multichannel
Abstract
Microsoft has introduced a new feature called Multichannel in the SMB 3.0 protocol in
Windows Server 2012 and Windows 8, with the goal of improving the SMB3 protocol by
addressing the performance and reliability limitations of SMB1 and SMB2. This technical
report is an overview of the Multichannel feature in NetApp® ONTAP®, including its
capabilities, best practices, and performance test results.
TABLE OF CONTENTS
6 Performance ........................................................................................................................................ 10
6.1 Multichannel Counters ..................................................................................................................................11
7.2 Multichannel is working fine but the number of channels that are established is different from what is
expected. ......................................................................................................................................................13
8 Conclusion .......................................................................................................................................... 13
LIST OF TABLES
Table 1) SMB features that work with SMB3 Multichannel. ............................................................................................7
LIST OF FIGURES
Figure 1) SMB 1.0, SMB 2.0, and SMB 3.0 (without Multichannel) allow one TCP connection per SMB session. .........3
Figure 2) SMB 3.0 Multichannel allows multiple TCP connections per SMB session. ....................................................4
Figure 3) With RSS-enabled NICs, SMB 3.0 Multichannel creates four TCP connections per NIC. ...............................4
Figure 4) Multichannel workflow for SMB3. ....................................................................................................................5
Figure 5) SMB Multichannel comparison—storage side. ..............................................................................................10
Figure 6) SMB Multichannel comparison—client side. .................................................................................................11
Figure 1) SMB 1.0, SMB 2.0, and SMB 3.0 (without Multichannel) allow one TCP connection per SMB session.
Prior to SMB 3.0, the SMB protocol imposed a tight coupling between a CIFS session and the TCP
connection over which the session is established. In other words, a CIFS session is established over one
TCP connection, and all the SMB requests for that session are sent over it. Because throughput is limited
to what can be achieved over a single TCP connection, a single NIC between a client and a server limits
the throughput that can be achieved over a single CIFS session.
In addition to the throughput limitation, the current model lacks network fault tolerance, because a failure
in a NIC or a switch, or a network glitch, can interrupt the session.
Multichannel enables an SMB3 client to establish multiple TCP connections to an SMB3 server, possibly
over multiple NICs or even over a single receive-side scaling (RSS)-capable NIC, and associates a single
CIFS session with the multiple connections. When more than one TCP connection is established, RSS-
capable NICs can use more cores.
Figure 3) With RSS-enabled NICs, SMB 3.0 Multichannel creates four TCP connections per NIC.
Multichannel Workflow
Figure 4 describes the workflow for the SMB3 Multichannel feature.
Interface Discovery
Interface discovery is a process to detect any changes in the network. It happens after the initial session
setup and every 15 minutes after that. In the interface discovery process, the client sends a new input-
output control (IOCTL) command (fsctl_query_network_interfaces) to query the list of network
interfaces associated with the storage virtual machine (SVM). Each node responds to the request and
returns the list of available LIFs for the SVM that are currently hosted on that node and the properties of
underlying NICs. The properties returned are:
• The IP address
• The interface index
• The speed of the underlying port
• The RSS/remote direct memory access (RDMA) capability of the port
All of the 10G NICs supported in ONTAP are RSS-capable. Even if the NIC is not RSS-capable,
ONTAP simulates RSS by classifying incoming packets based on a software hash. In summary, with or
without RSS, ONTAP is capable of leveraging multiple CPUs for processing incoming packets in both
the driver and the network stack. Therefore, all interfaces are reported as RSS capable, even if the
underlying NIC is not in fact RSS-capable.
After multiple connections are established, the client is allowed to send SMB3 requests pertaining to a
given session over any associated connection. To achieve higher throughput, clients are expected to
distribute requests in an implementation-specific manner. Windows clients use a round-robin
mechanism. The response is sent over the same connection, and ONTAP doesn’t select a connection
for a response.
Signing Yes
Encryption Yes
Witness Yes
NetApp FPolicy® and antivirus Yes (RPC and SMB communication can
leverage Multichannel.)
On Windows, Multichannel is enabled by default. To enable or disable the option, use the following
commands with Windows PowerShell:
Enable/disable multichannel feature. (Default: true)
Set-SmbClientConfiguration -EnableMultiChannel $true
Configure the maximum total number of connections per client/server pair using:
Set-SmbClientConfiguration –MaximumConnectionCountPerServer <n>
Configure the number SMB Multichannel connections per RSS-capable network interface
Set-SmbClientConfiguration -ConnectionCountPerRssNetworkInterface <n>
In addition to these commands, Multichannel adds two more CIFS options, -max-connections-per-
session and -max-lifs-per-session, which are affected during upgrade and revert. The maximum
value for the -max-connections-per-session parameter is 32. The maximum value for the
parameter -max-lifs-per-session parameter is 256.
When the last node in the cluster is upgraded to the 9.4 release, the default values for all the Multichannel
options are populated. By default, Multichannel is disabled.
When the first node is reverted from the 9.4-configured clusters, a revert check forces the user to disable
the Multichannel feature on the node. Therefore, revert causes all Multichannel connections to be closed,
which is disruptive to any clients using this feature.
Note: The Multichannel feature requires some enhancements to correctly handle locks that are usable
over multiple connections. The Multichannel feature can work correctly only if the node hosting
the LIF and the node hosting the volume are upgraded to 9.4. The Multichannel feature cannot be
enabled in a mixed-node cluster. If the administrator tries to enable Multichannel with 9.4 nodes
by modifying the -is-multichannel-enabled option, the operation fails if the effective cluster
version is not 9.4.
Node: stg-lab-mc-02
Vserver: fsvcs
Connection Session Open Idle Connection
ID ID Workstation Windows User Files Time Count
---------- ------- ---------------- ---------------- --------- ------------ ---------------
438731506 5635691983701270642 3s 8
10.10.56.80 VEGA\ 2
Administrator
Figure 6 shows performance for a single SQL Server instance. The data was collected from Windows
Performance Monitor counters and represents performance as seen from the SQL Server side. This
graph shows that performance with SMB Multichannel enabled was almost 50% better at ~90,000 Ops at
5ms, with ~45,000 Ops at ~5ms with SMB Multichannel disabled. The average operations size for all
operations was 8,000.
Check whether Multichannel is enabled on the Enable Multichannel on the client by using the
client side by using the following Windows following Windows PowerShell cmdlet:
PowerShell cmdlet:
Set-SmbClientConfiguration -
Get-SmbClientConfiguration | Select EnableMultiChannel $true
EnableMultichannel
Enable Multichannel on ONTAP (SVM setting) by
Check whether Multichannel is enabled on ONTAP using the following command (advanced mode):
by using the following command:
vserver cifs options modify -vserver
vserver cifs options show -vserver vs1 -is-multichannel-enabled true
vs1 -field is-multichannel-enabled
Possible cause: Multichannel is enabled, but the client has an incompatible network interface
configuration.
Verify that the client has multiple NICs and/or The network interface adaptor must meet the
verify the RSS and RDMA capabilities of the NICs hardware requirements listed in section “Setting up
by using the following windows PowerShell Multichannel”.
cmdlets:
Get-NetAdapter
Get-NetAdapterRSS
Get-NetAdapterRDMA
Get-NetAdapterHardwareInfo
Get-SmbClientNetworkInterface
7.2 Multichannel is working fine but the number of channels that are established
is different from what is expected.
Possible cause: You might have chosen a different value than the default parameter settings.
Check the client-side settings by using the following If the values are not the default, consider
Windows PowerShell cmdlet: reverting to the default settings.
Get-SmbClientConfiguration | select Multichannel is a client-driven feature.
ConnectionCountPerRssNetworkInterface,Max Therefore, depending upon the algorithm
imumConnectionCountPerServer (round robin, shortest queue length,
processor affinity, and so on), the client
The default value for
running it dynamically decides whether or not
ConnectionCountPerRssNetworkInterface is 4.
it needs more channels. The server, on the
The default value for other hand, obliges if the settings are within
MaximumConnectionCountPerServer is 32. system constraints.
Check the server-side settings by using following
command:
vserver cifs options show -vserver vs1 -
fields max-connections-per-session, max-
lifs-per-session
The default value for max-connections-per-
session is 32.
The default value for max-lifs-per-session is 256.
8 Conclusion
With the introduction of applications like Microsoft SQL Server and Hyper-V over SMB 3.0, performance
has become a key requirement for the SMB 3.0 protocol. ONTAP combined with Multichannel support
brings both performance and resiliency to applications running on the SMB 3.0 protocol.
Version History
Version Date Document Version History Author(s)
Version 1.0 January 2019 Introduction of Multichannel Brahmanna Chowdary Kodavali,
Ron Pratt