>> I've never understood why sun chose to have a "max heap size" setting >> and default it to 64 megs. To figure out what your max heap size >> should be you pretty much have to use trial and error. This makes >> java inherently unstable. I can't count the # of times I've had >> processes crash with an OutOfMemoryException because the heap size is >> set either to the default 64 meg or too low. >> >> Why not do what every other runtime does and just allocate memory as >> needed? And what exactly does the max heap size setting do anyway? >> OOME is thrown when GC cannot reclaim more than 5% free after making several attempts to do so.
Java heap memory currently must be configured in a contiguous chunk. Mas size allows a reserve to be allocated to meet this requirement. It is also a safely valve so the JVM doesn't consume all or beyond all the memory you have on the machine. Also, having large heaps isn't always best for GC throughputs. Setting a max will make for healthier performance. To set memory, you need to take an artilliary approach to hitting moving targets, one in front, one behind and the thrid try will typically hit. Use GC logs to help with the estimates and I bet you'll hit on the second try every time. Regards, Kirk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~----------~----~----~----~------~----~------~--~---
