本文介绍了Java中是否存在GC,可能会同时运行100%而不引入延迟(停止运行)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是好奇。我听说了有关新G1GC寻址延迟问题的一些信息。我不能/不想使用RTSJ。



预先致谢

解决方案

我不认为有任何零垃圾收集器。但一般来说,一个像CMS这样的低收入收集者将会完成这项工作。



暂停和暂停减少的问题如下:


  • 一个零暂停(或几乎零暂停)收集机制显着增加了正常程序执行的开销。使用多线程语言(如Java)尤其如此。

  • 如果应用程序产生过多垃圾,则使用专用线程进行垃圾回收的方案可能会淹没。

  • 如果应用程序的内存使用模式过于笨拙和/或您没有足够的物理和虚拟记忆。



Just curious. I heard something about the new G1GC addressing that latency problem. I can't / don't want to use RTSJ.

Thanks in advance

解决方案

I don't think there are any zero-pause garbage collectors. But generally speaking a low-pause collector like CMS will do the job.

The problems with pauses and pause reduction are as follows:

  • A zero-pause (or almost zero-pause) collection regime significantly increases overheads for normal program execution. This is particularly true with multithreaded languages like Java.

  • Schemes that use a dedicated thread or threads to do garbage collection can get swamped if the application generates too much garbage.

  • Any GC scheme will give you poor performance if the application's memory usage patterns are too "lumpy" and/or you don't have enough physical and virtual memory.

这篇关于Java中是否存在GC,可能会同时运行100%而不引入延迟(停止运行)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 08:33