sql server 内存

SQL Server performance basics article, we explained why performance monitoring was important and what you should consider before you start monitoring SQL Server performance SQL Server性能基础文章,我们解释了为什么性能监视如此重要以及在开始监视SQL Server性能之前应考虑的事项

Different environments and applications require different metrics to be measured. The first task is to determine what parameters to track. The second task is to find out what values indicate normal and bad performance, and what the baselines are

不同的环境和应用程序需要测量不同的指标。 第一项任务是确定要跟踪的参数。 第二项任务是找出哪些值指示正常和不良性能,以及哪些基准是

Once you determine your performance goals, selecting the metrics and baseline values is easier. For most performance goals, monitoring memory, CPU usage, disk activity, and network traffic is common

确定绩效目标后,选择指标和基准值就变得容易了。 对于大多数性能目标,通常监视内存,CPU使用率,磁盘活动和网络流量

A general recommendation for smooth SQL Server running is to have a dedicated server for it. Having other applications on the same machine will make SQL Server compete with other applications for memory, processor, and disk resources, and thus downgrade SQL Server performance

为了使SQL Server顺利运行,通常的建议是使用专用的服务器。 在同一台计算机上拥有其他应用程序将使SQL Server与其他应用程序竞争内存,处理器和磁盘资源,从而降低SQL Server性能

SQL Server内存指标 (SQL Server memory metrics)

Memory metrics indicate server health

内存指标指示服务器运行状况

The operating system provides a number of performance counters that are associated with memory. The most important are: Pages/sec, Page Faults/sec, Pages Input/sec, Pages Output/sec, Page Reads/sec, Page Writes/sec, Available Memory, Non-pageable memory pool bytes, Pageable memory pool bytes, and Committed Bytes [1]

操作系统提供了许多与内存关联的性能计数器。 最重要的是: 页/秒,页错误/秒,页输入/秒,页输出/秒,页读取/秒,页写入/秒,可用内存,不可分页的内存池字节,可分页的内存池字节和提交的字节数 [1]

Adding memory can solve some of the performance issues caused by insufficient memory. If some parameters are not properly configured and performance issues properly diagnosed, additional memory will not improve SQL Server performance and you’ll be back to square one

添加内存可以解决由于内存不足而导致的某些性能问题。 如果某些参数配置不正确并且性能问题得到正确诊断,那么额外的内存将无法提高SQL Server的性能,您将回到第一位。

页数/秒 (Pages/sec)

Pages/sec is one of the most important memory metrics. It’s recommended to monitor it whatever performance goals are

页数/秒是最重要的内存指标之一。 无论性能目标是什么,建议对其进行监视

The pages/sec counter “Shows the rate at which pages are read from or written to disk to resolve hard page faults. This counter is a primary indicator of the kinds of faults that cause system-wide delays. It is the sum of Memory\ Pages Input/sec and Memory\ Pages Output/sec. It is counted in numbers of pages, so it can be compared to other counts of pages, such as Memory\ Page Faults/sec, without conversion. It includes pages retrieved to satisfy faults in the file system cache (usually requested by applications) and noncached mapped memory files.” [2]

“ pages / sec counter (页面/秒计数器) “显示从磁盘读取或写入磁盘以解决硬页面错误的速率。 该计数器是导致系统范围延迟的各种故障的主要指示器。 它是“内存\页面输入/秒”和“内存\页面输出/秒”的总和。 它以页数计,因此可以将其与其他页数进行比较,例如“ Memory \ Page Faults / sec”,而无需进行转换。 它包括为满足文件系统缓存(通常由应用程序请求)和未缓存的映射内存文件中的错误而检索的页面。” [2]

Note that this is not the same as Page Faults/sec

请注意,这与“ 页面错误/秒”不同

The average Pages/sec value should be below 50. It’s not possible to reduce the value to zero, as moving pages from memory and to memory always occurs while the operating system is running. The more memory the server has, fewer pages have to be written and read due to page faults

Pages / sec的平均值应小于50。将值减小到零是不可能的,因为在操作系统运行时,总是发生从内存到内存的页面移动。 服务器具有更多的内存,由于页面错误,必须写入和读取的页面更少

A high value of Pages/sec indicates intensive memory activity – many pages are written from disk to RAM and read from RAM to disk. High Pages/sec values can indicate insufficient RAM memory, overhead and SQL Server performance degradation, but it doesn’t necessarily have to be so. A high Pages/sec value can also be caused by sequential reading of a file mapped in memory. To determine whether this is the case, check the Memory Available Bytes and Paging File % Usage values [4]

页面/秒 ”的高值表示密集的内存活动-许多页面从磁盘写入RAM,并从RAM读取到磁盘。 页/秒的高值可能表示RAM内存不足,开销和SQL Server性能下降,但不一定如此。 页面/秒的高值也可能是由顺序读取内存中映射的文件引起的。 要确定是否是这种情况,请检查“ 内存可用字节数”和“ 分页文件百分比使用率”值 [4]

