Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Would a way to test this hypothesis be to switch garbage-collecting algorithm?


G1GC should be completely suitable, you can try with ZGC or Shenondoah. Both have some memory "penalty", each object takes a bit more memory, so with change you will see 5-15% increase memory usage. This would be normal.

G1GC should be fine, so enable GC logging, analyse them using:

https://www.tagtraum.com/gcviewer.html

or

https://gceasy.io/

You can log GC for long time with rotation, something like this https://dzone.com/articles/try-to-avoid-xxusegclogfilerotati...

For the GC analysing you will be looking for tenured generation, so must add this flag: -XX:+PrintTenuringDistribution

You would be looking for GC major and GC evacuation times. Major GCs are STW and take more time, so overall the goal is to eliminate them as much as possible.

I usually find it very important to have charts of heap usage. Overall heap allocated (all regions) vs complete heap size. The same for non-heap area.


STW GC is only for ParallelGC right? Does not apply to G1GC, ZGC or Shenandoah?


G1 GC totally has stw mode.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: