G1GC 选项 -XX:ParallelGCThreads 与 -XX:ConcGCThreads 之间有什么区别
What is the difference between G1GC options -XX:ParallelGCThreads vs -XX:ConcGCThreads
配置 G1GC 时
我们有两种线程数
-XX:ParallelGCThreads 和 -XX:ConcGCThreads
有什么区别,它们将如何影响,
感谢任何参考。
这是设置,或者准确地说是 JVM 调整设置...我们通知 JVM 在特定类型的垃圾收集中使用多少线程。
我希望你已经知道什么是垃圾收集,所以当 JVM 运行 垃圾收集时,这取决于你的 JVM 设置什么算法作为默认收集器。
您可能已经知道有多种可用的垃圾收集器,例如 G1、CMS 等。
因此,根据您的设置(此处为线程数),GC 算法将尝试使用那么多线程进行堆清理。当 JVM 运行s FULL GC 时,它会停止其他线程处理。
现在假设,您的应用程序正在运行并执行非常繁重的任务,多个用户出于多种目的使用它(比如非常繁忙的应用程序),并且 JVM 运行正在执行 FULL GC,那么在那种情况下,所有工作线程将暂停,GC 将进行清理。在此期间,如果所有线程都被 JVM 获取,则用户将看到响应延迟。所以,你可以告诉 JVM,嘿,只使用 that much (number) thread on that type(CMS 或并行)垃圾回收 运行.
要了解更多关于 GC 类型及其不同之处的信息,请参阅 Oracle 中的一些好文章和文档。
Here is one reference for the options you mentioned.
-XX:ParallelGCThreads: Sets the number of threads used during parallel phases of the garbage collectors. The default value varies with the platform on which the JVM is running.
-XX:ConcGCThreads: Number of threads concurrent garbage collectors will use. The default value varies with the platform on which the JVM
is running.
G1 算法有一些阶段,其中一些阶段是 "stop the world" 在垃圾收集期间停止应用程序的阶段,它也有在应用程序 运行(候选标记等)时同时发生的阶段。 ),记住这些信息:
ParallelGCThreads option affects the number of threads used for phases when application threads are stopped, and the ConcGCThreads flag affects the number of threads used for concurrent phases.
配置 G1GC 时 我们有两种线程数 -XX:ParallelGCThreads 和 -XX:ConcGCThreads 有什么区别,它们将如何影响, 感谢任何参考。
这是设置,或者准确地说是 JVM 调整设置...我们通知 JVM 在特定类型的垃圾收集中使用多少线程。
我希望你已经知道什么是垃圾收集,所以当 JVM 运行 垃圾收集时,这取决于你的 JVM 设置什么算法作为默认收集器。
您可能已经知道有多种可用的垃圾收集器,例如 G1、CMS 等。
因此,根据您的设置(此处为线程数),GC 算法将尝试使用那么多线程进行堆清理。当 JVM 运行s FULL GC 时,它会停止其他线程处理。
现在假设,您的应用程序正在运行并执行非常繁重的任务,多个用户出于多种目的使用它(比如非常繁忙的应用程序),并且 JVM 运行正在执行 FULL GC,那么在那种情况下,所有工作线程将暂停,GC 将进行清理。在此期间,如果所有线程都被 JVM 获取,则用户将看到响应延迟。所以,你可以告诉 JVM,嘿,只使用 that much (number) thread on that type(CMS 或并行)垃圾回收 运行.
要了解更多关于 GC 类型及其不同之处的信息,请参阅 Oracle 中的一些好文章和文档。
Here is one reference for the options you mentioned.
-XX:ParallelGCThreads: Sets the number of threads used during parallel phases of the garbage collectors. The default value varies with the platform on which the JVM is running.
-XX:ConcGCThreads: Number of threads concurrent garbage collectors will use. The default value varies with the platform on which the JVM is running.
G1 算法有一些阶段,其中一些阶段是 "stop the world" 在垃圾收集期间停止应用程序的阶段,它也有在应用程序 运行(候选标记等)时同时发生的阶段。 ),记住这些信息:
ParallelGCThreads option affects the number of threads used for phases when application threads are stopped, and the ConcGCThreads flag affects the number of threads used for concurrent phases.