Java Process takes around 3GB memory in AIX Environment

Discussions

Performance and scalability: Java Process takes around 3GB memory in AIX Environment

  1. Hi,

    I am facing issue with Java process in AIX Machine. The issue is Java Process takes around 3GB memory, which is not acceptable in our environment.

    We are running a Weblogic server in AIX environment with IBM JDK. JVM heap size is set to 512M for both maximum and minimum values. But still the process(java) is taking 3GB.

    But the same application only takes 0.7GB for process in some other box with Websphere(AIX) and IBM JDK.

    Is there any reason to occupy such a huge memory by Java process in AIX? Is there any way to control it?


    Environmental Details:

    OS : AIX 5.2(Box is having 18CPUs and 14GB RAM)
    Appserver : Weblogic 8.1 (SP4)
    JDK : IBM JDK(1.4.2 ClassicVM)
    JVM Command Parameters : -Xms1024m -Xmx1024m -verbose:gc -Xgcpolicy:optavgpause

    Below command has been to get the process size of Java process (I never seen process size as 3GB. It was told by server admin).

    ps -eo user,pid,pcpu,vsz,time,args

    Here, vsz - gives memory size. Any idea why this is happening?

    thanks,
    Shanmuga perumal

    Threaded Messages (3)

  2. Weird indeed[ Go to top ]

    Hi Paul,

    I'm no expert on AIX environment, but your description does look very odd.
    Java process needs from the operating system, x memory for the heap,
     plus extra memory for other runtime usages, (like stack memory and others).
     If you defined maximum heap size to be 512MB, than I would expect from the operating system,
    to supply a virtual memory which is close to that number (like it does on the Windows servers).
    I guess that your test on memory size, gives the virtual memory, and not the physical memory usage.
    Maybe since the Server has 14GB of RAM, and there is a lot of free RAM available,
     the operating system decides to be very "generous" on the Virtual memory.
    and when a shortage of free RAM occurs, then it will decide to shrink java Virtual Memory
    I think it deserves a test.
    Another option is that the java process is a parent to another process (it is possible in java),
    and your checkup adds the two (or three) together.
  3. Check for a broken file[ Go to top ]

    Since you have set MaxHeapSize, it must be something outside the Java heap.

    We had a similar phenomenon with Websphere Application Server. The reason was a broken Oracle jdbc-client NLS driver archive, "nls_charset12.zip". Obviously it had been copied to the machine with ftp in ASCII mode ...

    Any time a new jdbc connection from the pool was opened, the process loaded the file into process memory again, never unloading the previous copies. After several days/weeks there were way more than 100 copies in process memory, each ~12 MB in size.

    The Symptoms were:
    - The Applications still did work
    - The Java processes started small, then grew by leaps
    - Most of the process memory (vsz) was paged out - but this system had not much memory anyway

    What you could try:
    1. Check both "vsz" (virtual memory size) and "rss" (resident set size). If "rss" is only a fraction of "vsz", then most of the memory is paged out, that is, not actively used by the process. If this is true for several days or longer, then there is something loaded in process memory that is not used.

    2. Check the process memory map and open files. On Solaris you would do that with "pmap" and "pfiles" respectively. Unfortunately I don't know how to do this on AIX.

    3. Check if the drivers/jars/zips used by the Java process have the correct file size.


    Hope that helps,

    Wolfgang Wamsler
  4. re[ Go to top ]

    I do not know the sollution, but we are facing similar problem on AIX - this is on jboss that is running pure java code. This must be reallt someting with JVM or kernel......