0

We're having a production problem with an application on tomcat 8 , JDK 8. Suddenly we encounter a very high CPU utilization (up to 100%) and this co-exists with memory logs application throws (using runtime.get...) show almost the same used memory and the free memory and total memory keep expanding, jumping from 800MB to 1.5 GB to 4 GB then 6 then 8. Problem is then solved once I restart tomcat.

Facts: tomcat catalina.sh has JAVA_OPTS= -Xms128m -Xmx1024m -XX:MaxPermSize=256m -server

Please find below a memory dump summary we took @ the time of the incident:

Attaching to process ID ****, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.241-b07

using thread-local object allocation.
Parallel GC with 8 thread(s)

Heap Configuration:
   MinHeapFreeRatio         = 0
   MaxHeapFreeRatio         = 100
   MaxHeapSize              = 8434745344 (8044.0MB)
   NewSize                  = 176160768 (168.0MB)
   MaxNewSize               = 2811232256 (2681.0MB)
   OldSize                  = 352321536 (336.0MB)
   NewRatio                 = 2
   SurvivorRatio            = 8
   MetaspaceSize            = 21807104 (20.796875MB)
   CompressedClassSpaceSize = 1073741824 (1024.0MB)
   MaxMetaspaceSize         = 17592186044415 MB
   G1HeapRegionSize         = 0 (0.0MB)

Heap Usage:
PS Young Generation
Eden Space:
   capacity = 2809135104 (2679.0MB)
   used     = 0 (0.0MB)
   free     = 2809135104 (2679.0MB)
   0.0% used
From Space:
   capacity = 1048576 (1.0MB)
   used     = 0 (0.0MB)
   free     = 1048576 (1.0MB)
   0.0% used
To Space:
   capacity = 1048576 (1.0MB)
   used     = 0 (0.0MB)
   free     = 1048576 (1.0MB)
   0.0% used
PS Old Generation
   capacity = 5623513088 (5363.0MB)
   used     = 251033416 (239.40412139892578MB)
   free     = 5372479672 (5123.595878601074MB)
   4.463996296828748% used

21756 interned Strings occupying 2632144 bytes.

Questions: 1- How does the JVM exceed the Xmx specified? 2- Why does the Total Memory keep expanding while used is still very low in comparison? 3- Can memory be the cause of the raised CPU utilization ?

Thanks in advance :)

Abu3azza
  • 1
  • 1
  • The heap only concerns memory used for Java heap memory, not for - for example - native memory allocated off-heap. – Mark Rotteveel Jun 30 '20 at 19:18
  • What exactly do you have in your catalina.sh configuration file `JAVA_OPTS= -Xms128m -Xmx1024m -XX:MaxPermSize=256m -server`or `JAVA_OPTS="-Xms128m -Xmx1024m -XX:MaxPermSize=256m -server"`? – Ilya Lapitan Jun 30 '20 at 19:35

0 Answers0