Occasional peaks are normal and appear when creating SQL Server database and transaction log backups, restoring databases, importing and exporting data, and performing other complex tasks

偶尔出现峰值是正常现象,并在创建SQL Server数据库和事务日志备份,还原数据库,导入和导出数据以及执行其他复杂任务时出现

It’s recommended to have a dedicated server for SQL Server only, as other applications can use memory needed by SQL Server and affect SQL Server performance. A counter that indicates that this is the case is Buffer Hit Cache Ratio. If its value is 99% or higher for more than 24 hours and during this same period the Pages/sec value is higher than 50, other applications use memory needed by SQL Server

建议仅使用专用于SQL Server的服务器,因为其他应用程序可以使用SQL Server所需的内存并影响SQL Server的性能。 指示这种情况的计数器是“ 缓冲区命中缓存比率” 。 如果它的值在24小时内超过99%或更高,并且在同一时期内“ 页数/秒”值高于50,则其他应用程序将使用SQL Server所需的内存

If there are no other applications and Pages/sec is still higher than 50, SQL Server is not taking as much memory as it needs, which means that the memory settings are not configured correctly

如果没有其他应用程序,并且“ 页数/秒”仍然高于50,则SQL Server占用的内存不足,这意味着内存设置未正确配置

  1. In SQL Server Management Studio Object Explorer, right click the SQL Server instance
  2. 在“ SQL Server Management Studio 对象资源管理器”中 ,右键单击“ SQL Server实例”
  3. Properties属性
  4. Memory记忆体
  5. Set the Maximum server memory (in MB) to approximately 80% of available physical memory, in order to leave enough memory for the operating system

    最大服务器内存(以MB为单位)设置为可用物理内存的大约80%,以便为操作系统保留足够的内存

If SQL Server has already been allocated maximum available memory, the solution is adding additional RAM

如果已经为SQL Server分配了最大可用内存,则解决方案将添加其他RAM

页面错误/秒 (Page Faults/sec)

Page faults are one of the most common problems with memory

页面错误是内存中最常见的问题之一

“A page fault occurs when a program requests an address on a page that is not in the current set of memory resident pages” [3]

“当程序在一个页面上请求的地址不在当前的内存驻留页面集中时,就会发生页面错误” [3]

When a page fault is encountered, the program execution stops and is set to the Wait state. The operating system searches for the requested address on the disk. When the page is found, the operating system copies it from the disk into a free RAM page. The operating system allows the program to continue with the execution afterwards

遇到页面错误时,程序执行将停止并设置为“等待”状态。 操作系统在磁盘上搜索请求的地址。 找到该页面后,操作系统会将其从磁盘复制到可用的RAM页面中。 操作系统允许程序随后继续执行

There are two types of page faults – hard and soft page faults. Hard page faults occur when the requested page is not in the physical memory. Soft page faults occur when the requested page is in the memory, but cannot be accessed by the program as it is not on the right address, or is being accessed by another program

页面错误有两种类型-硬页面错误和软页面错误。 当请求的页面不在物理内存中时,将发生硬页面错误。 当请求的页面在内存中时,就会出现软页面错误,但是由于该页面不在正确的地址上,或者正在被另一个程序访问,因此无法被程序访问

Monitoring page faults is important as excessive hard page faults affect application performance. Soft page faults cause no performance issues. The Page faults/sec counter shows both hard and soft page faults, so it can be difficult to determine whether the page faults value indicates performance problems in SQL Server, and should be addressed, or presents a normal state

监视页面错误很重要,因为过多的硬页面错误会影响应用程序性能。 软页面错误不会导致性能问题。 Page Faults / sec计数器同时显示了硬页面错误和软页面错误,因此可能很难确定页面错误值是否指示SQL Server中的性能问题,是否应该解决该页面错误或应将其呈现为正常状态

There is no specific Page faults/sec value that indicates performance problems. Monitoring Page faults/sec should provide enough information to create a baseline that will be used to determine normal server performance. The normal values are 10 to 15, but even 1,000 page faults per second can be normal in specific environments. The value depends on the type and amount of memory, and the speed of disk access. A sustained or increasing value for Page faults/sec can indicate insufficient memory. If this is the case, check the Page reads/sec value, as it also indicates hard page faults. If the latter is also high, it indicates insufficient memory on the machine

没有特定的Page Faults / sec值指示性能问题。 每秒监视页面故障数应提供足够的信息来创建基线,该基线将用于确定正常的服务器性能。 正常值为10到15,但是在特定环境下,每秒甚至有1,000个页面错误也可以是正常的。 该值取决于内存的类型和数量以及磁盘访问的速度。 Page Faults / sec的持续值或增加值可能表示内存不足。 如果是这种情况,请检查“ 页面读取/秒”值,因为它也表示硬页面错误。 如果后者也很高,则表明机器上的内存不足

