Skip to Content

Are you successful in installing Java System on a 2 GB RAM? Have you come across the error, after n seconds the state of the engine changed from “Starting” to “Stopped”?

Java System Installation

During the Java System Installation, we must have come across the following screen shown below.

image

What is so different? Since the installation populates most the values calculated, many blindly click next assuming the parameters are correct. But sometimes, these calculated parameters needs to be changed based on our system.

Max Heap Size

Take a look at the link from sun.

http://java.sun.com/j2se/1.5.0/docs/guide/vm/gc-ergonomics.html

Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0, the default maximum heap size was 64MB.

Do not choose a maximum value for the heap unless you know that the heap is greater than the default maximum heap size. Choose a throughput goal that is sufficient for your application.

For a physical memory of 2GB, the best suggested maximum heap size is 512 MB. In the above screen, just by changing the max heap size to 512 for a 2 GB RAM machine, you are sure to save days of extra effort.

The blog answers the following unanswered forum questions.

J2EE engine is not starting
CJS-20057:Starting J2EE Engine JC00 of SAP system J2E failed: after 1317 se
NW04 Java add-in installation problem

There is a SAP Note 736462 and 709140 on Problems increasing Xmx on Windows 32 bit platforms.

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Dagfinn Parnas
    Hi,

    The reason why java is sensitive about memory (you might have 1280MB memory available, but still it won’t run with a heap size of 1024MB) is that it requires a continuous space of available memory (meaning there has to be one or more memory block available of 1024MB from start to end). Since the memory is usually a bit fragmented, this will usually not work.

    One solution is as you suggest to decrease the maximum heap size, but sometimes this is not an option as the JVM requires more memory and if there is too little it will do too much  garbage collection and crash relatively easily if there is a small memory leak.

    The solution which I prefer is to decrease the max heap size a bit (usually 768MB) and increase the size of the paging file on windows (http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_perform_change_vmpagefile.mspx) . I usually set this the paging file to 3 or 4 GB on a 2GB laptop. Note that performance can be a worse if it is swapped in and out of memory, but I haven’t noticed this to any large extent.

    Regards
    Dagfinn

    (0) 
  2. Karsten Geiseler
    Hi Felix,

    I’ve made good experiences with a max heap size of 768MB on my 2gb windows laptop.
    The general start point of vm settings for the SAP Web Application server should be SAP Note 709140. Maybe you could also mention this note.

    Regards, Karsten

    P.S. I think it will take some time until Java 5 links are relevant for SAP customers πŸ˜‰

    (0) 
  3. Cled Tacla
    Hi,

    i also encountered this error on an Netweaver ’04 XI SR1 installation on Win2003 server & Oracle 9iR2

    i set the virtual paging to both of my drives to 4092, then 512 on the max.heap size

    it worked for my installation!  thanks πŸ™‚

    (0) 

Leave a Reply