Multichannel Question

Hum. Okay let me see if I can keep it simple. Hash is a mathematical formula used to distribute something. In the case of what I am talking about a TCP flow between the host to the server when the path has a LAG. The switch needs to know which link to put that traffic on so it looks at some salt (name for input variable of the hash). In the case above it looks at some version of what I linked to (the switch vendor will have documentation on what they do but there is only a limited number of ways to do this.

The formula for unfragmented TCP and UDP packets is:

hash = source port, destination port (as in the header) hash = hash XOR source IP XOR destination IP hash = hash XOR (hash RSHIFT 16) hash = hash XOR (hash RSHIFT 8) hash = hash RSHIFT 1 And then hash is reduced modulo slave count.

So it takes this output and says “hey this means this flow should go over link X of the LAG”.

A new flow will have a new hash and might pick the same link or might pick a different link. In normal network operations things will generally evenly balance out.

Gotcha. Thank you so much for explaining me!

As i’ve experimented the SMB Multichannel, its quite clear to me but seems like i’ll also have to experiment with the LAGG as well and then decide.

Just to let you know, there are three clients that will be connected to the NAS, and all are flash (the NAS and the clients) but once i test everything, depending on that, i’ll install the NICs as i’ve a few options for that. However, it will be usually two clients accessing the NAS simultaneously, but for a majority of the time, it will be a single client only.

As far as i’m aware, the switch also needs to support the LAGG feature right?

Also, is LAGG and LACP bond two different things?

In addition, do you guys have any idea when there will be support for SMB Multichannel on TrueNAS Core or any way to enable that? I’ve been running core but i experimented the SMB Multichannel thingy on TrueNAS Scale on a separate NAS and client. Seems like i’m going to use SMB Multichannel for my use case but then, do i really need to switch to SCALE? Are there any other benefits in terms of performance or reliability when comparing Core and SCALE?

LAG = Link Aggregation Group
LACP = Link Aggregation Control Protocol

A LAG is the name for a grouping of physical paths. You can do a static LAG - ie, the device just does what every hashing it wants on its side and the other side can do something different. LACP is like routing protocol. It allows the devices to speak to each other and agree on how they would like to talk and exchange information about the status of the LAG.

1 Like

Cool cool!

I’ve got a few more questions:

The SMB is a single threaded connection and generally, its recommended to use the highest core clock for a CPU. But does this also applies to SMB Multichannel as well?

Secondly, how many cores does the SMB Multichannel can use for a given setup? Does the number of cores being used depends on the number of ports on the NIC?

Lastly, do you have any idea when there will be support for SMB Multichannel on TrueNAS Core or any way to enable that? I’ve been running core but i experimented the SMB Multichannel thingy on TrueNAS Scale on a separate NAS and client. Seems like i’m going to use SMB Multichannel for my use case but then, do i really need to switch to SCALE? Are there any other benefits in terms of performance or reliability when comparing Core and SCALE?

I really do not know enough about Multichannel to answer your questions.

TrueNAS > System > Services > SMB Edit > Advanced is where the setting is.

SMB multichannel requires :

  1. NIC to support RSS
    or
  2. Multiple NICs

Get-NetAdapterRss shows you how many CPUs assigned to RSS capability of a given NIC.

Get-NetAdapterRss

Name                                            : Ethernet 4
InterfaceDescription                            : Mellanox ConnectX-4 Lx Ethernet Adapter #5
Enabled                                         : True
NumberOfReceiveQueues                           : 16
Profile                                         : NUMAStatic
BaseProcessor: [Group:Number]                   : 0:0
MaxProcessor: [Group:Number]                    : 0:46
MaxProcessors                                   : 16
RssProcessorArray: [Group:Number/NUMA Distance] : 0:0/0  0:2/0  0:4/0  0:6/0  0:8/0  0:10/0  0:12/0  0:14/0
                                                  0:16/0  0:18/0  0:20/0  0:22/0  0:24/0  0:26/0  0:28/0  0:30/0
                                                  0:32/0  0:34/0  0:36/0  0:38/0  0:40/0  0:42/0  0:44/0  0:46/0
IndirectionTable: [Group:Number]                : 0:16  0:18    0:20    0:22    0:24    0:26    0:28    0:30
                                                  0:32  0:34    0:36    0:38    0:40    0:42    0:44    0:46
                                                  0:16  0:18    0:20    0:22    0:24    0:26    0:28    0:30
                                                  0:32  0:34    0:36    0:38    0:40    0:42    0:44    0:46
                                                  0:16  0:18    0:20    0:22    0:24    0:26    0:28    0:30
                                                  0:32  0:34    0:36    0:38    0:40    0:42    0:44    0:46
                                                  0:16  0:18    0:20    0:22    0:24    0:26    0:28    0:30
                                                  0:32  0:34    0:36    0:38    0:40    0:42    0:44    0:46
                                                  0:16  0:18    0:20    0:22    0:24    0:26    0:28    0:30
                                                  0:32  0:34    0:36    0:38    0:40    0:42    0:44    0:46
                                                  0:16  0:18    0:20    0:22    0:24    0:26    0:28    0:30
                                                  0:32  0:34    0:36    0:38    0:40    0:42    0:44    0:46
                                                  0:16  0:18    0:20    0:22    0:24    0:26    0:28    0:30
                                                  0:32  0:34    0:36    0:38    0:40    0:42    0:44    0:46
                                                  0:16  0:18    0:20    0:22    0:24    0:26    0:28    0:30
                                                  0:32  0:34    0:36    0:38    0:40    0:42    0:44    0:46

Get-SmbMultichannelConnection | ConvertTo-Json will show you how many channels Windows will attempt to run on a given NIC

  "ClientInterfaceIndex": 6,
  "ClientIpAddress": "192.168.1.16",
  "ClientLinkSpeed": 10000000000,
  "ClientRdmaCapable": false,
  "ClientRSSCapable": true,
  "CurrentChannels": 1,

  "MaxChannels": 4,

After that its up to Samba ↔ Windows negotiation.

SMB Multichannel is supported by Samba not by TrueNAS Scale or Core.

Latest version of Core comes with Samba 4.15 that supports SMB multichannel perfectly fine. You can enable it in UI or via Auxiliary parameters. Often its good to specify interfaces capabilities explicitly, so that Samba understands that interface supports RSS.

Ah ok. Gotcha!

So, does that mean if a NIC supports RSS, then despite being a single port card, the SMB Multichannel can work?

So, if i’m not wrong, for the above results you posted, it seems like that this Mellanox ConnectX-4X can utilize up to 16 threads simultaneously if configured using different clients (SMB) and with a single stream but with SMB Multichannel configured?

And is there any way to increase these channels for more parallel stream for a single connection?

Wow. Are you sure that the version you mentioned has SMB Multichannel support for the CORE?

So I checked my Windows 11 box and my MacBook Pros. The MacBook Pros support RSS and the Intel 225-V 2.5G does not. It did at one point but Intel decided to remove support. There are a few threads on this and how to try to hack it back on but none work.

Can you provide me the command to check that?

What the heck!

Dang shit. Can you send me the link, please?

  1. Yes
  2. It’s just generic RSS capability of Mellanox driver. You can tune number of CPU used via a registry parameter. It applies to a nic port as a whole.
  3. I didn’t check but 4 channels is more than enough to saturate 10gbps that is the speed of connection in that example. In theory Samba and Windows look at 2 parameters : RSS and speed to determine how many channels they will negotiate. That’s my understanding.
  4. Yes, Core 13 U6 comes with Samba 4.15 that supports SMB multichannel just fine
1 Like

Sounds great!

Will double check my work and also test it on CORE. Thanks for all the help mate!

Google for the Intel stuff.

On a Mac to check out SMB stuff there is a command called smbutil.

smbutil multichannel -a