查看 SQL Server 2012 中的高内存使用率 [英] Seeing High Memory Usage In SQL Server 2012

查看:29
本文介绍了查看 SQL Server 2012 中的高内存使用率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚安装了 SQL Server 2012 并实施了 AAG.它是 Windows 2012 上的 2 节点集群.服务器是使用 VMWare 5.1 的 VM.出于某种原因,我看到内存使用量最大为 15 演出.该服务器有 16 GB 的内存,我已将 SQL 中的最大内存设置为 12 GB,将最小内存服务器设置为 8 gig.SQL 像这样最大化内存是否正常?该服务器上没有其他应用程序在运行,而且当时活动非常少.

We have just installed SQL Server 2012 and implemented AAG. It is a 2 node cluster on Windows 2012. The servers are VMs using VMWare 5.1. For some reason, I am seeing the memory usage max out at 15 gigs. The server has 16 GB of memory and I have set the max memory in SQL to be 12gb and the min memory server to be 8 gigs. Is this normal for SQL to max out on the memory like that? There are no other applications running on that server and at the time there is very low activity.

推荐答案

SQL Server 将非常占用内存,并在属性中设置的限制范围内从操作系统中获取可用的内存.您还没有完全清楚 15GB 的内存使用量"是用于整个服务器还是用于 sql 服务器本身?如果在您将最大内存设置为 12 之后它使用 15GB,我会感到惊讶.如果您的 SQL 服务器使用 12 而您的操作系统的其余部分使用 3GB,那么这对我来说听起来很正常.

SQL Server will be very memory 'hungry' and take what it can from the OS within the limits set in the properties. You haven't been totally clear as to whether your 'memory usage' of 15GB is for the server as a whole or for the sql server itself? I would be surprised if it was using 15GB after you have set the max memory to 12. If your SQL server is using 12 and the rest of your OS is using 3GB then this sounds very normal to me.

确定 SQL 服务器正在使用的内存并不像查看 Windows 任务管理器那么简单.正如我所提到的,它将尽可能地从操作系统中避免在以后要求更多内存时产生任何开销,即使它尚未全部使用.

Determining what memory SQL server is using is not as simple as looking at the Windows Task Manager. As I mentioned, it will take what it can from the OS to avoid any overhead in claiming more memory later, even if it isn't using it all yet.

我们有使用高达 64GB 内存的服务器,当我们倾向于分配比服务器总数少 4GB 的 SQL Server 时,剩下 4GB 用于 Windows.然后我希望大多数服务器始终只显示 1 或 2GB 的可用内存.这确实使了解内存是否是 SQL Server 中的瓶颈变得更加困难,为此您将需要使用 user2665372 状态的性能计数器.有关更多详细信息,请参阅此内容:SQL Server 实际使用了多少 RAM?

We have servers using up to 64GB of memory and when we tend to allocate SQL Server 4GB less than the server total, leaving that 4GB for Windows. I would then expect most servers to only show 1 or 2GB free memory at all times. This does make it more difficult to understand whether memory is a bottleneck within SQL Server, for that you will need to use the performance counters as user2665372 states. See this for further details: How much RAM is SQL Server actually using?

这篇关于查看 SQL Server 2012 中的高内存使用率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