资讯专栏INFORMATION COLUMN

Throughput and pause time in GC

lunaticf / 2858人阅读

In JVM, "stop the world" is such an amazing word, but tons of works and researches in this area to reduce it effect when doing Garbage Collection (GC).

Recently, in JVM study, several GC collectors have been designed to achieve a better performance of our java application. And there are two ways to claim whether it"s a good or excellent GC collector.

Have a good throughput.

Have a short pause time.

Terminology

Throughput: means the percentage that the time of application threads running in the time of total threads running (which including the time application threads consuming and GC threads consuming).

Pause time: means the time that all application threads are paused due to GC threads running.

Relationship

In ideal world, we want GC collector to achieve a high throughput and short pause time, but throughput and pause time is like the two sides of the coin. We can"t achieve the best throughput and the shortest pause time at the same time.

In simple words, GC is running in a way that they need to run when reach to the safe point, when that GC need make sure that application threads would not change the status of all objects during the time GC threads are marking and cleaning the garbage objects. But each of the GC has additional overhead, for example, the content switch, consuming in cache, and security overhead in JVM lock mechanism. These are the additional overhead to run a GC every time.

If we want to have high throughput in our JVM performance, we need try to avoid these overhead during GC. In this case, less frequent GC is the solution to improve the throughput. Since we deal more objects at time to reduce the percentage spending on these additional overhead.

However, due to the much large objects need to scan, the time to implement a GC will increase. It would increase the time of each GC, which means pause time is increased.

Therefore, throughput and pause time is contradiction in GC world. We can"t hold them together, a tradeoff between them is needed in different scenario.

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/65284.html

相关文章

  • JAVA SE 6 GC调优笔记

    摘要:要加左右,因为位机器上的对象更大要加左右,因为位机器上的对象更大对于服务器程序的原则是保证越多内存越好将和设置成一样大,关掉自动调整大小的机制。对于服务器程序的原则是决定你能够给的最大内存,然后根据的大小来找到最好的设置。 Generations Young Generation 组成:eden + 2 survivor spaces Young generation的gc称作min...

    cartoon 评论0 收藏0
  • JVM GC 之「AdaptiveSizePolicy」实战

    摘要:如果开启,则每次后会重新计算和区的大小,计算依据是过程中统计的时间吞吐量内存占用量。应用达到预期的吞吐量,即应用正常运行时间正常运行时间耗时。理论上,增大内存,可以降低的频率,以此达到预期吞吐量。 转载请注明原文链接:https://www.jianshu.com/p/741... 一、AdaptiveSizePolicy简介 AdaptiveSizePolicy(自适应大小策略) ...

    CoffeX 评论0 收藏0
  • TRINI: an adaptive load balancing strategy

    摘要:这将预测出当达到多少时,将发生下一次算法把这个阈值传给另一个线性回归模型,这个模型将推测内存的时间序列并预测新的一个发生的时间将四种基本算法改为对应的感知性算法如果预选取的节点在很短的时间内要发生,则跳过该节点,评估其他节点。 TRINI: an adaptive load balancing strategy based on garbage collection for clust...

    wudengzan 评论0 收藏0
  • java9 gc log参数迁移

    摘要:序本文主要研究一下参数的迁移。比如实例为,为,文件数为,每个文件,文件名为,为和输出实例迁移旧版相关参数迁移旧版运行时参数迁移小结把的配置统一到了中,可以按照官方给出的新旧参数映射表进行迁移。 序 本文主要研究一下java9 gc log参数的迁移。 统一JVM及GC的Logging java9引进了一个统一的日志框架,对gc log的输出进行了统一的配置。 相关JEP(JDK Enh...

    Kahn 评论0 收藏0

发表评论

0条评论

lunaticf

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<