Quantcast
Channel: Hyper-V forum
Viewing all articles
Browse latest Browse all 8743

Poor Performance with Converged Fabrics

$
0
0

Hi Guys,

I'm having some serious performance issues with Converged Fabrics in my Windows Server 2012 R2 lab. I'm planning on creating a Hyper-V cluster with 3 nodes. I've built the first node, building and installing/configuring OS and Hyper-V pretty straight forward.

My issue is with Converged Fabrics, I'm absolutely getting very slow performance in the sense of managing the OS, Remote Desktop connections taking very long and eventually times out. Server unable to find a writable domain controller due to slow performance. If I remove the converged fabric everything is awesome, works as expected. Please note that the cluster hasn't even been built yet and experiencing this poor performance.

Here is my server configuration:

OS: Windows Server 2012 R2

RAM: 64GB

Processor: Intel I7 Gen 3

NICS: 2 X Intel I350-T2 Adapters, supporting SRIOV/VMQ

Updates: All the latest updates applied

Storage:

Windows Server 2012 R2 Storage Spaces

Synology DS1813+

Updates: All the latest updates applied

Below is the script I've written to automate the entire process.

########################################################################################################################
# Script: Configure Hyper-V
#
#
#
# Version: 1.0.2
#
# Description: Configures the Hyper-V Virtual Switch and
#              Creates a Converged Fabric
#
#
# Version 1.0.0: Initial Script
# Version 1.0.1: Added the creation of SrIOV based VM Switches
# Version 1.0.2: Added parameters to give the NLB a name, as well as the Hyper-V Switch
#
########################################################################################################################

param
(
    [Parameter(Mandatory=$true)]
    [string]$TeamAdapterName="",
    [Parameter(Mandatory=$true)]
    [string]$SwitchName="",
    [Parameter(Mandatory=$true)]
    [bool]$SrIOV=$false
    
)

#Variables
$CurrentDate = Get-Date -Format d
$LogPath = "C:\CreateConvergedNetworkLog.txt"
$ManagmentOSIPv4="10.150.250.5"
$ManagmentOS2IPv4="10.250.251.5"
#$CommanGatewayIPv4="10.10.11.254"
$ManagmentDNS1="10.150.250.1"
$ManagmentDNS2="10.150.250.3"
$ManagmentDNS3="10.250.251.1"
$ManagmentDNS4="10.250.251.3"
$ClusterIPv4="10.253.251.1"
$LiveMigrationIPv4="10.253.250.1"
$CSVIPv4="10.100.250.1"
$CSV2IPv4="10.250.100.1"



#Set Excution Policy
Write-Host "Setting policy settings..."
Set-ExecutionPolicy UnRestricted

