I'm very puzzled by a problem I observe in our server application.
- The server is a CentOS 7 machine with 48 cores and 64GB memory
- Java is OpenJDK 8
- Application Server is WildFly 9
- Memory and GC params:
-Xss256k -Xmx8192m -XX:+UseG1GC -XX:MaxGCPauseMillis=20
The main use case receives CORBA requests in one java process and delegates them by calling remote EJBs within the WildFly for processing.1
Due to the high number of parallel requests of that kind, we increased the remote connections in the ejb3.0 subsystem of WildFly configuration to 1000: <max-threads count="1000" />
Now, the strange thing that we observe is that the heap size (e.g. by observing via VisualVM) is 8G as set and GC is continuously running so that about 6-7GB of heap are used and the number of threads relates to the setting. Both memory and threads don't increase over time. At the same time, observing the PID with top
after some time of running, we see an amazing 42G used!
Can someone explain me, how it is possible that the java process consumes extremely more memory than set by the X JVM properties?
1 I do know we are talking about very old technology here, but the application is as it is and we are not able to change that in the near future. It must survive some time in production until we have the chance to upgrade to a more recent technology.