SMB Direct (to speed up the file server access speed)

SMB Direct Requirements:
DMA NICs
Windows feature
QOS policy
Traffic class

RDMA (Remote Direct Memory Access) is based on Direct Memory Access

Remote DMA, or RDMA, is a technology that allows two different computers with RDMA network adapters to write data from the memory of one machine to the memory of another without involving the processor or even the processor cache of either computer.
The data goes from RAM to NIC to NIC to RAM. In the beginning of this course I said that if you wanted to transfer larger files faster you needed to buy a faster NIC, this is a faster NIC.

There are three RDMA implementation version, iWARP, RDMA over Converged Ethernet ( RoCE) and Infiniband (IB). Due to popular converged network architecture, iWARP and RoCE more extensive usage scenarios.
IWARP is representative of the Chelsio T520-CR
Representative RoCE is ConnectX-3 Mellanox of
both support RDMA, and are two Gigabit interfaces.

运行powershell
安装 Data-Center-Bridging
Install-WindowsFeature Data-Center-Bridging

为 SMB Direct 设置网络 QoS 策略(445 is the port number for Microsoft file sharing, or SMB. the priority that I'm going to assign it is a 3.)
New-NetQosPolicy "SMB" -NetDirectPortMatchCondition 445 -PriorityValue8021Action 3

Create a new NetQosPolicy
the Enable-NetQosFlowControl -Priority 3

Disable flow control for other traffic
Disable-NetQosFlowControl -Priority 0,1,2,4,5,6,7

Now we can apply this policy to the correct adapter ( the network QoS policy to the target adapter.)
The Enable-NetAdapterQos -InterfaceAlias "Slot 2 *"

If you need to know your interface alias you can use the Get-NetIPInterface to list all of your network interfaces and it will show the interface alias for each one.
Get-NetIPInterface

Creating traffic classes and assign 30% of the maximum bandwidth of SMB Direct. Set the class name will be "SMB". The Algorithm AS the Specify the ETS And that that Will Apply.
New-NetQosTrafficClass "the SMB" -Priority the ETS. 3 -BandwidthPercentage 30 -Algorithm

If your network adapter supports RDMA then all you need to do is make sure it's enabled on that NIC.
Gets network adapter list to identify the target adapter (which is to check RDMA adapter)
the Get-NetIPInterface
SMB Direct (to speed up the file server access speed)

And specifically I'm looking for the vEthernet with the name of the virtual switch that my VM connects to. And I'm going to enable RDMA for the vEthernet, or the virtual network adapter that connects my server to the virtual switch named Adapter 1
Enable-NetAdapterRDMA "vethernet (Adapter 1)"

Now if you find that after creating and enabling these policies that things stop working the way they should or situations get worse removing these policies uses command very similar to the ones used to create the objects.
Remove-NetQosTrafficClass "SMB"
Remove-NetQosPolicy "SMB"

Guess you like

Origin blog.51cto.com/2290153/2436517