Am 19.03.2017 um 13:37 schrieb André Warnier (tomcat):
> On 17.03.2017 14:54, Christopher Schultz wrote:
>
>>
>> Note that Java *never* gives any memory back to the OS, even when the
>> heap-usage goes down. This is a Java thing, not a Tomcat thing.
>
> I did not know that (*), and I have never seen this mentioned
> explicitly in any Java documentation (not that I have read many).
> What is the point of the Java "-Xms" and "-Xmx" command-line
> parameters then (when they have different values).
I can't remember where I've seen it, but it's been ages ago and I assume
it since eternity.

The difference between -Xms and -Xmx is:
$ java -X 2>&1 | grep "Java heap size"
    -Xms<size>        set initial Java heap size
    -Xmx<size>        set maximum Java heap size

i.e. -Xms only talks about the /initial/, not about the minimal heap size.

In production systems I religiously set both sizes to identical values,
assuming that otherwise allocation of more than the initial memory will
fail sunday night at 3am instead of right when the JVM is started.

Olaf

>
> (*) I thought it was only perl doing that
>
>
> ---------------------------------------------------------------------
> 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