.NET垃圾收集 - 这是什么影响?垃圾、这是什么、NET

2023-09-04 09:28:15 作者:巷子里的童年

我们有一个情况我们正在考虑迫使服务器,这是非常低的RAM(3.6 / 4GB用平均)上的垃圾回收。不,这不是一个真正的选项遗憾的是升级该服务器。

We have a situation where we are considering forcing a garbage collection on a server that is very low on RAM (3.6/4GB used on average). No, it's not really an option to upgrade this server unfortunately.

我们的一个服务进程(在C间接++编写的(不要问...)),并与.NET组件工作,然后睡10分钟。当该服务正在睡觉时,常常挂到的RAM 600MB,可以与其他进程共享。看起来有点与WSE跟踪被打开的调试。我可以看它唤醒和GC上的第一个COM调用.NET下一次迭代 - 但是随后的过程中做了一些工作的时候它进入睡眠状态的RAM的使用是备份左右600MB ......好吧,你可以看到这个去...

One of our service processes (written indirectly in C++ (don't ask...)) does work with the .NET components and then sleeps for 10 minutes. When that service is sleeping, it is often hanging on to 600MB of RAM that could be shared with other processes. Seems somehow related to WSE tracing being turned on for debugging. I can watch it wake up and GC on the next iteration on the first COM call to .NET - however then the process does some work and by the time it goes to sleep the RAM use is back up around 600MB... well, you can see where this goes...

这样的问题:我正在考虑增加一个垃圾回收之前的过程中进入睡眠状态。有关于这个盒子是做.NET相关任务的其他服务。当我打电话垃圾收集在这个服务过程中,这是否会影响GC上的要求收集箱或只是过程的所有其他.NET相关的进程?我有点担心产生某种性能问题过程中的一个我在乎外面。

The Question: I'm considering adding a garbage collection just before the process goes to sleep. There are other services on this box that are doing .NET related tasks. When I call a garbage collection in this service process, does that GC affect all other .NET related processes on the box or just the process that requests the collection? I'm a bit worried about creating some sort of performance problem for processes outside of the one I care about.

推荐答案

这只会影响正在调用GC的过程。

It will only affect the process that is calling GC.

 
精彩推荐
图片推荐