1753560 Members
6181 Online
108796 Solutions
New Discussion юеВ

Memory Problems

 
P-Dicky
Frequent Advisor

Memory Problems

Good Morning All...

I am getting this memory error when trying to run a Java App...

"Could not reserve enough space for object heap"

I have looked into the entire starting java with the -Xmx510m

My feeling is the box has 8GB of RAM and should be able to handle the load.. I started having these problems after a migration from another box that only had 4GB of memory. Of course the new box has 10g and Java 1.6 (old was 8i and java1.5) Still I feel the problem may relate to my Kernal Settings..
Here are my settings
maxdsiz 1073741824
maxdsiz_64bit 2147483648
maxsiz 134217728
massiz_64bit 1073741824
maxtsiz 67108864
maxtsiz_64bit 1073741824

So a system with 8GB of RAM do these relate?

Also here is a swapinfo
# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4194304 674584 3519720 16% 0 - 1 /dev/vg00/lvol2
reserve - 3499032 -3499032
memory 6326956 4702608 1624348 74%
[root:proddcs:/]
#
System: proddcs Tue Dec 9 09:19:42 2008
Load averages: 0.80, 0.83, 0.77
653 processes: 610 sleeping, 38 running, 5 zombies
Cpu states:
CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 0.69 5.9% 7.9% 4.0% 82.2% 0.0% 0.0% 0.0% 0.0%
1 0.91 3.0% 2.0% 3.0% 92.0% 0.0% 0.0% 0.0% 0.0%
--- ---- ----- ----- ----- ----- ----- ----- ----- -----
avg 0.80 4.0% 5.0% 4.0% 87.1% 0.0% 0.0% 0.0% 0.0%

Memory: 5724712K (4054568K) real, 27762616K (25263432K) virtual, 247524K free P
age# 1/60

CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND
1 ? 7068 oracle 154 20 1198M 6372K sleep 0:38 9.38 9.37 oracledcs
1 ? 6569 oracle 154 20 38616K 1184K sleep 3:45 2.27 2.27 tnslsnr
1 ? 24820 supreme 152 20 1209M 150M run 0:23 2.01 2.01 java
1 ? 24668 supreme 152 20 1221M 162M run 0:38 1.70 1.70 java
0 ? 24790 supreme 152 20 1215M 150M run 0:23 1.62 1.62 java
1 ? 24710 supreme 152 20 1208M 150M run 0:30 1.15 1.14 java
0 ? 24679 supreme 152 20 1204M 156M run 0:27 0.97 0.97 java
0 ? 1999 root 152 20 80936K 15632K run 47:03 0.84 0.84 coda
0 ? 37 root 152 20 7424K 7424K run 8:31 0.82 0.82 vxfsd
0 ? 2365 root -27 20 25120K 21008K run 42:23 0.81 0.81 cmcld

Anytip would be greatly appreciated..

THANK YOU

2 REPLIES 2
Adam W.
Valued Contributor

Re: Memory Problems

Check these out. I think they will help.

http://forums.sun.com/thread.jspa?threadID=632411

http://forums.sun.com/thread.jspa?forumID=136&threadID=522506

There are two types of people in the world, Marines and those who wish they were.
Bill Hassell
Honored Contributor

Re: Memory Problems

> My feeling is the box has 8GB of RAM and should be able to handle the load..

This is probably a 32bit Java application so you are under severe memory restrictions (compared to 64bit processes). Your applications can consume a lot of your memory plus most of your swap space before you are truly out of heap or data memory. But 32bit applications will be limited by maxdsiz even if you have 32GB of RAM and 100GB of swap. There is no message that differentiates between out of memory due to program design limits versus out of total memory (swap and RAM).

You are limited to about 1GB of 32bit data area per process and 2GB for 64bit processes. You can certainly increase maxdsiz to 2GB and maxdsiz_64 to 4GB and see if this helps. But oyu may need to use a Java executable that has been linked to address more than 1GB of heap area.


Bill Hassell, sysadmin