You have totally incorrectly configured JVMs!
The total memory usage of each JVM is 4 GB heap + 1.5 GB max perm (The -Xmx
parameter refers to heap memory, whereas the permanent generation space is a separate memory allocation!) + other memory for threads, memory allocated through JNI, shared JVM stuff, etc. So each JVM is about 6 GB but system total memory is only 8 GB!
You need to fix the allocations for the system to be stable.