Again for Samba Multichannel

I can confirm that QNAP and Synology are on the same subnet and just work as expected with DHCP assigning a unique IP to each interface or static IPs. Ditto Windows.

1 Like

Yes same subnet will work between windows server-w10/11, W10/11-w10-11
and i’ve tested also W10/11->netgear nas and qnap nas all working fine with smb multichannel an can utilize both nics.
with truenas it seems to work as well at least windows 10 sees both nics

PS C:\WINDOWS\system32> Get-SmbMultichannelConnection

Server Name  Selected Client IP     Server IP     Client Interface Index Server Interface Index Client RSS Capable Clie
                                                                                                                   nt R
                                                                                                                   DMA
                                                                                                                   Capa
                                                                                                                   ble
-----------  -------- ---------     ---------     ---------------------- ---------------------- ------------------ ----
truenas      True     192.168.1.185 192.168.1.180 21                     5                      True               F...
truenas      True     192.168.1.185 192.168.1.40  21                     3                      True               F...
truenas      True     192.168.1.185 10.20.20.40   21                     2                      True               F...
truenas      True     192.168.1.185 192.20.20.40  21                     4                      True               F...
192.168.1.40 True     192.168.1.185 192.168.1.180 21                     5                      True               F...
192.168.1.40 True     192.168.1.185 192.168.1.40  21                     3                      True               F...
192.168.1.40 True     192.168.1.185 10.20.20.40   21                     2                      True               F...
192.168.1.40 True     192.168.1.185 192.20.20.40  21

in my example i’m using single 10gb from intel x710 connection to 4x1gb nics in truenas scale

To add to this discussion- the previously referenced Microsoft documentation (“Deploy SMB Multichannel”) provides a lot of good information.

The Microsoft documentation states:

SMB Multichannel has the following requirements:

At least two computers that run on Windows Server 2012 R2, Windows Server 2012, or Windows 8 operating systems are required. No additional features have to be installed—SMB Multichannel is enabled by default.

At least one of the following configurations:

  •    Multiple network adapters
    
  •     One or more network adapters that support Receive Side Scaling (RSS)
    
  •     One of more network adapters that are configured by using NIC Teaming
    
  •     One or more network adapters that support remote direct memory access (RDMA)
    

Also, later in the document Microsoft provides further examples of the different possible configurations under which SMB multichannel is supported. I wanted to point out that per this documentation it is actually possible to do SMB Multichannel with just a single network adapter (if the adapter and driver supports RSS and the other requirements are met).

Single RSS-capable network adapter

In this typical configuration, an SMB client and an SMB server are configured by using a single 10-gigabit Ethernet (10 GbE) network adapter. When SMB is deployed without SMB Multichannel, and if there is only one SMB session established, SMB creates a single TCP/IP connection. With only a single CPU core, this configuration inherently leads to congestion, especially when many small I/O operations are performed. Therefore, the potential for a performance bottleneck is significant.

Most current network adapters offer a capability called Receive Side Scaling (RSS), which enables multiple connections to automatically spread across multiple CPU cores. However, if you use a single connection, RSS cannot help. When you use SMB Multichannel with a RSS-capable network adapter, SMB creates multiple TCP/IP connections for that particular session. This configuration avoids a potential bottleneck on a single CPU core if many small I/O operations are required.

I did some testing between a Windows 11 virtual machine (hosted on my TrueNAS Scale system) and my main physical Windows 11 system. Via the PowerShell commands Microsoft provides I can tell that my workstation’s physical NIC as well as the virtual NIC on my VM supports RSS (I’ve got the VM configured using VirtIO using the Red Hat VirtIO Ethernet drivers). I then did a SMB file transfer between my two Windows 11 systems. Using the Sysinternals TCPView tool I can see that there are 4 separate, simultaneous SMB TCP connections established between the two systems which makes sense given that my workstation’s NIC supports 4 RSS queues. The PowerShell command “Get-SmbMultichannelConnection” confirmed that SMB multichannel was being used for the SMB transfer with 4 channels in use. Note that in this scenario both systems I’m testing with only have a single IP address assigned (both machines are also on the same subnet) on a single network adapter. With the single adapter scenario SMB multichannel isn’t going to increase total available bandwidth (it is going to be limited to the maximum bandwidth provided by the slowest NIC involved which in my case is 10Gbps). But it can provide a more stable/consistent transfer because it is split across multiple TCP connections and as a result can utilize more than one CPU core, etc…).

Unfortunately, it seems that the Samba configuration in TrueNAS isn’t set up to support doing SMB multichannel using RSS. This forum isn’t allowing me to post links, but I found a Reddit post titled “Samba SMB Multi Channel RSS client support” where the topic of Samba Multichannel RSS support was discussed. In the post they show an example Samba config (in their case they were using 2 separate NICs but also with RSS support configured):

interfaces = "#.#.#.#;speed=25000000000,capability=RSS" "#.#.#.#;speed=25000000000,capability=RSS

I also found posts in other forums that discuss this topic as well.

Posts in other forums related to Samba SMB Multichannel and RSS support:

https://www.reddit.com/r/linuxquestions/comments/ippc1b/samba_smb_multi_channel_rss_client_support/

Linux cannot support multiple nics in the same broadcast domain. This is called multihoming.

There’s a very fundamental issue with multihoming: routing.

The linux kernel is built to support routing. It is based internally on the weak end host model.

The weak host model has a drawback: lack of support/unpredictability for multiple nics in the same broadcast domain.

See RFC1122 and the fortinet writeup.

help (dot) fortinet (dot) com/fadc/3-2-2/html-e/Content/ServerCx/Weak_and_Strong_Host_Mod.htm

1 Like