The function of RDMA is described. A PowerShell demonstration shows a QOS policy to that uses RDMA and DCB to prioritize and control flow of SMB traffic.
- [Instructor] If you've just finished watching the first chapter then you're already working out how to make your network as fast as it can possibly be. You've teamed up your network cards and spread their workload across all of the processors. You may have even created policies to prioritize different classes of traffic. Well, now it's time to look back at our file server. We want to make sure that our file sharing is as efficient as it can possibly be, so that we aren't wasting our high performance network on a slow internal service, like good old fashioned file sharing, SMB.
And SMB Direct is how we do that. But before we start to set that up let's take a quick walk-through of what we need. For starters you need to make sure that you're buying network cards that support Direct Memory Access. We're going to be looking at remote enabled Direct Memory Access and that does require a higher class of network card. We're going to be adding data center bridging, which we talked about in close of chapter one as a feature, and we're going to start applying QOS policies and even traffic classes to help speed up the processing of our network traffic from one server to another.
Remote Direct Memory Access is based on DMA, or Direct Memory Access, which has been around for a long time. The smarter our components get the less they need the CPU. If a network card can prepare the information to go straight to memory that can save a bit of processing power on that machine and the information is handled much more quickly. 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. Think of the benefits of large files, like virtual hard drives to run a virtual machine. If you're running a live migration you want the highest performing network you can get and the fastest file sharing and file transfer you can find.
If you're running a file server whose primary function is to move lots of small files from the hard drive of the server to the hard drives of multiple clients one at a time then you want multiple NICs, like a NIC team, or multiple servers, like Scale-Out File Server. But for RDMA consider network servers that need to transfer the larger files back and forth as efficiently as possible. When RDMA was first introduced in Windows Server it couldn't use a virtual adapter, it had to run over separate physical adapters, which was fine for moving the virtual machines themselves from server to server, but it didn't help if the information you were trying to transfer was from inside one virtual machine to inside another virtual machine.
But Windows Server 2016 was built with virtualization in mind from the ground up. So things are now different. When we enable RDMA on a virtual machine adapter then the virtual machine and the host machine's storage all go through the same virtual switch. We improve communication between the host and the VMs, between the VMs and each other, and between the VMs in this machine and the rest of the network.
Let's take a look at how this is set up. So here we are on the physical host of our virtual machines. I'm going to open PowerShell as an administrator and from this prompt I am going to install a Windows feature. The syntax for that, if you're not familiar, is Install-WindowsFeature. And you'll notice it's a common practice to capitalize the first letter of words, especially when they're run together. That's not necessary or required, but it does help if you need to go back and troubleshoot a commandlet.
And the feature that I specifically want to add here is Data-Center-Bridging. So I'm going to hit Enter on that line and it will collect the data and install that feature for me. So now we're going to practice some of the concepts that we discussed in the last video. We're going to start by making a new QOS policy and the command looks like this, New-NetQosPolicy.
And we're going to name this policy. In quotes I'm going to name it SMB, because that's what this policy is for. And now I'm going to add the criteria. And my criteria is NetDirectPortMatchCondition 445. 445 is the port number for Microsoft file sharing, or SMB. And finally, I'm going to assign a PriorityValue, and the priority that I'm going to assign it is a 3.
This gives SMB traffic a priority of 3 on a scale of zero to seven. So let's create that new NetQosPolicy. Now that we've created that we can enable flow control for all priority traffic using the commandlet Enable-NetQosFlowControl, but we only want to do this for traffic with the Priority 3. Now I'll hit Enter and the lack of output is a little anticlimactic, but there are no errors, so it worked.
And we can also run a commandlet to disable flow control for other priorities. The command looks somewhat similar. Disable-NetQosFlowControl, and I'm going to list all of the other priorities separated by commas. We're getting closer. Now we can apply this policy to the correct adapter with a command to Enable-NetAdapterQos by specifying the InterfaceAlias and make sure that you include an * after the alias inside the quotation marks.
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. But our worked, so now, final step, let's turn this policy into a traffic class. The command for this is New-NetQosTrafficClass, use the name that we've already set, specify its Priority, we can even assign it a percentage of available bandwidth.
Let's say we're going to allow the SMB traffic up to 30% of our network bandwidth. And specify ETS as the Algorithm that will apply that. So that's it on the software side. If your network adapter supports RDMA then all you need to do is make sure it's enabled on that NIC. And you can enable that from right here in PowerShell. You will need to know the name of the network interface, so I'm going to run Get-NetIPInterface.
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 by entering in Enable-NetAdapterRDMA and then in quotations that adapter name exactly as it appears here.
Your screen will probably flash like that, because you're changing the properties of an adapter that may be in use. Side reminder, don't do this in production in the middle of a work day. But this will reestablish that connection, as you saw, and that's all it takes to turn this on. 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 commandlets very similar to the ones used to create the objects.
In fact, I'm going to scroll this screen up just a little bit and I'm going to cheat by using the up arrow option in PowerShell to find the command where I created the traffic class. I don't need all of this detail to delete it, but I will need the name of the traffic class and instead of New I'm going to select Remove. And that will get rid of that object.
And I can repeat that process for anything else that I used the New command to create. I can delete the policy entirely by saying Remove-NetQosPolicy with the same name. And it does try to save you from yourself. Yes, that is exactly what I'm trying to do. And now we're back to where we were before these policies were in place.
- Configuring a network interface controller team
- Switching embedded teaming
- Remote enabled direct memory access NICs
- Configuring virtual machine queue
- Enabling and configuring SR-IOV
- Understanding software-defined networks (SDN)
- Reviewing SDN network requirements and deployment scenarios