CPU usage spikes


i havbe problem with one application. There are approx 30 concurent users.
running on 8vCPU 12GB mem (deployed as uberJar) vava 11

after few hours of normal operation. CPU spikes up (probably GC problem of some sort) How can i debug? Is there any suggested setup for uberJar deployment and also java parameters to include?

Java application performance analysis is a huge topic. People write books about this.

The first thing you need to know - Java doesn’t use all available server memory.
It is limited by the memory arguments. Usually one needs to adjust the -Xmx parameter in the server startup command line.
See here: How to control Java heap size (memory) allocation (xmx, xms) | alvinalexander.com

Hi, @AlexBudarov thanks for answer. CPU spikes problem solved. Problem was large (50k+) lists in multiple LookupFields. Objects in lookup gradually filled RAM and GC couldn´t clean them for some reason and than triggered OOM.