AK563279

Monitor_AK563279 (UnitMonitor)

Windows operating system missing update KB2510206 to prevent performance issues when computer has more than 64 processors

Knowledge Base article:

External

http://go.microsoft.com/fwlink/?LinkId=235065

Element properties:

TargetMicrosoft.KnowledgeServices.SQLServer.DBEngine
Parent MonitorSystem.Health.ConfigurationState
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.KnowledgeServices.Library.PowerShellMonitorEx
RemotableTrue
AccessibilityPublic
Alert Message
Windows operating system missing update KB2510206 to prevent performance issues when computer has more than 64 processors
<Details>
<Content>You are missing SQL Server update KB2510206. This update guarantees that processors and NUMA nodes are distributed evenly on servers that have more than 64 processors. Processors are arranged into groups on servers with more than 64 processors. SQL Server 2008 is not processor group aware. As a result SQL Server can start on a processor group with few processors or NUMA nodes and end up using much less processors than available on the system. This will cause performance problems in SQL Server. </Content>
<CollectedInformation>
<Info>
<Name>Number of processors on this server</Name>
<Value>{0}</Value>
</Info>
<Info>
<Name>Current SQL Server version</Name>
<Value>{1}</Value>
</Info>
<Info>
<Name>Current NTOSKRNL version</Name>
<Value>{2}</Value>
</Info>
<Info>
<Name>Recommended NTOSKRNL version</Name>
<Value>{3}</Value>
</Info>
</CollectedInformation>
</Details>
RunAsDefault
CommentSupportTopic=TBD;VersionNumber=1.0.0.0;

Source Code:

<UnitMonitor ID="Monitor_AK563279" Comment="SupportTopic=TBD;VersionNumber=1.0.0.0;" Accessibility="Public" Enabled="true" Target="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="KnowledgeServicesLibrary!Microsoft.KnowledgeServices.Library.PowerShellMonitorEx" ConfirmDelivery="true">
<Category>Alert</Category>
<AlertSettings AlertMessage="MonitorMessageed60a8aaffb0452089775f3733d3da77">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/LogicalProcessors$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/ProductVersion$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/NtoskrnlVersion$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='RecommendedVersion']$</AlertParameter4>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Success" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ScriptName>AK563279.ps1</ScriptName>
<Parameters>
<Parameter>
<Name>MajorVersion</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/MajorVersion$</Value>
</Parameter>
<Parameter>
<Name>MinorVersion</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/MinorVersion$</Value>
</Parameter>
<Parameter>
<Name>NtoskrnlMajor</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/NtoskrnlMajor$</Value>
</Parameter>
<Parameter>
<Name>NtoskrnlMinor</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/NtoskrnlMinor$</Value>
</Parameter>
<Parameter>
<Name>NtoskrnlVersion</Name>
<Value>$Target/Property[Type="KnowledgeServicesSQLServerLibrary!Microsoft.KnowledgeServices.SQLServer.DBEngine"]/NtoskrnlVersion$</Value>
</Parameter>
<Parameter>
<Name>LogicalProcessors</Name>
<Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/LogicalProcessors$</Value>
</Parameter>
</Parameters>
<ScriptBody><Script>


param($MajorVersion,$MinorVersion,$NtoskrnlMajor,$NtoskrnlMinor,$NtoskrnlVersion,$LogicalProcessors)

$ErrorActionPreference = "Stop"

# Set up the arguments
$scriptargs = new-object psobject
$scriptargs | add-member NoteProperty "MajorVersion" $MajorVersion
$scriptargs | add-member NoteProperty "MinorVersion" $MinorVersion
$scriptargs | add-member NoteProperty "NtoskrnlMajor" $NtoskrnlMajor
$scriptargs | add-member NoteProperty "NtoskrnlMinor" $NtoskrnlMinor
$scriptargs | add-member NoteProperty "NtoskrnlVersion" $NtoskrnlVersion
$scriptargs | add-member NoteProperty "LogicalProcessors" $LogicalProcessors

