最小和最大服务器内存对SQL CLR的影响 [英] Effects of min and max server memory on SQL CLR

查看:416
本文介绍了最小和最大服务器内存对SQL CLR的影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我解决这个问题。非常感谢。



SQL Server 2014

数据库服务器物理内存:500GB

最小服务器内存设置:400GB

最大服务器内存设置:480GB



我们在数据库中托管SQL CLR,并缓存一个需要10GB的对象(我听说过在CLR中它将通过SQL CLR将数据库中所需的内存加倍),这样我们就不需要在每次需要数据时通过查询进行选择。


但是,经常发生appdomain卸载会导致缓存的对象丢失。

Hi, please help me out with this situation. Thank you very much.

SQL Server 2014
Database server physical memory: 500GB
Minimum server memory setting: 400GB
Maximum server memory setting: 480GB

We hosted SQL CLR in database, and cache an object that require 10GB (I heard that in CLR it will double up the required memory) in the database via SQL CLR so that we no need to select by query every time when we need the data.
However, appdomain unload occurred frequently cause the cached object dropped.

我可以知道这种情况是由服务器内存设置引起的吗?由于我们在网络和报告以及其他应用程序上有很多客户端请求,因此数据库内存使用率很高。

是否可能因为SQL服务器在最小服务器内存设置下没有释放内存,所以牺牲SQL CLR分配?

May I know is this situation caused by the server memory setting? The DB memory usage is high since we have a lot client request on web and report and other app.
Is it possible because of the SQL server don't release memory below that min server memory setting, so sacrifice the SQL CLR allocation?

非常感谢您的帮助。谢谢。

Your help is greatly appreciated. Thank you.

推荐答案

我想说两种设置都太高了。将最大值降低至至少460 GB。最小值,如果你真的想要一个,设置为100 GB左右。如果设置得太高,可能会导致问题。如果机器上有其他内存消耗器,SQL Server
将被换出,因为它不会修剪内存。如果SQL Server在内存中有锁定页面,则会有摊牌。

I would say that both settings are too high. Lower the max value to at least 460 GB. The min value, if you really want one, set to 100 GB or so. If you set it too high, it can lead to trouble. If there is some other memory eater on the machine, SQL Server will be swapped out, as it will not trim the memory. And if SQL Server has Lock Pages in Memory, there will be a showdown.

我不能肯定这会对你的AppDomain问题有所帮助,但我怀疑是Max设置是一个比min设置更大的罪魁祸首。

I can't say for sure that this will help with your AppDomain issue, but I suspect that the Max setting is a bigger culprit than the min setting.


这篇关于最小和最大服务器内存对SQL CLR的影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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