-Xms and -Xmx
Hohensee, Paul
hohensee at amazon.com
Wed May 15 20:23:17 UTC 2019
Another reason to set them equal is to make sure there’s enough physical memory available to back the heap. Otherwise, you might get an OOM when the JVM tries to commit more memory.
Paul
From: hotspot-gc-use <hotspot-gc-use-bounces at openjdk.java.net> on behalf of Ron Reynolds <tequilaron at gmail.com>
Date: Wednesday, May 15, 2019 at 1:02 PM
To: George Luiz Bittencourt <george at georgeluiz.com>
Cc: GC OpenJDK Hotspot Use List <hotspot-gc-use at openjdk.java.net>
Subject: Re: -Xms and -Xmx
the point of setting start and max heap sizes to the same value is to avoid the cost of having to increase the heap size at runtime in those cases where you are fairly sure you will need all the heap (i.e., server environments). the disadvantages of setting them is that you might be reserving more heap space than your JVM really needs, which isn't a nice thing to do to other processes on the same box, especially if memory is tight. variable memory usage is normally a client thing where the load is lower (driven my user actions).
On Wed, May 15, 2019 at 12:47 PM George Luiz Bittencourt <george at georgeluiz.com<mailto:george at georgeluiz.com>> wrote:
Hello,
I see a lot of people in the Java world saying to configure both the -Xms and -Xmx parameters as the same value.
However I don't see a reason for that. I come from the .NET world where we do not configure theses parameters and it works perfectly.
My question is: what are the disadvantages of not configuring them as the same value?
I want to visualize using top or task manager the real use of memory of my Java applications.
Thanks,
--
-George
_______________________________________________
hotspot-gc-use mailing list
hotspot-gc-use at openjdk.java.net<mailto:hotspot-gc-use at openjdk.java.net>
https://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20190515/e7237d18/attachment.html>
More information about the hotspot-gc-use
mailing list