Pablo Duboue wrote:
>>  All right...
>>
>>  Then, maybe I could add a function to java-wrappers that would find
>> out what is a 'good default' for that parameter, getting something more
>> than the memory required but still reasonably less than the memory
>> present on the machine ?
> 
> If you want to go in that direction, you might want to add also
> pointer compression in AMD64 (-XX:+UseCompressedOops), which makes a
> huge difference with respect to minimum heap sizes in AMD64. Otherwise
> what it's OK for 32-bits might be way too little for 64 bits.
> 
> http://wikis.sun.com/display/HotSpotInternals/CompressedOops
> http://java.sun.com/javase/6/webnotes/6u14.html
> 
>>  Would that be useful for anyone else than me ?
> 
> I find it difficult to imagine how would you automatically determine
> the heap size based on the ideas you sketched in your earlier
> comments. If what you propose actually solves the problem, then you
> can actually write a patch for upstream to do that within the JVM :-)
> :-)

  My idea would be something just like "all the memory minus a bit",
which would make java apps behave somehow like the other programming
languages with respect to memory allocation.

  The reason why this isn't done by default in the JVM (and why it
definitely shouldn't be done that way) is that the JVM puts a strong
emphasis on security: setting a limit on the resources a web applet can
take seems like a good idea.

> In general, I would vouch for having some functionality that allows
> the maintainers specify something in the lines of "this is the bare
> minimum heap" and "this is the recommended heap" and let the
> java-wrapper use one or the other depending on physical RAM

  That's something easy to do, and it seems like a good idea too... I
can implement that.

> and/or
> some global configuration parameter in /etc (which would be a fine
> place to add the compressed pointers flag). That of course is just a
> wish for an ideal world ;-)

  This is a really interesting idea, since other flags can come in
useful too globally, such as graphic parameters (I'm thinking for
instance about Dsun.java2d.pmoffscreen=false that seems to significantly
improve the rendering speed on some hardware - never experienced myself).

  Isn't there already a way to do that ? (configuration files setting
various parameters for the JVM ?)

  Cheers,

        Vincent

-- 
Vincent Fourmond, Debian Developer
http://vince-debian.blogspot.com/

Give a man a fish and you feed him for a day.
Give him a poisoned fish and you feed him for the rest of his life !
 -- Slightly twisted chinese proverb

Vincent, listening to Learning To Live (Dream Theater)


-- 
To UNSUBSCRIBE, email to debian-java-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4b958418.9010...@debian.org

Reply via email to