# Set up the output
$global:scriptoutput = new-object psobject
$scriptoutput | add-member NoteProperty "HasIssue" $false
$scriptoutput | add-member NoteProperty "RecommendedVersion" ""

#-----------------------------------------------------
# MAIN CODE SECTION
#-----------------------------------------------------

# Environment

$scriptenv = new-object psobject
$scriptenv | Add-Member NoteProperty "ErrorFlag" $false


# Helper functions
function GetRecommendedVersion([string]$NtoskrnlVersion){
# the fix builds are different depending upon service pack and GDR/LDR branch
# RTM GDR fix: 6.1.7600.16770 [use format 6.1.7600.16XXX to determine this]
# RTM LDR fix: 6.1.7600.20912 [use format 6.1.7600.20XXX to determine this]
# SP1 GDR fix: 6.1.7601.17568 [use format 6.1.7601.17XXX to determine this]
# SP1 LDR fix: 6.1.7601.21671 [use format 6.1.7601.21XXX to determine this]
$versionPrefix = $NtoskrnlVersion.Substring(0,11)
$actualVersion = [int]::Parse($NtoskrnlVersion.Substring(9))

$fixVersion = ""
switch ($versionPrefix) {
"6.1.7600.16"
{
if ($actualVersion -lt 16770){
$fixVersion = "6.1.7600.16770"
}
break
}
"6.1.7600.20"
{
if ($actualVersion -lt 20912){
$fixVersion = "6.1.7600.20912"
}
break
}
"6.1.7601.17"
{
if ($actualVersion -lt 17568){
$fixVersion = "6.1.7601.17568"
}
break
}
"6.1.7601.21"
{
if ($actualVersion -lt 21671){
$fixVersion = "6.1.7601.21671"
}
break
}
default {
break
}
}

return $fixVersion
}

# Main function

function AdvisorRule($scriptargs, $scriptoutput)
{
trap [Exception] {
$scriptenv.ErrorFlag = $true
continue
}

# Initialize parameters
$scriptoutput.HasIssue = $false
$scriptoutput.RecommendedVersion = ""

# Detection Logic

# check if the config point [SQL DB Engine]::[Product Version] is of the format 10.00
# only SQL Server 2008 is affected by this problem
# check if the config point [Windows Operating System]::[OSVersion] is of format 6.1.
# only Windows 2008 R2 is affected by this problem
if (
($scriptargs.MajorVersion -eq 10) -and
($scriptargs.MinorVersion -eq 0) -and
($scriptargs.NtoskrnlMajor -eq 6) -and
($scriptargs.NtoskrnlMinor -eq 1)
)
{
# check if the server has more than 64 processors
if ([int]::Parse($scriptargs.LogicalProcessors) -gt 64){
$scriptoutput.RecommendedVersion = GetRecommendedVersion $scriptargs.NtoskrnlVersion
if ($scriptoutput.RecommendedVersion -ne ""){
if($scriptenv.ErrorFlag -eq $false)
{
$scriptoutput.HasIssue = $true
}
}
}
}
}

AdvisorRule $scriptargs $scriptoutput

# set the output
$mom = new-object -comobject "MOM.ScriptAPI"
$bag = $mom.CreatePropertyBag()

if ($scriptoutput.HasIssue -ne $null)
{
$bag.AddValue("HasIssue", $scriptoutput.HasIssue)
}

if ($scriptoutput.RecommendedVersion -ne $null)
{
$bag.AddValue("RecommendedVersion", $scriptoutput.RecommendedVersion)
}

$bag

</Script></ScriptBody>
<SnapIns/>
<TimeoutSeconds>300</TimeoutSeconds>
<Schedule>86397</Schedule>
<ErrorExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Boolean">Property[@Name='HasIssue']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Boolean">true</Value>
</ValueExpression>
</SimpleExpression>
</ErrorExpression>
<SuccessExpression>
<Not>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Boolean">Property[@Name='HasIssue']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Boolean">true</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Not>
</SuccessExpression>
</Configuration>
</UnitMonitor>