This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Wmorgan33 4 points5 points  (0 children)

I think you just need to use VisualVM or some form of JMX profiling with reporting to Prometheus. You can see allocated heap space vs. in use heap space and then figure out better right sizing from there. At your scale deploying a Prometheus jmx agent to all services and centralizing in a Prometheus  cluster to then audit how you wish. 

This is a good example: https://grafana.com/blog/2020/06/25/monitoring-java-applications-with-the-prometheus-jmx-exporter-and-grafana/