here were various changes to memory related DMVs, DBCC memory status, and Perfmon counters in SQL Server 2012 as part of the redesign of the Memory Manager component of SQLOS. The Memory Manager redesign resulted in being able to more accurately size and govern all SQL Server memory consumption, making page allocations more efficient, and better handling and tracking of NUMA node memory allocations. This post aims to document these surface area changes in one place to serve as a quick reference.

Some of these changes were to standardize memory counters as “kb” rather than bytes or pages, continuing a process begun earlier, but now more relevant since the single and multi-page allocators were replaced by an any-size page allocator, so counting pages allocated would no longer give a meaningful view of memory use. This consolidation of allocators also resulted consolidated counters for page allocation.

Other changes reflect the central role of the redesigned Memory Manager in being the interface to the OS, providing page allocations for the other components. A modular summary of the architectural changes is shown below:

DMV Changes

sys.dm_os_memory_nodes

The consolidation of the single and multi-page allocators is reflected in the pages_kb column in sys.dm_os_memory_nodes. The new foreign_committed_kb counter is a result of the improved NUMA management and reporting in SQL 2012 and identifies memory on a noe that belongs to a remote node, which can be useful if you’re troubleshooting slower memory access. We will always try and use local memory first, at least until the target memory is reached.

sys.dm_os_memory_nodes

SQL Server 2012

SQL Server 2008 R2

pages_kb

single_pages_kb +
  multi_pages_kb

foreign_committed_kb

sys.dm_os_sys_info

The main memory manager changes here are to standardize memory counters.

sys.dm_os_sys_info

SQL Server 2012

SQL Server 2008 R2

physical_memory_kb

physical_memory_in_bytes

virtual_memory_kb

virtual_memory_in_bytes

committed_kb

bpool_committed

committed_target_kb

bpool_commit_target

visible_target_kb

bpool_visible

sys.dm_os_memory_cache_counters

sys.dm_os_memory_cache_counters

SQL Server 2012

SQL Server 2008 R2

pages_kb

single_pages_kb +
  multi_pages_kb

pages_in_use_kb

single_pages_in_use_kb
  + multi_pages_in_use_kb

sys.dm_os_memory_cache_entries

sys.dm_os_memory_cache_entries

SQL Server 2012

SQL Server 2008 R2

pages_kb

pages_allocated_count

sys.dm_os_memory_clerks

sys.dm_os_memory_clerks

SQL Server 2012

SQL Server 2008 R2

pages_kb

single_pages_kb +
  multi_pages_kb

page_size_in_bytes

page_size_bytes

sys.dm_os_memory_objects

sys.dm_os_memory_objects

SQL Server 2012

SQL Server 2008 R2

pages_in_bytes

pages_allocated_count

max_pages_in_bytes

max_pages_allocated_count

DBCC Memory Status changes

Many of the DBCC memory counters that were previously under Buffer Pool have now been consolidated under Memory Manager to reflect the revised architecture. There is also some additional information to reflect OS errors and NUMA awareness. NUMA growth phase shows memory growth before the target is reached. The “Pages In Use” counter shows the actual number of pages in use, including the stolen pages, database pages, and the reserved memory. The Away Committed counter indicates how much memory from this node is committed from other nodes.

SQL Server
  2012

SQL Server
  2008 R2

Memory Manager \
  Large Pages Allocated

Memory Manager \
  Emergency Memory

Memory Manager \
  Reserved Memory

Memory Manager \ Emergency
  Memory In Use

Memory Manager \
  Reserved Memory In Use

Memory Manager \
  Target Committed (KB)

Buffer Pool \
  Target (Pages)

Memory Manager \
  Current Committed (KB)

Buffer Pool \
  Committed (Pages)

Memory Manager \
  Pages Allocated (KB)

Buffer Pool \
  Stolen (Pages) + Buffer Pool \ Database (Pages)

Memory Manager \
  Pages Reserved (KB)

Buffer Pool \
  Reserved (Pages)

Memory Manager \
  Pages Free (KB)

Buffer Pool \ Free
  (Pages)

Memory Manager \
  Pages In Use

Memory Manager \
  Page Alloc Potential (KB)

Buffer Pool \
  Stolen Potential (Pages)

Memory Manager \
  NUMA Growth Phase

Memory Manager \
  Last OOM Factor

Buffer Pool \ Last
  OOM Factor

Memory Manager \
  Last OS Error

SQL Server
  2012

SQL Server
  2008 R2

Memory Manager \
  Large Pages Allocated

Memory Manager \
  Emergency Memory

Memory Manager \
  Reserved Memory

Memory Manager \
  Emergency Memory In Use

Memory Manager \
  Reserved Memory In Use

Memory Manager \
  Target Committed (KB)

Buffer Pool \
  Target (Pages)

Memory Manager \ Current
  Committed (KB)

Buffer Pool \
  Committed (Pages)

Memory Manager \
  Pages Allocated (KB)

Buffer Pool \
  Stolen (Pages) + Buffer Pool \ Database (Pages)

Memory Manager \
  Pages Reserved (KB)

Buffer Pool \
  Reserved (Pages)

Memory Manager \
  Pages Free (KB)

Buffer Pool \ Free
  (Pages)

Memory Manager \
  Pages In Use

Memory Manager \
  Page Alloc Potential (KB)

Buffer Pool \
  Stolen Potential (Pages)

Memory Manager \
  NUMA Growth Phase

Memory Manager \
  Last OOM Factor

Buffer Pool \ Last
  OOM Factor

Memory Manager \
  Last OS Error

SQL Server
  2012

SQL Server
  2008 R2

Memory node Id = n
  \ Pages Allocated

Memory node Id = n
  \ MultiPage Allocator + Memory node Id = n \ SinglePage Allocator

Memory node Id = n
  \ Target Committed

Memory node Id = n
  \ Current Committed

Memory node Id = n
  \ Foreign Committed

Memory node Id = n
  \ Away Committed

Memory Clerks \
  Pages Allocated

Memory Clerks \
  SinglePage Allocator + Memory Clerks \ MultiPage Allocator

Perfmon counters

The Perfmon counter changes follow the same consolidation of counters under the Memory Manager object, and the standardization of counters to KB. Several deprecated AWE counters are now removed.

SQL Server 2012

SQL Server 2008 R2

Object – SQLServer:Memory
  Manager

Object – SQLServer:Buffer
  Manager

Database Cache Memory (KB)

Database pages

Free Memory (KB)

Free pages

Reserved Server Memory (KB)

Reserved pages

Stolen Server Memory (KB)

Stolen pages

Target
  Server Memory
  (KB)

Target
  pages

Total
  Server Memory (KB)

Total
  pages

AWE
  lookup maps / sec

AWE stolen maps / sec

AWE
  write maps /
  sec

AWE
  unmap
  calls / sec

AWE
  unmap
  pages / sec

SQL Server
  2012

SQL Server
  2008 R2

Object –
  SQLServer:Memory Node

Object –
  SQLServer:Buffer Node

Database Node
  Memory (KB)

Database pages

Free Node Memory
  (KB)

Free pages

Foreign Node Memory
  (KB)

Foreign pages

Stolen Node Memory
  (KB)

Stolen pages

Target Node Memory
  (KB)

Target pages

Total Node Memory
  (KB)

Total pages

I’ll follow up this article with some additional surface area changes for configuration and new memory manager messages that appear in the errorlog.

The goal of these changes is to make the new Memory Manager activity easier and more intuitive to track, and to clean up some of the values that no longer make sense with the any size page allocator and deprecation of AWE. Anything you used to use but can’t find any more? Let me know.

