Mono GC max-heap-size 没有记录.在生产中使用是否安全?

Mono GC max-heap-size isn#39;t documented. Is it safe to use in production?(Mono GC max-heap-size 没有记录.在生产中使用是否安全?)
本文介绍了Mono GC max-heap-size 没有记录.在生产中使用是否安全?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为 Mono 使用的内存设置一个上限.

I need to set an upper bound to the memory used by Mono.

根据 blogs 可以使用参数 max-heap-size 来限制内存使用量.根据实验,根据代码,它确实做到了我想要的.

According to blogs it's possible to use the parameter max-heap-size to cap the memory usage. According to experimentations, and according to the code, it indeed does what I want.

但是,此选项没有记录.

因此:在生产中依赖此选项是否安全(或者它是否有我看不到的缺点,例如:不能保证在未来的 Mono 版本中仍然可用)?

Therefore: is it safe to rely on this option in production (or does it have drawbacks I don't see, like e.g.: no guarantee to still be available in future version of Mono)?

推荐答案

有文档,获取文档的方法如下: export an invalid MONO_GC_PARAMS, start单声道:

It is documented, and here's one way to get the documentation: export an invalid MONO_GC_PARAMS, start mono:

export MONO_GC_PARAMS=xxx
mono sample.exe

并获得帮助:

Warning: In environment variable `MONO_GC_PARAMS': Unknown option `xxx`. - Ignoring.

MONO_GC_PARAMS must be a comma-delimited list of one or more of the following:
  max-heap-size=N (where N is an integer, possibly with a k, m or a g suffix)
  soft-heap-limit=n (where N is an integer, possibly with a k, m or a g suffix)
  nursery-size=N (where N is an integer, possibly with a k, m or a g suffix)
  major=COLLECTOR (where COLLECTOR is `marksweep', `marksweep-conc', `marksweep-par', 'marksweep-fixed' or 'marksweep-fixed-par')
  minor=COLLECTOR (where COLLECTOR is `simple' or `split')
  wbarrier=WBARRIER (where WBARRIER is `remset' or `cardtable')
  stack-mark=MARK-METHOD (where MARK-METHOD is 'precise' or 'conservative')
  [no-]cementing
  evacuation-threshold=P (where P is a percentage, an integer in 0-100)
  (no-)lazy-sweep
 Experimental options:
  save-target-ratio=R (where R must be between 0.10 - 2.00).
  default-allowance-ratio=R (where R must be between 1.00 - 10.00).

如您所见,列出了 max-heap-size,而不是在 Experimental Options 中.所以我会说它是安全的.

As you can see max-heap-size is listed, and not in the Experimental Options. So I'd say it's safe.

这篇关于Mono GC max-heap-size 没有记录.在生产中使用是否安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)