Pages/sec and Page faults/sec are two of several most important memory performance metrics. Their high values don’t necessarily indicate memory problems. Sometimes it’s normal and checking other memory metrics is necessary to determine whether there’s a serious issue with performance. However, these metrics should not be skipped in any SQL Server performance monitoring scenarios

Pages / secPage Faults / sec是几个最重要的内存性能指标中的两个。 它们的高值不一定表示存在内存问题。 有时这很正常,有必要检查其他内存指标以确定性能是否存在严重问题。 但是,在任何SQL Server性能监视方案中都不应跳过这些指标。

翻译自: https://www.sqlshack.com/sql-server-memory-performance-metrics-part-1-memory-pagessec-memory-page-faultssec/

sql server 内存

sql server 内存_SQL Server内存性能指标–第1部分–内存页/秒和内存页故障/秒相关推荐

  1. sql server 内存_SQL Server内存性能指标–第3部分– SQL Server Buffer Manager指标和内存计数器

    sql server 内存 previous parts of the SQL Server performance metrics series, we presented most importa ...

  2. sql server 内存_SQL Server内存性能指标–第5部分–了解惰性写入,空闲列表停顿/秒和待批内存授予

    sql server 内存 SQL Server performance metrics series with the SQL Server memory metrics that should b ...

  3. sql server 内存_SQL Server内存性能指标–第6部分–其他内存指标

    sql server 内存 Memory Manager metrics, the memory pressure can be indicated via the 内存管理器指标,可以通过Buffe ...

  4. sql tempdb清理_SQL Server 2019中的内存优化的TempDB元数据

    sql tempdb清理 介绍 (Introduction) In-memory technologies are one of the greatest ways to improve perfor ...

  5. sql数据透视_SQL Server中的数据科学:取消数据透视

    sql数据透视 In this article, in the series, we'll discuss understanding and preparing data by using SQL ...

  6. sql server 别名_SQL Server别名概述

    sql server 别名 This article gives an overview of SQL Server Alias and its usage for connecting with S ...

  7. sql server 面试_SQL Server审核面试问题

    sql server 面试 In this article, we will discuss a number of common and important SQL Server Audit que ...

  8. sql server 转发_SQL Server中的转发记录性能问题

    sql server 转发 This article discusses the Forwarded Records and its performance issues for heap table ...

  9. 2008 r2 server sql 中文版补丁_SQL Server 2008 SP4 补丁

    SQL Server 2008 SP4 补丁对于客户而言,Microsoft SQL Server 2008 Service Pack 4 中的几个关键改进如下所示: 改进了从 SQL Server ...

最新文章

  1. 除了腾讯阿里,中国最牛的风投机构,其实是合肥市政府!
  2. 登录方式1:MySQL自带客户端
  3. 使用pscp从windows电脑拷贝数据到linux遇到的ssh_init错误
  4. .NET Core项目部署到linux(Centos7)
  5. 使用STM32的USB模块中后对USB缓冲区的认识
  6. 计算机应用全能,全能计算助手
  7. iOS内存管理的知识梳理
  8. 背水一战:苹果向三星采购5G基带芯片遭拒 或自行研发
  9. kafka : CommitFailedException already rebalanced and assigned max.poll.records
  10. 文件系统的简单的操作
  11. algorithm与numeric的一些常用函数
  12. Atitit 软件架构方法的进化与演进cs bs soa roa  msa  attilax总结
  13. java课程设计模拟画图_课程设计java画板模拟画图工具
  14. 二维粒子群算法的matlab源程序,二维粒子群算法的matlab源程序
  15. 守卫数据中心命门的胡桃夹子-特权账号管理平台
  16. 一个简化的分布式系统架构图
  17. (01)ORB-SLAM2源码无死角解析-(18) SVD奇异值分解→求解Homography,Fundamental矩阵,了解矩阵自由度
  18. 基于java网络版坦克大战游戏
  19. 运用流体布局的html代码,jquery 流体布局插件:Waterfall
  20. 空指针异常可能出现的原因

热门文章

  1. 网关为0.0.0.0_距离ETH 2.0仅7天,目标价为?美元
  2. LINQ to SQL VS LINQ to Entities
  3. 设计模式教程(Design Patterns Tutorial)笔记之一 创建型模式(Creational Patterns)...
  4. springboot和ssm的区别
  5. 面向对象一些概念简述
  6. bzoj 3709: [PA2014]Bohater
  7. 17011301(UE4的AnimDynamic)
  8. 举例让抽象问题具体化:二叉搜索树的后序遍历序列
  9. request中getParameter和getAttribute的区别
  10. opencv新手注意