dev@glassfish.java.net

[Fwd: Re: Heap Memory]

From: Bharath Mundlapudi <Bharath.Mundlapudi_at_Sun.COM>
Date: Thu, 10 Jul 2008 09:16:52 -0700

attached mail follows:



Hi Bharath and every body!

Finally we resolved the problem! We were looking in a mistaken place, in
fact all time we had a correct heap memory but we didn't know.

The next accion is try to have a 4G heap memory with a 64b Windows 2003
server, but first we need the infraestructure.

thanks and see you soon!

Susana.

> Hi Susana,
>
> To better analyze your current issues with heap, can you
> answer these questions?
>
> 1. On what hardware are you running this?
> 2. What is the physical memory?
> 3. JVM version? with java -version
> 4. Glassfish Version? with <glassfish>/bin/asadmin version
> 5. Can you send us the domain.xml before and after the change with -Xmx?
> <glassfish>/domains/<your domain>/config/domain.xml
> 6. How are you measuring the heap when you say 64MB?
> 7. What is the OS? (32bit or 64bit?)
>
> -Bharath
>
>>Thanks Bharath,
>>
>>We know this parameters, in fact we setting this two parameters and
>>nothing. We think that we are setting in a mistaken place, because
>>anything happens. We change values with Sun Java System Application
>>Server.
>>
>>We change Application Server > JVM Settings > JVM Options and then we
>> add
>>two options: -Xms1024m and -Xmx1024m.
>>
>>After that, we shutdown the application server but ... anything! the heap
>>memory is 64M.
>>
>>what do you think?
>>
>>Susana
>>
>>
>>
>>>Hi Susana,
>>>
>>> Did you try setting -Xms (Min Heap Size) to be equal to -Xmx
>>>(Max Heap Size)?
>>>
>>>Lets say you wanted 1024MB for your application then you can set -Xms
>>>1024m -Xmx 1024m. This forces the JVM to commit 1024MB upon startup. If
>>>you don't set -Xms then JVM commits whatever application requires and
>>>but allowed to max till -Xmx heap size.
>>>
>>>In your current case, your application might be using 64MB upon startup
>>>and allowed to grow till -Xmx heap size. But you can force JVM to
>>>allocate/commit the initial memory you want with -Xms. Still, the
>>>maximum memory required for your application is controlled by -Xmx.
>>>
>>>If you want to verify this, you can use jconsole (memory tab) to see
>>>used memory vs committed memory for your application.
>>>
>>>Let us know if you have more questions,
>>>-Bharath
>>>
>>>Glassfish
>>>http://www.sun.com/software/products/appsrvr/support.jsp
>>>
>>>
>>>
>>>
>>>
>>>>Hi Bharath
>>>>
>>>>Yes, we work with Glassfish and Netbeans. We tried to increase heap
>>>> java
>>>>memory with -Xmx jvm option but we can't increase more than 64MB
>>>>
>>>>Working directly with Netbeans heap memory increase to 1024MB, but not
>>>>without Netbeans.
>>>>
>>>> Maybe we must change another jvm option?
>>>>
>>>> thanks
>>>>
>>>> Susana.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>I am assuming you are programming your application on Glassfish?
>>>>>
>>>>>Please refer heap sizing section here
>>>>>http://java.sun.com/performance/reference/whitepapers/tuning.html
>>>>>
>>>>>Also you may want to refer,
>>>>>http://java.sun.com/docs/hotspot/HotSpotFAQ.html#gc_heap_32bit
>>>>>
>>>>>You can increase the heap size with -Xmx jvm option.
>>>>>
>>>>>-Bharath
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>>We are programming an application that requires to work with 3 Gb of
>>>>>>heap
>>>>>>memory from a java virtual machine but, in spite we had prove with
>>>>>> the
>>>>>>Xmx parameter in order to obtain the said necessary memory level, we
>>>>>>had
>>>>>>only obtained 64 Mb (we had used MemoryMXBean and MemoryUsage in
>>>>>> order
>>>>>>to
>>>>>>know the disposed memory level)
>>>>>>
>>>>>>Please, would you tell us how to increase the heap memory level at
>>>>>> the
>>>>>>java virtual machine?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>---------------------------------------------------------------------
>>>>>>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>---------------------------------------------------------------------
>>>>>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>>
>>
>
>