try
{
    # Get existing network adapters that are online
    if($SrIOV)
    {
        #$sriov_adapters = Get-NetAdapterSriov | ? Status -eq Up | % Name # Get SRIOV Adapters
        $adapters = Get-NetAdapterSriov | ? Status -eq Up | % Name # Get SRIOV Adapters
        Enable-NetAdapterSriov $adapters # Enable SRIOV on the adapters
    }
    else
    {
        $adapters = Get-NetAdapterSriov | % Name
        #$adapters = Get-NetAdapter | ? Status -eq Up | % Name
    }

    
    
    # Create NIC team
    if ($adapters.length -gt 1)
    {
        Write-Host "$CurrentDate --> Creating NIC team $TeamAdapterName..."
        Write-Output "$CurrentDate --> Creating NIC team $TeamAdapterName..." | Add-Content $LogPath
        #New-NetLbfoTeam -Name "ConvergedNetTeam" -TeamMembers $adapters -Confirm:$false | Add-Content $LogPath
        New-NetLbfoTeam -Name $TeamAdapterName -TeamMembers $adapters -TeamingMode SwitchIndependent -LoadBalancingAlgorithm Dynamic -Confirm:$false | Add-Content $LogPath
    }
    else
    {
        Write-Host "$CurrentDate --> Check to ensure that at least 2 NICs are available for teaming"
        throw "$CurrentDate --> Check to ensure that at least 2 NICs are available for teaming" | Add-Content $LogPath
    }

    # Wait for team to come online for 60 seconds
    Start-Sleep -s 60

    if ((Get-NetLbfoTeam).Status -ne "Up")
    {
        Write-Host "$CurrentDate --> The ConvergedNetTeam NIC team is not online. Troubleshooting required"
        throw "$CurrentDate --> The ConvergedNetTeam NIC team is not online. Troubleshooting required" | Add-Content $LogPath
    }
        
    # Create a new Virtual Switch
    if($SrIOV) #SRIOV based VM Switch
    {
        Write-Host "$CurrentDate --> Configuring converged fabric $SwitchName with SRIOV..."
        Write-Output "$CurrentDate --> Configuring converged fabric $SwitchName with SRIOV..." | Add-Content $LogPath
        #New-VMSwitch "ConvergedNetSwitch" -MinimumBandwidthMode Weight -NetAdapterName "ConvergedNetTeam" -EnableIov $true -AllowManagementOS 0
        New-VMSwitch $SwitchName -MinimumBandwidthMode Weight -NetAdapterName $TeamAdapterName -EnableIov $true -AllowManagementOS 0
        $CreatedSwitch = $true
    }
    else #Standard VM Switch
    {
        Write-Host "$CurrentDate --> Configuring converged fabric $SwitchName..."
        Write-Output "$CurrentDate --> Configuring converged fabric $SwitchName..." | Add-Content $LogPath
        #New-VMSwitch "ConvergedNetSwitch"-MinimumBandwidthMode Weight -NetAdapterName "ConvergedNetTeam" -AllowManagementOS 0
        New-VMSwitch $SwitchName -MinimumBandwidthMode Weight -NetAdapterName $TeamAdapterName -AllowManagementOS $false
        $CreatedSwitch = $true
    }

    if($CreatedSwitch)
    {
        #Set Default QoS
        Write-Host "$CurrentDate --> Setting default QoS policy on $SwitchName..."
        Write-Output "$CurrentDate --> Setting default QoS policy $SwitchName..." | Add-Content $LogPath
        #Set-VMSwitch "ConvergedNetSwitch"-DefaultFlowMinimumBandwidthWeight 30
        Set-VMSwitch $SwitchName -DefaultFlowMinimumBandwidthWeight 20

        #Creating Management OS Adapters (SYD-MGMT)
        Write-Host "$CurrentDate --> Creating and configuring virtual NIC for Management OS"
        Write-Output "$CurrentDate --> Creating and configuring virtual NIC for Management OS" | Add-Content $LogPath
        Add-VMNetworkAdapter -ManagementOS -Name "SYD-MGMT" -SwitchName $SwitchName
        Set-VMNetworkAdapter -ManagementOS -Name "SYD-MGMT" -MinimumBandwidthWeight 30 -VmqWeight 80
        Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "SYD-MGMT" -Access -VlanId 0

        #Creating Management OS Adapters (MEL-MGMT)
        Write-Host "$CurrentDate --> Creating and configuring virtual NIC for Management OS"
        Write-Output "$CurrentDate --> Creating and configuring virtual NIC for Management OS" | Add-Content $LogPath
        Add-VMNetworkAdapter -ManagementOS -Name "MEL-MGMT" -SwitchName $SwitchName
        Set-VMNetworkAdapter -ManagementOS -Name "MEL-MGMT" -MinimumBandwidthWeight 30 -VmqWeight 80
        Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "MEL-MGMT" -Access -VlanId 0


        #Creating Cluster Adapters
        Write-Host "$CurrentDate --> Creating and configuring virtual NIC for Cluster"
        Write-Output "$CurrentDate --> Creating and configuring virtual NIC for Cluster" | Add-Content $LogPath
        #Add-VMNetworkAdapter -ManagementOS -Name "Cluster" -SwitchName "ConvergedNetSwitch"
        Add-VMNetworkAdapter -ManagementOS -Name "HV-Cluster" -SwitchName $SwitchName
        Set-VMNetworkAdapter -ManagementOS -Name "HV-Cluster" -MinimumBandwidthWeight 20 -VmqWeight 80
        Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "HV-Cluster" -Access -VlanId 0

        #Creating LiveMigration Adapters
        Write-Host "$CurrentDate --> Creating and configuring virtual NIC for LiveMigration"
        Write-Output "$CurrentDate --> Creating and configuring virtual NIC for LiveMigration" | Add-Content $LogPath
        Add-VMNetworkAdapter -ManagementOS -Name "HV-MIG" -SwitchName $SwitchName
        Set-VMNetworkAdapter -ManagementOS -Name "HV-MIG" -MinimumBandwidthWeight 40 -VmqWeight 90
        Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "HV-MIG" -Access -VlanId 0

        #Creating iSCSI-A Adapters
        Write-Host "$CurrentDate --> Creating and configuring virtual NIC for iSCSI-A"
        Write-Output "$CurrentDate --> Creating and configuring virtual NIC for iSCSI-A" | Add-Content $LogPath
        Add-VMNetworkAdapter -ManagementOS -Name "iSCSI-A" -SwitchName $SwitchName
        Set-VMNetworkAdapter -ManagementOS -Name "iSCSI-A" -MinimumBandwidthWeight 40 -VmqWeight 100
        Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "iSCSI-A" -Access -VlanId 0

        #Creating iSCSI-B Adapters
        Write-Host "$CurrentDate --> Creating and configuring virtual NIC for iSCSI-B"
        Write-Output "$CurrentDate --> Creating and configuring virtual NIC for iSCSI-B" | Add-Content $LogPath
        Add-VMNetworkAdapter -ManagementOS -Name "iSCSI-B" -SwitchName $SwitchName
        Set-VMNetworkAdapter -ManagementOS -Name "iSCSI-B" -MinimumBandwidthWeight 40 -VmqWeight 100
        Set-VMNetworkAdapterVlan -ManagementOS -VMNetworkAdapterName "iSCSI-B" -Access -VlanId 0

                
        Write-Host "Waiting 40 seconds for virtual devices to initialise"
        Start-Sleep -Seconds 40

        #Configure the IP's for the Virtual Adapters
        Write-Host "$CurrentDate --> Configuring IPv4 address for the Management OS virtual NIC"
        Write-Output "$CurrentDate --> Configuring IPv4 address for the Management OS virtual NIC" | Add-Content $LogPath
        #New-NetIPAddress -InterfaceAlias "vEthernet (SYD-MGMT)" -IPAddress $ManagmentOSIPv4 -PrefixLength 24 -DefaultGateway $CommanGatewayIPv4
        New-NetIPAddress -InterfaceAlias "vEthernet (SYD-MGMT)" -IPAddress $ManagmentOSIPv4 -PrefixLength 24
        Set-DnsClientServerAddress -InterfaceAlias "vEthernet (SYD-MGMT)" -ServerAddresses ($ManagmentDNS1, $ManagmentDNS2)

        Write-Host "$CurrentDate --> Configuring IPv4 address for the Management OS virtual NIC"
        Write-Output "$CurrentDate --> Configuring IPv4 address for the Management OS virtual NIC" | Add-Content $LogPath
        New-NetIPAddress -InterfaceAlias "vEthernet (MEL-MGMT)" -IPAddress $ManagmentOS2IPv4 -PrefixLength 24
        Set-DnsClientServerAddress -InterfaceAlias "vEthernet (MEL-MGMT)" -ServerAddresses ($ManagmentDNS3, $ManagmentDNS4)

        Write-Host "$CurrentDate --> Configuring IPv4 address for the Cluster virtual NIC"
        Write-Output "$CurrentDate --> Configuring IPv4 address for the Cluster virtual NIC" | Add-Content $LogPath
        New-NetIPAddress -InterfaceAlias "vEthernet (HV-Cluster)" -IPAddress $ClusterIPv4 -PrefixLength 24
        #Set-DnsClientServerAddress -InterfaceAlias "vEthernet (HV-Cluster)" -ServerAddresses $ManagmentDNS1

        Write-Host "$CurrentDate --> Configuring IPv4 address for the LiveMigration virtual NIC"
        Write-Output "$CurrentDate --> Configuring IPv4 address for the LiveMigration virtual NIC" | Add-Content $LogPath
        New-NetIPAddress -InterfaceAlias "vEthernet (HV-MIG)" -IPAddress $LiveMigrationIPv4 -PrefixLength 24
        #Set-DnsClientServerAddress -InterfaceAlias "vEthernet (LiveMigration)" -ServerAddresses $ManagmentDNS1

        Write-Host "$CurrentDate --> Configuring IPv4 address for the iSCSI-A virtual NIC"
        Write-Output "$CurrentDate --> Configuring IPv4 address for the iSCSI-A virtual NIC" | Add-Content $LogPath
        New-NetIPAddress -InterfaceAlias "vEthernet (iSCSI-A)" -IPAddress $CSVIPv4 -PrefixLength 24
        #Set-DnsClientServerAddress -InterfaceAlias "vEthernet (iSCSI-A)" -ServerAddresses $ManagmentDNS1

        Write-Host "$CurrentDate --> Configuring IPv4 address for the iSCSI-B virtual NIC"
        Write-Output "$CurrentDate --> Configuring IPv4 address for the iSCSI-B virtual NIC" | Add-Content $LogPath
        New-NetIPAddress -InterfaceAlias "vEthernet (iSCSI-B)" -IPAddress $CSV2IPv4 -PrefixLength 24
        #Set-DnsClientServerAddress -InterfaceAlias "vEthernet (CSV2)" -ServerAddresses $ManagmentDNS1

        #Write-Host "$CurrentDate --> Configuring IPv4 address for the VMNet virtual NIC"
        #Write-Output "$CurrentDate --> Configuring IPv4 address for the VMNet virtual NIC" | Add-Content $LogPath
        #New-NetIPAddress -InterfaceAlias "vEthernet (VMNet)" -IPAddress $VMNetIPv4 -PrefixLength 24
        #Set-DnsClientServerAddress -InterfaceAlias "vEthernet (VMNet)" -ServerAddresses $ManagmentDNS1

        
        Write-Host "$CurrentDate --> Hyper-V Configuration is Complete"
        Write-Output "$CurrentDate --> Hyper-V Configuration is Complete" | Add-Content $LogPath
    }


}
catch [Exception]
{
    throw "$_" | Add-Content $LogPath
}

I would really like to know why I'm getting absolutely poor performance. Any help on this would be most appreciated.


Viewing all articles
Browse latest Browse all 8743

Trending Articles