The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
allocate more space to /home mcraul UNIX for Dummies Questions & Answers 2 05-03-2008 03:56 AM
how allocate virtual memory munnu High Level Programming 2 04-20-2007 12:07 PM
Unix Help - allocate more memory to /tmp cmackin UNIX for Dummies Questions & Answers 1 06-01-2006 03:25 AM
unable to allocate enough cells for gray scale raz SUN Solaris 1 10-04-2004 10:47 AM
hoe to allocate a 2 dimensions array? azran High Level Programming 2 09-30-2002 07:22 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2008
Registered User
 

Join Date: Dec 2004
Location: Zürich
Posts: 145
unable to allocate enough memory

On SunOS 5.8 I get an error when starting a large Java process with over 2Gb memory.

Code:
Error occurred during initialization of VM
Could not reserve enough space for object heap
When stopping several other Java processes we can start this process. This seems to indicate that we don't have enough consecutive memory blocks available.

top reports the following:

Code:
load averages:  0.81,  0.91,  1.26                                   17:03:16
284 processes: 283 sleeping, 1 on cpu
CPU states: 90.4% idle,  6.0% user,  2.4% kernel,  1.1% iowait,  0.0% swap
Memory: 32G real, 11G free, 28G swap in use, 2491M swap free
Thus even though we have 11Gb out of 32Gb free on our 6CPU system we can't allocate enough memory.

uptime reports:
Code:
5:13pm  up 237 day(s), 9 min(s),  19 users,  load average: 0.93, 1.16, 1.27
Is it possible that the memory is too fragmented? How can we tell? or how can we fix this?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-30-2008
grial's Avatar
El UNIX es como un toro
 

Join Date: Jun 2006
Location: Madrid (Spain)
Posts: 531
I think increasing the available memmory to JVM would be enough. Add these parameters to the command line:
Code:
java -Xms256M -Xmx512M  ....
This way, a min. of 256Mb to a max. of 512Mb will be available. Change the values acording to your needs and tell us if it worked

Regards.
Reply With Quote
  #3 (permalink)  
Old 05-02-2008
Registered User
 

Join Date: Dec 2004
Location: Zürich
Posts: 145
We have 2Gb heap allocated. The issue is not a java issue because this is an OS message produced on the native stdout, not SystemOut from java. The Solaris system is unable to allocate enough memory for the JVM, even though it reports to have 12Gb available. If we stop other large memory consuming processes it is possible to start this JVM process. How is it possible that Solaris can't allocate 2Gb to 3Gb memory when there's 6 times that much available?
Reply With Quote
  #4 (permalink)  
Old 05-02-2008
grial's Avatar
El UNIX es como un toro
 

Join Date: Jun 2006
Location: Madrid (Spain)
Posts: 531
Quote:
Originally Posted by rein View Post
We have 2Gb heap allocated. The issue is not a java issue because this is an OS message produced on the native stdout, not SystemOut from java. The Solaris system is unable to allocate enough memory for the JVM, even though it reports to have 12Gb available. If we stop other large memory consuming processes it is possible to start this JVM process. How is it possible that Solaris can't allocate 2Gb to 3Gb memory when there's 6 times that much available?
I'm afraid I misunderstood your first post, I'm sorry.
That's a little bit weird... I'm talking about the fact that when you stop other java processes it works...

- Is your JVM 32 bits?
- what about "ulimits"?
Reply With Quote
  #5 (permalink)  
Old 05-02-2008
Registered User
 

Join Date: Dec 2007
Location: Virginia, USA.
Posts: 223
Sounds like a 32 bit constraint on process space.
Reply With Quote
  #6 (permalink)  
Old 05-05-2008
Registered User
 

Join Date: Dec 2004
Location: Zürich
Posts: 145
ulimit -a reports:

Code:
core file size (blocks)     unlimited
data seg size (kbytes)      unlimited
file size (blocks)          unlimited
open files                  1024
pipe size (512 bytes)       10
stack size (kbytes)         8192
cpu time (seconds)          unlimited
max user processes          29995
virtual memory (kbytes)     unlimited
It is a 32-bit JVM:

Code:
java version "1.4.2_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_15-b02)
Java HotSpot(TM) Client VM (build 1.4.2_15-b02, mixed mode)

uname -a:
Code:
SunOS hostname 5.8 Generic_117350-43 sun4us sparc FJSV,GPUZC-M
Reply With Quote
  #7 (permalink)  
Old 05-05-2008
Registered User
 

Join Date: Dec 2004
Location: Zürich
Posts: 145
We can restart the other processes afterwards as well.
Reply With Quote
Google UNIX.COM
Reply

Tags
load average, performance, solaris

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0