Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2008

Tip: Looking for answers? Try searching our database.

Unexpected limitation for maximum heap size

Thread view: 
Markus Elfring - 10 Mar 2008 17:10 GMT
Hello,

I would like to share a specific experience.

I have got a computer with 2 GB main memory for a dual core processor. I have
tried a bit fine-tuning of start parameters for Java virtual machines. The
settings "-J-Xss81m -J-Xms364m -J-XX:PermSize=41m -J-XX:MaxPermSize=400m
-J-XX:+UseParallelGC" are in my file "/usr/local/netbeans/6.0.1/etc/netbeans.conf".

I'd like to point out that I get the following error message if I use the
parameter "-J-Xms365m".
Error occurred during initialization of VM
Incompatible initial and maximum heap sizes specified

I find this size limitation interesting because my hardware has got the capacity
to provide higher memory values to virtual machines. Is only the software
development environment "NetBeans 6.0.1" affected?

Regards,
Markus
Nigel Wade - 10 Mar 2008 17:25 GMT
> Hello,
>
[quoted text clipped - 13 lines]
> to provide higher memory values to virtual machines. Is only the software
> development environment "NetBeans 6.0.1" affected?

The flag -Xms sets the initial heap size. I don't know what maximum heap size is
set by default in your installation, but presumably it is less than the initial
heap size you have requested.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

Thomas Schodt - 10 Mar 2008 17:28 GMT
> I have got a computer with 2 GB main memory for a dual core processor. I
> have tried a bit fine-tuning of start parameters for Java virtual
[quoted text clipped - 6 lines]
> Error occurred during initialization of VM
> Incompatible initial and maximum heap sizes specified

It is telling you to add "-J-Xmx365m".
Markus Elfring - 10 Mar 2008 17:58 GMT
> It is telling you to add "-J-Xmx365m".

Thanks for your clarification.

A setting like "-J-Xms81m -J-Xmx987m" might make more sense.

Regards,
Markus
Roedy Green - 11 Mar 2008 02:17 GMT
On Mon, 10 Mar 2008 17:10:49 +0100, Markus Elfring
<Markus.Elfring@web.de> wrote, quoted or indirectly quoted someone who
said :

>I have got a computer with 2 GB main memory for a dual core processor. I have
>tried a bit fine-tuning of start parameters for Java virtual machines

Even if Java got a 2 GB address space to itself, it could not use it
all for the heap.  Lot's of other stuff has to go in there, e.g. the
run time and possibly the compiled code, and possibly the native code.
The OS may also chew up a lot of it for use for DLLs etc.

It is a bit like the difference between gross pay and disposable
income.

You also want to double check your OS gives a private 2 Gig address
space to each app rather than a piece of a shared 2 Gig address space.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.