harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Salikh Zakirov <Salikh.Zaki...@Intel.com>
Subject Re: [rant] Memory options in VM -- why is the default not 'unlimited'
Date Sat, 29 Jul 2006 14:56:47 GMT
Alex Blewitt wrote:
> 1) The -X options even exist at all. After all, they're so standard
> now (e.g. -Xmx256m) that the point of calling them 'non-standard'
> options is pretty much laughable.

I agree that -Xmx and -Xms are de facto standard now.

I have also seen some java implementation long ago that used -mx and -ms options
instead of -Xmx and -Xms. I don't remember what it was. Could it have been java 1.1?

> 2) That they felt the need to build another level of non-non-standard
> into command line options such that -XX is even necessary

I agree, -XX looks ugly to me too. Sinse these options are "two times non-standard",
we don't have the need to have any of those.
Regarding the -X and standard options in DRLVM, it strives to
have all "standard" options, both de jure and de facto, and has
all its own non-standard options starting with -X.

> 3) That it's necessary to put limits on a system that uses garbage
> collection and should be able to release memory back to the OS at all?

This point is quite moot. 
Most existing JVMs have sensible defaults,
and do not require you to specify any default.
BEA jRockit defaults to 64m initial size, and 3/4 of physical memory maximum size,
according to their user documentation. And this looks reasonable to me.

In DRLVM, I plan to do something similar for the defaults eventually, but
have not got to it yet. Currently, it has hardcoded defaults of -Xms64m and -Xmx256m.

So, answering your question, if you do not want to put any artificial
limit to the memory used by the java heap, then do not specify any -Xmx and -Xms
options, and the JVM will decide itself.

However, if you *do* want to limit the amount of memory used for the JVM, then these
options are very useful.

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message