franz1981 edited a comment on pull request #3363:
URL: https://github.com/apache/activemq-artemis/pull/3363#issuecomment-739137446


   Just one note for further investigations on this: I'm not sure it's a 
benchmark issue or not, but probably it isn't.
   I see that both master and this new version share a weird GC behaviour, see 
GC behavior on master:
   
![image](https://user-images.githubusercontent.com/13125299/101236119-bacb9880-36ce-11eb-9a56-d8565c626da0.png)
   
   It shows a considerable amount of cpu time spent on `copy_to_survivor_space` 
that it seems we're getting lot of time spent on promotion activity using the 
default collector of java 8 ie parallel 
   
   The same behaviour isn't present if I use the primitive Obj-int concurrent 
map implemented on 
https://github.com/apache/activemq-artemis/blob/8d86e19198b431e67fb37ad1580ac7b246bf4a59/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SingleWriterObjIntHashMap.java
   
   
![image](https://user-images.githubusercontent.com/13125299/101236268-1c403700-36d0-11eb-9e2e-ca1aa5290e0e.png)
   
   Instead, we get lot of GC compaction activity (probably on the large 
ObjIntEntry[] and the entry instances backing the primitive map). I would run 
the same benchs with G1GC to mimic what a running broker would do, but I see 
that the first case (`master` and this PR using `ConcurrentHashMap`s really 
have a lot of "hidden" GC activity despit getting an apparent higher throughput 
advantage. 
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to