Sharepoint 性能之SQL Server内存设置
In this article, let’s understand the Minimum and Maximum server memory settings of SQL Server. The min server memory and max server memory configuration options establish upper and lower limits to the amount of memory used by the buffer pool of the SQL Server Database Engine. The buffer pool starts with only the memory required to initialize. As the workload increases, it keeps acquiring the memory required to support the workload.
When you peek into the SQL Server box for memory, you almost always find it is hogging all the available memory. This is because SQL Server is given the freedom to do so. The default Memory setting on SQL Server is as shown in the figure below; the min server memory is 0 and the max server memory is 2147483647 MB; that is the equivalent of nearly 2 PB. This is huge and hence will eat up all of the available memory. Though, SQL Server changes its memory requirements dynamically based on available system resources.
The maximum memory needs to be changed based on what other instances are installed on that server for other applications and the available RAM. Generally speaking, on a machine where there are no other applications apart from SQL Server, 75% of the maximum available RAM should be allocated for SQL Server. So if you have a 16GB RAM machine, 75% of 16 = 12 GB should be allocated as the maximum memory to SQL Server and the remaining will be used by operating systems processes and other processes.
Minimum memory is also an important setting. If the operating system needs to reclaim memory from SQL Server, it will request that SQL Server release memory. SQL Server will release the memory back to the Operating System until the amount of memory in use reaches the minimum server setting that is 0 by default. So if in the case that there is a huge file that needs to be copied then the operating system will keep claiming memory until SQL Server is allowed to release memory. This makes SharePoint performance slower. Hence, the minimum memory setting also needs to be changed to at least 50% of the available RAM. So if you have a 16GB RAM machine, 50% of 16 = 8 GB should be allocated as the minimum memory to SQL Server.
The Min server memory setting is used to guarantee a minimum amount of memory available to the SQL Server Memory Manager for an instance of SQL Server. SQL Server will not immediately allocate the amount of memory specified in min server memory on startup, neither will it take up all the min server memory setting value. If SQL Server is able to run on a lesser amount of memory then it will do so. But, after memory usage has reached this value due to client load, SQL Server cannot free memory unless the value of min server memory is reduced.
If the setting for both min server memory and max server memory is the same, then once the memory allocated to the SQL Server reaches that value, the Database Engine stops dynamically freeing and acquiring memory for the buffer pool.
On a SQL Server machine where multiple instances are loaded, for Max server memory setting, establish maximum settings for each instance, being cognizant of the fact that the total allowance is not more than the total physical memory of the machine. You might want to provide each instance of memory proportional to its expected workload or database size. This approach has the advantage that when new processes or instances start up, free memory will be available to them immediately. The drawback is that if you are not running all of the instances, none of the running instances will be able to utilize the remaining free memory.
On a SQL Server machine where multiple instances are loaded, for Min server memory setting, establish minimum settings for each instance, so that the sum of these minimums is 1-2 GB less than the total physical memory on your machine. Again, you may establish these minimums proportionately to the expected load of that instance.
This approach has the advantage that if not all instances are running at the same time then the ones that are running can use the remaining free memory. This approach is also useful when there is another memory-intensive process on the computer, since it would insure that SQL Server would at least get a reasonable amount of memory. The drawback is that when a new instance or any other process starts, it may take some time for the running instances to release memory, especially if they must write modified pages back to their databases to do so.
Server Memory Server Configuration Options
In the next article we will see some more SQL Server Settings relevant to SharePoint performance.
sp_configure 'show advanced options', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
sp_configure 'max degree of parallelism', 1;
GO
RECONFIGURE WITH OVERRIDE;
GO
sp_configure 'max server memory', 12288; --12*1024
GO
RECONFIGURE WITH OVERRIDE;
GO
sp_configure 'min server memory', 8192; --8*1024
GO
RECONFIGURE WITH OVERRIDE;
GO
Sharepoint 性能之SQL Server内存设置的更多相关文章
- SQL Server内存性能分析
内存概念: Working Set = Private Bytes + Shared Memory Working Set:某个进程的地址空间中,存放在物理内存的那一部分 Private Bytes: ...
- SQL Server内存遭遇操作系统进程压榨案例
场景: 最近一台DB服务器偶尔出现CPU报警,我的邮件报警阈(请读yù)值设置的是15%,开始时没当回事,以为是有什么统计类的查询,后来越来越频繁. 探索: 我决定来查一下,究竟是什么在作怪,我排查的 ...
- Sql Server 内存相关计数器以及内存压力诊断
在数据库服务器中,内存是数据库对外提供服务最重要的资源之一, 不仅仅是Sql Server,包括其他数据库,比如Oracle,MySQL等,都是一类非常喜欢内存的应用. 在Sql Server服务器中 ...
- 人人都是 DBA(IV)SQL Server 内存管理
SQL Server 的内存管理是一个庞大的主题,涉及特别多的概念和技术,例如常见的 Plan Cache.Buffer Pool.Memory Clerks 等.本文仅是管中窥豹,描述常见的内存管理 ...
- SQL Server内存理解的误区
SQL Server内存理解 内存的读写速度要远远大于磁盘,对于数据库而言,会充分利用内存的这种优势,将数据尽可能多地从磁盘缓存到内存中,从而使数据库可以直接从内存中读写数据,减少对机械磁盘的IO请求 ...
- SQL SERVER 内存分配及常见内存问题 简介
一.问题: 1.SQL Server 所占用内存数量从启动以后就不断地增加: 首先,作为成熟的产品,内存溢出的机会微乎其微.对此要了解SQL SERVER与windows是如何协调.共享内存.并且SQ ...
- SQL Server 内存相关博文
Don’t confuse error 823 and error 832 本文大意: 错误832: A page that should have been const ...
- SQL Server 内存中OLTP内部机制概述(二)
----------------------------我是分割线------------------------------- 本文翻译自微软白皮书<SQL Server In-Memory ...
- SQL SERVER 内存分配及常见内存问题(1)——简介
原文:SQL SERVER 内存分配及常见内存问题(1)--简介 一.问题: 1.SQL Server 所占用内存数量从启动以后就不断地增加: 首先,作为成熟的产品,内存溢出的机会微乎其微.对此要了解 ...
随机推荐
- [转]zookeeper集群 initLimit和syncLimit
initLimit和syncLimit是针对集群的参数 1.tickTime:CS通信心跳数 Zookeeper 服务器之间或客户端与服务器之间维持心跳的时间间隔,也就是每个 tickTime 时间就 ...
- CF [2016-2017 ACM-ICPC CHINA-Final][GYM 101194 H] Great Cells
很久以前做的一道思博题了,今天来补一补. 大致题意:在一个\(n*m\)的矩阵内填整数,数字在\([1,k]\)范围内.矩阵中某格的数为great number当且仅当与它同行同列的数字都严格比它小. ...
- ABP从入门到精通(5):.扩展国际化语言资源
ABP的有些组件使用的该组件自带的语言包资源,所以在有些时候会因为我们当前使用的语言对应的语言包不全,而造成日志一直记录WARN.ABP给我们提供了扩展语言包资源的接口,可以解决这个问题. 以下示例代 ...
- item 10: 比起unscoped enum更偏爱scoped enum
本文翻译自modern effective C++,由于水平有限,故无法保证翻译完全正确,欢迎指出错误.谢谢! 博客已经迁移到这里啦 一般情况下,在花括号中声明一个name(包括变量名,函数名),这个 ...
- mysql操作命令梳理(4)-grant授权和revoke回收权限
在mysql维护工作中,做好权限管理是一个很重要的环节.下面对mysql权限操作进行梳理: mysql的权限命令是grant,权限撤销的命令时revoke:grant授权格式:grant 权限列表 o ...
- CF 1047 C. Enlarge GCD
传送门 [http://codeforces.com/contest/1047/problem/C] 题意 给你n个数,移除最少的数字使剩下的数字GCD大于初始GCD 思路 需要一点暴力的技巧,先求出 ...
- 软件工程(四)数据流图DFD
结构化分析中,常用到数据模型为实体关系图,功能模型是数据流图 DFD 可以认为,一个基于计算机的信息处理系统由数据流和一系列的转换构成,这些转换将输入数据流变换为输出数据流.数据流图就是用来刻画数据流 ...
- BugPhobia进阶篇章:功能规格说明书
0x01 :特别鸣谢 首先特别鸣谢<构建之法>中并没有给出固定化格式的功能规格说明书的样例,因此在此次的说明书中将尽可能用生动形象的例子展示软件交互阐释 因此受到它本身的启发,此次团队功能 ...
- Lucene源码
看Lucene源码必须知道的基本概念 终于有时间总结点Lucene,虽然是大周末的,已经感觉是对自己的奖励,毕竟只是喜欢,现在的工作中用不到的.自己看源码比较快,看英文原著的技术书也很快.都和语言有很 ...
- JavaScript获取DOM节点
常用的方法有 document.getElementById("id"); document.getElementsByTagName('tagName'); document.g ...