Gokul,

On 2/21/16 12:23 PM, Gokul.Baskaran wrote:
> Question was for Java 7

Answer was for Java 7

> It is a Tomcat / Application question as well, as memory default can
> be configured in the application config.

Not true: JVM memory is shared amongst all the "applications" you deploy
on it. This question has nothing to do with Tomcat specifically. That
doesn't mean it's inappropriate to post it here. Olaf was just pointing
out that his wasn't a Tomcat-specific answer.

> I totally agree that the best practice is to set the Xms and -Xmx. As
> am going to change the config, I would curious to know if the tomcat
> ui or the catalina does not have a Xms and -Xmx, would it default to
> 400MB? I read this in another forum.

Tomcat does not set any defaults. Any heap sizes you get are either
being automatically set based upon your JVM's defaults, or you have
specified them yourself.

-chris

> -----Original Message----- From: Olaf Kock
> [mailto:tom...@olafkock.de] Sent: Sunday, February 21, 2016 3:14 AM 
> To: Tomcat Users List <users@tomcat.apache.org> Subject: Re: Tomcat
> memory
> 
> This is rather a Java than a tomcat question:
> 
> The JVM allocates memory based on whatever default your current JVM
> version decides (you don't mention what version of Java you're on)
> 
>> From a text on
> http://docs.oracle.com/javase/7/docs/technotes/guides/vm/gc-ergonomics.html
>
> 
that's linked from my Java's manpage:
> 
> *initial heap size*
> 
> Larger of 1/64th of the machine's physical memory on the machine or
> some reasonable minimum. Before J2SE 5.0, the default initial heap
> size was a reasonable minimum, which varies by platform. You can
> override this default using the |-Xms| command-line option.
> 
> *maximum heap size*
> 
> Smaller of 1/4th of the physical memory or 1GB. Before J2SE 5.0, the
> default maximum heap size was 64MB. You can override this default
> using the |-Xmx| command-line option.
> 
> *Note:* The boundaries and fractions given for the heap size are 
> correct for J2SE 5.0. They are likely to be different in subsequent 
> releases as computers get more powerful.
> 
> Note that this is from JavaSE7 and even mentions 5 - with more power
> there comes more initial and maximum memory defaults.
> 
> I'm not aware of the actual development of the default memory -
> mostly because I consider it good practice to know what an
> application uses and provide it explicitly, rather than relying on
> defaults. (and frankly, on the applications that I see, the default
> typically is not even enough - let alone a good basis for tuning)
> 
> While we're at it: For production systems I consider it good practice
> to set -Xms and -Xmx to the same value. Reason: If you don't have
> enough memory available, you want to know this when the process
> starts, not days later when it tries to allocate "the rest" -
> typically sunday night at 3am.
> 
> Olaf
> 
> Am 21.02.2016 um 03:39 schrieb Gokul.Baskaran:
>> Hi,
>> 
>> I am currently running tomcat 7 in Windows 2012.
>> 
>> The current JVM Heap memory parameters are set to empty, does the
>> JVM Heap memory utilize the entire memory of the OS or does it
>> default to a specific memory number?
>> 
>> Thank you -Gokul
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to