I have started facing Native memory allocation issue. I guess could be related with the -Xmx and -Xms settings. What is the recommended way to set this values ?
Currentl
You are clearly asking for a lot more than is physically available on your system. You have 16GB total but it's 90% in use, and you don't have any swap space, so there's no way you're getting -Xms6G
let alone more (-Xmx13G
).
You need to figure out what other processes are consuming memory using, for instance, top
and sort by resident memory (upper-case letter O
, then q
), and stop enough of them to free up at least 6GB before running your JVM.
That, or double your physical memory to 32GB, or add 16GB of swap (but that could result in thrashing if the system is heavily loaded).