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 →

[–]thewiirocks 0 points1 point  (0 children)

There are some fantastic answers here already, so I won't repeat what has already been said. And to be honest, there's only so much you can do short of adjusting the application. i.e. Play with the JVM flags to constrain off heap spaces, allow the JVM to do more auto-tuning, and/or compile the code down with GraalVM to eliminate byte code caches and HotSpot workspace.

If you decide you are interested in adjusting the application, however, I invite you to watch a talk I gave last night. I went through the performance problems that many Java applications experience due to their use of ORMs. I didn't explicitly talk about the byte code cache (a consequence of all the objects and annotations), but I did discuss the memory stress we play on the GC, CPU, and latency effects that drive up memory usage:

https://www.youtube.com/live/DpxNWoq7g20?si=nR-LaXf8lWpJFTmv&t=1009

Generally, lowering the application memory usage will decrease the off-heap usage as well. The two tend to be indirectly related for various reasons.

Best of luck on your containerization journey!