ubuntu - How much memory Java needs to start? -
this script (i'm trying experiment fix bigger problem):
#!/bin/bash java_opts="-xms64m -xmx64m" in 1 2 3 4 5 6 7 8 9 10 /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java -version & done
in nutshell, i'm trying start 10 java processes @ same time. server has 512mb of ram , 4gb of swap. should more enough ten processes 64mb each. however, see in output 2 of them:
error occurred during initialization of vm not reserve enough space card marking array error occurred during initialization of vm not reserve enough space code cache
why happening? how resolve?
crashed processes created files start:
# there insufficient memory java runtime environment continue. # native memory allocation (malloc) failed allocate 160088 bytes hashtablebucket in /build/buildd/openjdk-7-7u21-2.3.9/build/openjdk/hotspot/src/share/vm/utilities/hashtable.inline.hpp # possible reasons: # system out of physical ram or swap space # in 32 bit mode, process size limit hit # possible solutions: # reduce memory load on system # increase physical memory or swap space # check if swap backing store full # use 64 bit java on 64 bit os # decrease java heap size (-xmx/-xms) # decrease number of java threads # decrease java thread stack sizes (-xss) # set larger code cache -xx:reservedcodecachesize=
which of following case?
java reserves memory must physical memory (not swap) @ start internal management of vm. if not have enough physical memory jvm not start.
Comments
Post a Comment