You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2020/01/13 06:12:29 UTC

[GitHub] [rocketmq] Aaron-He opened a new issue #1719: Switching from CMS to G1

Aaron-He opened a new issue #1719: Switching from CMS to G1
URL: https://github.com/apache/rocketmq/issues/1719
 
 
   Now, the jvm Namesrv running on uses CMS, while the jvm Broker running on uses G1.
   Maybe we could switch from CMS to G1, reasons are as follows:
   
   1. Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
   2. As #1688 mentioned, Namesrv cannot run on JDK 11, the reason is above. But G1 was introduced in Java 7, and becomes default GC in the higher version JDKs(after version JDK 9).
   3. The G1 can collect both the young and the old generation.
   ...
   
   Undeniably, the G1 doesn’t perform well with small heaps. However, the heap memory size Namesrv uses is 4G, it may not be small. Also, full GCs can be triggered when humongous objects (objects over 50% of the size of a region) can’t be allocated due to a lack of space(no continuous regions available). 
   However, 4G heap Memory as an example, the G1 can still perform well. According to best tuning practices( heap memory is divided into about 2000 regions), we can set one region 2M. Use jmap tool to get heap dump file in the test environment(2m-2s-async brokers, 2 namesrv), use visualvm tool to analysis the file, the 10 biggest objects are as follows:
   
   Class Name|Retained Heap
   ------|-------------------
   sun.misc.Launcher$ExtClassLoader#1 | 1,223,336
   java.util.Vector#45|658,138
   java.lang.Object[]#59741|658,102
   java.util.concurrent.ConcurrentHashMap#75809|369,344
   java.util.concurrent.ConcurrentHashMap$Node[]#18955|369,244
   class io.netty.buffer.ByteBufUtil$HexUtil|358,480
   io.netty.buffer.PoolThreadCache#1|339,839
   io.netty.buffer.PoolThreadCache#16|339,758
   io.netty.buffer.PoolThreadCache#2|339,434
   io.netty.buffer.PoolThreadCache#6|339,434
   
   In summary, there is no performance penalty for switching from CMS to G1.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [rocketmq] Aaron-He closed issue #1719: Switching from CMS to G1

Posted by GitBox <gi...@apache.org>.
Aaron-He closed issue #1719: Switching from CMS to G1
URL: https://github.com/apache/rocketmq/issues/1719
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services