Native memory allocation (mmap) failed to map

后端 未结 3 663
后悔当初
后悔当初 2021-02-08 00:03

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

3条回答
  •  你的背包
    2021-02-08 00:40

    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).

提交回复
热议问题