加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

asp.net – .net 4.5 iis HighDensityWebHosting

发布时间:2020-12-16 09:53:36 所属栏目:asp.Net 来源:网络整理
导读:在.net 4.5的更改日志中,有一个新设置的 mention configuration !-- ... -- runtime performanceScenario value="HighDensityWebHosting" / !-- ... -- 但实际上并没有很好的描述这个设置实际受到什么影响,我们是否应该在生产时安装.net 4.5后更改它.有人可
在.net 4.5的更改日志中,有一个新设置的 mention

<configuration>
  <!-- ... -->
  <runtime>
    <performanceScenario value="HighDensityWebHosting"  />
  <!-- ... -->

但实际上并没有很好的描述这个设置实际受到什么影响,我们是否应该在生产时安装.net 4.5后更改它.有人可以分享有关此设置更改的详细信息吗?

解决方法

Tuning GC for high-density Web hosting: GC can impact a site’s memory
consumption,but it can be tuned to enable better performance. You can
tune or configure GC for better CPU performance (slow down frequency
of collections) or lower memory consumption (that is,more frequent
collections to free up memory sooner). To enable the GC tuning,you
can select the HighDensityWebHosting setting in the aspnet.config…

> Source

Once a site is running,its use of the garbage-collector (GC) heap can
be a significant factor in its memory consumption. Like any garbage
collector,the .NET Framework GC makes tradeoffs between CPU time
(frequency and significance of collections) and memory consumption
(extra space that is used for new,freed,or free-able objects).

For the .NET Framework 4.5,instead of multiple standalone settings,a
workload-defined configuration setting is available that enables all
of the previously recommended GC settings as well as new tuning that
delivers additional performance for the per-site working set.

> Source,强调我的

此设置会影响垃圾收集器行为.根据第二个引用,它是已发布的最佳实践设置的快捷方式以及新的调整设置.据推测,那些“新的调整设置”也会影响GC的行为.

我在.Net源代码中查看是否可以找到有关实现的更多信息,但我没有找到任何内容(有很多地方可以使用此设置).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读