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 Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

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 07:56 AM
how allocate virtual memory munnu High Level Programming 2 04-20-2007 04:07 PM
Unix Help - allocate more memory to /tmp cmackin UNIX for Dummies Questions & Answers 1 06-01-2006 07:25 AM
unable to allocate enough cells for gray scale raz SUN Solaris 1 10-04-2004 02:47 PM
hoe to allocate a 2 dimensions array? azran High Level Programming 2 09-30-2002 11:22 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-30-2008
rein rein is offline
Registered User
  
 

Join Date: Dec 2004
Location: Zürich
Posts: 146
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?
  #2 (permalink)  
Old 04-30-2008
grial's Avatar
grial grial is offline Forum Advisor  
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.
  #3 (permalink)  
Old 05-02-2008
rein rein is offline
Registered User
  
 

Join Date: Dec 2004
Location: Zürich
Posts: 146
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?
  #4 (permalink)  
Old 05-02-2008
grial's Avatar
grial grial is offline Forum Advisor  
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"?
  #5 (permalink)  
Old 05-02-2008
ramen_noodle ramen_noodle is offline Forum Advisor  
Registered User
  
 

Join Date: Dec 2007
Location: Virginia, USA.
Posts: 251
Sounds like a 32 bit constraint on process space.
  #6 (permalink)  
Old 05-05-2008
rein rein is offline
Registered User
  
 

Join Date: Dec 2004
Location: Zürich
Posts: 146
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

Closed Thread

Bookmarks

Tags
load average, performance, solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:32 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0