- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
它们是年轻代垃圾收集的算法。
第二个 (UseParNewGC) 通过并发的终身代垃圾收集自动激活(请参阅 Java Concurrent and Parallel GC )但是,这两种并行算法之间有区别吗?
最佳答案
经过大量搜索,我发现最好的解释来自 Java Performance Tuning website in Question of the month: 1.4.1 Garbage collection algorithms, January 29th, 2003
Young generation garbage collection algorithms
The (original) copying collector (Enabled by default). When this collector kicks in, all application threads are stopped, and the copying collection proceeds using one thread (which means only one CPU even if on a multi-CPU machine). This is known as a stop-the-world collection, because basically the JVM pauses everything else until the collection is completed.
The parallel copying collector (Enabled using -XX:+UseParNewGC). Like the original copying collector, this is a stop-the-world collector. However this collector parallelizes the copying collection over multiple threads, which is more efficient than the original single-thread copying collector for multi-CPU machines (though not for single-CPU machines). This algorithm potentially speeds up young generation collection by a factor equal to the number of CPUs available, when compared to the original singly-threaded copying collector.
The parallel scavenge collector (Enabled using -XX:UseParallelGC). This is like the previous parallel copying collector, but the algorithm is tuned for gigabyte heaps (over 10GB) on multi-CPU machines. This collection algorithm is designed to maximize throughput while minimizing pauses. It has an optional adaptive tuning policy which will automatically resize heap spaces. If you use this collector, you can only use the the original mark-sweep collector in the old generation (i.e. the newer old generation concurrent collector cannot work with this young generation collector).
从这些信息看来,主要区别(除了 CMS 合作)是 UseParallelGC 支持 ergonomics 而 UseParNewGC 没有。
关于java - -XX :+UseParallelGC and -XX:+UseParNewGC 的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2101518/
我无法使用Logstash导入到Kibana,我的Mac上具有以下版本,请提供帮助。 Logstash 6.5.4 Kibana 6.5.4 Elasticsearch 6.5.4 Java 11.0
它们是年轻代垃圾收集的算法。 第二个 (UseParNewGC) 通过并发的终身代垃圾收集自动激活(请参阅 Java Concurrent and Parallel GC )但是,这两种并行算法之间有
关闭。这个问题是not reproducible or was caused by typos .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 去年关闭。
Java 垃圾收集器可以配置-XX:+UseParNewGC option .然而,几年前,一些人声称这个选项在极端情况下是错误的。一些事件也已打开。 我找不到关于此问题的最新信息。这个选项仍然危险吗
我正在尝试使用 jre 10.0.1 64 位启动服务器。 Windows启动批处理文件中JVM的设置有明显的变化。以 -XX:+UseParNewGC 的设置作为错误的引用点,为了让 JVM 服务器
我是一名优秀的程序员,十分优秀!