Re: Ranting about JVM's default memory limits...
Tom Anderson wrote:
I'm not saying it can't be done, just that it's not trivial.
Oh, I'm sure it's non trivial. But nothing worthwhile is trivial.
And i suppose this is really about the decision about when to grow the
heap, which java already has to make, not about maximum heap size.
Well, it's about the maximum heap size in the sense that I'm forced to
deal with the max heap size, and I'd strongly prefer not to. I'd much
rather leave the max heap size up to a JVM, which has system information
that a Java app is not privy to. (And the author isn't privy to, either.)
As for when to grow it, I guess you start with "when the smaller heap
fills up" and go from there.
Just to try to be forward looking, I'm sure -Xmx (fixed, absolute
maximum heap size) can stay for those who want to use it. But I'd also
like to see something like -Xmx:reluctant, normal, permissive where
those argument describe, in general terms, how often the GC decides to
grow the heap vs. run another object collection pass.
And I'd also like to see Java shrink the heap if it can. Return memory
to the OS please.
Yes, non-trivial to be sure, but greatly desired also.