Hello,
I'm using JDK 8 on Solaris 11.1 on x64 box:
$ java -version
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)
I'm running tomcat/xwiki on top of this. I've set following runtime options to limit memory usage of Java:
CATALINA_OPTS="-d64 -server -Xms1024m -Xmx1024m -XX:MaxMetaspaceSize=1024m -XX:MaxPermSize=196m -Dfile.encoding=utf-8 -Djava.awt.headless=true -XX:+UseParallelGC -XX:MaxGCPauseMillis=100"
those params are taken from the same project from time JDK 7 was used so I've left -XX:MaxPermSize there even if it's no longer supported and I just added -XX:MaxMetaspaceSize=1024m for JDK 8.
My problem with this is that when I put server under load by pushing new pages over its REST API to the XWiki, then I see that RSS (in prstat) is oscillating around 1.5GB, but SIZE is steadily growing and whole process of pushing pages to the server gets slower and slower.
The problem is that I'm not able to detect any obvious memory leak by using jconsole nor by using visual vm and heap dump. They both claims that in sum my JDK consumes up to 2GB RAM. The only exception is jconsole which in its VM Summary pane tells me that the amount of "Committed virtual memory:" is around 14GB which corresponds to observation from SIZE value from prstat utility.
Since I don't like the idea of JVM consuming more and more memory with possibility to not stop in this process I'd like to ask if there is any parameter which will allow me to set hard memory limit allowed to be used by whole JVM?
Any idea is highly appreciated here,
Thanks!
Karel