JVM memory limit on solaris
Hello everybody,
We are trying to run BEA WebLogic Server on Solaris 10, and we are running in serious trouble. The problem is that the platform we are using requires a lot of memory (1GB at startup!) and after some hours of usage, our application crashed with an OutOfMemory error. The memory parameters that are used to start the server are:-XX:NewSize=128m -XX:NewSize=128m -XX:SurvivorRatio=8 -Xms3900m -Xmx3900m
The problem is that, even if the server seems to allocate the 4 gigs of memory (which seems to be the limit, as if we try to enter something larger that that, the VM refuses to start), it throws an OutOfMemoryError when the memory usage reaches 2Gb. So I would like to ask if this memory limit is imposed by the JVM, or there is a memory setting in the operating system level that we can tweak in order to be able to use all the available memory up to 4 gigs?
P.S. Unfortunately, we are using a 32-bit JVM and we cannot move to a 64-bit one in order to allocate even more memory. This is because BEA supports 64-bit JVMs on Solaris only at version 10, which we cannot move to. It's very frustrating to have 44 gigs available and still get out of memory errors...
# 1
If i recall correctly, a 32 bit process can allocate a maximum of 4 GB Virtual Memory, to allocate more memory you would have to use a 64 bit jvm instead.
Not a very helpful answer perhaps, but it might be good to know what limitations there are with 32 bit processes..
.7/M.
# 2
> If i recall correctly, a 32 bit process can allocate
> a maximum of 4 GB Virtual Memory, to allocate more
> memory you would have to use a 64 bit jvm instead.
>
> Not a very helpful answer perhaps, but it might be
> good to know what limitations there are with 32 bit
> processes..
>
> .7/M.
Yes I know, but it doesn't even go to 4 gigs. If it did I would be happy ;-)
# 3
My bad, i should have read your post more carefully. Sorry!
What does the rest of the stacktrace looks like when the jvm crashes? I suspect that you checked the values from 'ulimit -a' already?
.7/M.
# 4
> My bad, i should have read your post more carefully.
> Sorry!
No need to apologize, I'm very grateful that you take time to help me with my problem!
> What does the rest of the stacktrace looks like when
> the jvm crashes?
I'm not 100% sure what you mean by that, but when the system crashes the application server logs only print that ah OutOfMemoryError occurred with no stacktrace. Also, plenty of memory is available for the other system processes, I verified that by running the top command.
> I suspect that you checked the
> values from 'ulimit -a' already?
I think this is OK, this is the output for the user that starts the application server:core file size(blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files(-n) 256
pipe size (512 bytes, -p) 10
stack size(kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes(-u) 29995
virtual memory(kbytes, -v) unlimited
# 5
> it throws an OutOfMemoryError when the memory usage
> reaches 2Gb. So I would like to ask if this memory
> limit is imposed by the JVM, or there is a memory
> setting in the operating system level that we can
> tweak in order to be able to use all the available
> memory up to 4 gigs?
>
> P.S. Unfortunately, we are using a 32-bit JVM
I thought that 32 bit JVM could not normally go beyong 2G...and to actually go beyond that, it would need to use specific settings, such as -XX:+AggressiveHeap, instead of the -Xms or -Xmx options.
Why don't you try that, if you didn't already.
There are other options, such as using ISM (Intimate Shared Memory) on Solaris. maybe you should google for that too.