Memory Manager surface area changes in SQL Server 2012的更多相关文章

  1. SQL Server 2012 内存管理 (memory management) 改进

    SQL Server 2012 的内存管理和以前的版本相比,有以下的一些变化. 一.内存分配器的变化 SQL Server 2012以前的版本,比如SQL Server 2008 R2等, 有sing ...

  2. SQL Server 2012:SQL Server体系结构——一个查询的生命周期(第1部分)

    为了缩小读取操作所涉及范围,本文首先着眼于简单的SELECT查询,然后引入执行更新操作有关的附加过程.最后你会读到,优化性能时SQLServer使用还原工具的相关术语和流程. 关系和存储引擎 如图所示 ...

  3. 数据库服务器构建和部署列表(For SQL Server 2012)

    前言 我们可能经常安装和部署数据库服务器,但是可能突然忘记了某个设置,为后来的运维造成隐患.下面是国外大牛整理的的检查列表. 其实也包含了很多我们平时数据库配置的最佳实践.比如TEMPDB 文件的个数 ...

  4. 疑难杂症--SQL SERVER 2012下数据库内存异常回收

    --=================================================================== --背景: 在一台SQL SERVER 2012 SP1(1 ...

  5. 在Windows Server 2012 R2中搭建SQL Server 2012故障转移集群

    需要说明的是我们搭建的SQL Server故障转移集群(SQL Server Failover Cluster)是可用性集群,而不是负载均衡集群,其目的是为了保证服务的连续性和可用性,而不是为了提高服 ...

  6. SQL Server 2012 各版本功能比较

    有关不同版本的 SQL Server 2012 所支持的功能的详细信息. 功能名称 Enterprise 商业智能 Standard Web Express with Advanced Service ...

  7. SQL Server 2012 AlwaysOn集群配置指南

    1. AlwaysOn介绍 AlwaysOn是SQL Server 2012提供的全新综合.灵活.高效经济的高可用性和灾难恢复解决方案.它整合了镜像和群集的功能,基于OS 故障转移群集(Windows ...

  8. SQL Server 2012 连接到数据库引擎

    第 1 课:连接到数据库引擎 https://msdn.microsoft.com/zh-cn/library/ms345332(v=sql.110).aspx   本课将介绍主要的工具以及如何连接并 ...

  9. 卸载sql server 2012

    好不容易装上了sql server 2012数据库,可是却不能连接本地的数据库,后来发现缺少一些服务,于是决定重新安装,但是卸载却很麻烦,如果卸载不干净的话,重新安装会出问题,所以下面就总结一些方法: ...

随机推荐

  1. python web框架 django工程的创建

    安装 django pip3 install django pip install django 安装完后出现这两个文件 django-admin 用来创建文件夹 在script目录 执行这个命令 d ...

  2. 前端 javascript 变量

    变量: python: name = 'alex' JavaScript: name = 'alex' # 全局变量 声明var var name = 'eric' # 局部变量 写全局变量基本好少J ...

  3. linux去掉文件行尾的^M

    在Linux下使用vi来查看一些在Windows下创建的文本文件,有时会发现在行尾有一些“^M”.这种文件在执行时会报错bash: ./startserver.sh: /bin/sh^M: bad i ...

  4. radio,checkbox,select,input text获取值,设置哪个默认选中

    11 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title& ...

  5. windows平台kettle连接hbase的问题

    我本机安装的环境是centos7,并在本机上安装了zookeeper,hadoop,hbase,hive等组件, 使用pdi7.1来连接hbase,把mysql表中的数据导出到hbase中去,没有问题 ...

  6. spark[源码]-Pool分析

    概述 这篇文章主要是分析一下Pool这个任务调度的队列.整体代码量也不是很大,正好可以详细的分析一下,前面在TaskSchedulerImpl提到大体的功能,这个点在丰富一下吧. DAGSchedul ...

  7. H5 动画:轨迹移动 | H5游戏 推金币

    https://aotu.io/notes/2017/11/06/path-animation/ https://aotu.io/notes/2017/11/06/coindozer/

  8. javascript 基本数据类型、引用数据类型

    阅读目录 数据类型 两种访问方式 两种类型复制 函数参数的传递 两种变量类型检测 回到目录   数据类型 1.   ECMAScript变量包含两种不同类型的值:基本类型值.引用类型值: 2.   基 ...

  9. Spring Boot+BootStrap fileInput 多图片上传

    一.依赖文件 <link rel="stylesheet" type="text/css" th:href="@{/js/bootstrap/c ...

  10. Ubuntu 14.04.5 imx6 开发环境搭建

    1,下载VMware Workstation虚拟机 地址:http://1.xp510.com:801/xp2011/VMware10.7z 2,下载Ubuntu 14.04.5 LTS 32位Ubu ...