Failed to reserve heap with 9g on 64-bit Linux

it looks like I'm stuck in memory allocation on java vm on linux server.

I use this command to check:

java -Xmx9g -Xms6g -d64 -server

server memory:

    [root@….~]$ free -m
             total       used       free     shared    buffers     cached
Mem:         16017       1058      14958          1         41        758
-/+ buffers/cache:        259      15758
Swap:         1498          0       1498

Ulimit Settings:

core file size          (blocks, -c) 1
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 128053
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 64000
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 128053
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

The Linux version is SUSE Linux Enterprise Server 11 (x86_64).

Java version:

java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

I found out that it still works with -Xmx8330m, but no longer with -Xmx8331m. I do not know what is going on here, and why am I limited to this allocated allocated memory core?

Edit: Exact error message:

root@…..:/root> java -d64 -Xmx9g -server
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Thanks! Indie

+4
source share
1 answer

, : 8Gb, . , , JVM - .

Cheers,

+1

All Articles