服务器上的内存使用率

Microsoft.SQLServer.2008.AnalysisServices.UnitMonitor.Instance.MemoryUsageByOtherProcess (UnitMonitor)

监视器将观察服务器上非 Analysis Services 进程的内存使用率,以确保 Analysis Services 的“总内存限制”始终可用。

Knowledge Base article:

摘要

通过竞争 SSAS 实例也必须分配的共享资源,托管该实例的服务器上的内存使用率可能会影响服务器的运行状况和性能。这种情况可能会导致计算机上的可用物理内存耗尽,从而强制操作系统将数量级比物理内存慢的虚拟内存映射到磁盘上的页文件。对于依赖于 SSAS 实例的任何业务关键应用程序,应以这种方式对服务器进行配置以便其他进程(例如防病毒、磁盘碎片整理、SSAS 的其他实例或 SQL Server 关系数据库引擎等)不会分配过多内存,而分配过多内存会导致这种情况发生。

原因

与 SSAS 实例显著竞争内存的最常见的进程主要包括 SSAS 的其他实例、SQL Server 关系数据库引擎或其他数据库服务器,因为这些进程往往是也托管 SSAS 的服务器上托管的内存最大占用者。非数据库软件有时可能也会大量占用内存。在这种情况下,内存考虑事项可能会频繁影响服务器的配置。

此外,可用未保留内存的值(FreeUnreservedPercent 参数)可能变为负数。此参数的计算方法如下: 100% 总内存减去实例(SSAS)占用的高内存使用率,然后减去其他进程占用的内存使用率。原因可能包括:

可以使用“任务管理器”来检查服务器上不同进程的内存使用率。在 Window Server 2008 R2 的“进程”选项卡和 Windows Server 2008 的“详细信息”选项卡上,可以按“内存”列排序,以查找系统上占用内存最多的进程。如果 SSAS 实例(msmdsrv.exe)或 SQL Server 关系数据库引擎(sqlservr.exe)占用的内存过多,这种方法可以方便地快速确认其使用率,当然也可以了解系统上的其他内存是否加重了这种状况。随后可相应地采取更正操作(如 SQL 管理员调整实例内存使用率、添加硬件、或减少/拆分计算机工作负荷)。

解决方法

解决服务器总使用率的问题需要管理员了解并考虑多个因素,包括(但不限于)工作负荷要求、用户和作业计划、服务器计算机上的其他已计划进程以及可用资源。修复服务器计算机上过多总内存分配的操作可包括以下任一操作:

外部

针对 Analysis Services 内存属性的 TechNet 文档

在 Analysis Services 中配置服务器属性

SSAS 多维性能指南

可替代参数

名称

说明

默认值

严重阈值(%)

当可用未保留空间(%)低于阈值时,运行状况将更改为“严重”。

5

已启用

启用或禁用工作流

生成警报

定义工作流是否生成警报

间隔(秒)

运行工作流的重复间隔时间(秒)。

900

样本数

如果阈值违反次数大于或等于最小违反次数,运行状况将发生更改。

4

同步时间

使用 24 小时格式指定的同步时间。可以忽略。

 

超时(秒)

指定允许工作流在被关闭并标记为失败之前运行的时间。

300

警告阈值(%)

当可用未保留空间(%)低于阈值,但仍高于严重阈值(%)时,运行状况将更改为“警告”。

10

Element properties:

TargetMicrosoft.SQLServer.2008.AnalysisServices.Instance
Parent MonitorSystem.Health.PerformanceState
CategoryPerformanceHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.SQLServer.2008.AnalysisServices.MonitorType.Instance.MemoryUsageByOtherProcessPercent
RemotableTrue
AccessibilityPublic
Alert Message
SSAS 2008: 其他进程分配的内存过多
“总内存限制”设置规定的内存量可能不可用于 SSAS,因为其他进程分配的内存过多({4} GB)。
服务器上的总内存: {2} GB
总内存使用率: {5} GB
非 SSAS 进程使用的内存: {4} GB
SSAS 使用的内存: {3} GB
SSAS 内存下限: {6} GB ({7}\%)
SSAS 内存上限: {0} GB ({8}\%)
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SQLServer.2008.AnalysisServices.UnitMonitor.Instance.MemoryUsageByOtherProcess" Accessibility="Public" Enabled="true" Target="SQLAS!Microsoft.SQLServer.2008.AnalysisServices.Instance" ParentMonitorID="SystemHealth!System.Health.PerformanceState" Remotable="true" Priority="Normal" TypeID="Microsoft.SQLServer.2008.AnalysisServices.MonitorType.Instance.MemoryUsageByOtherProcessPercent" ConfirmDelivery="false">
<Category>PerformanceHealth</Category>
<AlertSettings AlertMessage="Microsoft.SQLServer.2008.AnalysisServices.UnitMonitor.Instance.MemoryUsageByOtherProcess.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='MemoryLimitHighGB']$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='MemoryLeavesForOsGB']$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='TotalPhysicalMemoryGB']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='MemoryUsageGB']$</AlertParameter4>
<AlertParameter5>$Data/Context/Property[@Name='MemoryUsageByOtherProcessGB']$</AlertParameter5>
<AlertParameter6>$Data/Context/Property[@Name='UsedPhysicalMemoryGB']$</AlertParameter6>
<AlertParameter7>$Data/Context/Property[@Name='MemoryLimitLowGB']$</AlertParameter7>
<AlertParameter8>$Data/Context/Property[@Name='MemoryLimitLowPercent']$</AlertParameter8>
<AlertParameter9>$Data/Context/Property[@Name='MemoryLimitHighPercent']$</AlertParameter9>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Error" MonitorTypeStateID="Below" HealthState="Error"/>
<OperationalState ID="Warning" MonitorTypeStateID="Between" HealthState="Warning"/>
<OperationalState ID="Success" MonitorTypeStateID="Above" HealthState="Success"/>
</OperationalStates>
<Configuration>
<WarningThreshold>10</WarningThreshold>
<CriticalThreshold>5</CriticalThreshold>
<IntervalSeconds>900</IntervalSeconds>
<SyncTime/>
<TimeoutSeconds>300</TimeoutSeconds>
</Configuration>
</UnitMonitor>