Max limit on heap size? How much RAM do you have? (I recommend that you don;t include swap space when making heap size judgements.)
Ideal heap size? Depends entierly on your application. You need to run some capacity tests using simulated loads, gather garbage colleciton data, anaylze that, and from there come up with a suggested heap size. Repeat until you reach your ideal size (which will invole both increasing and decrasing the size).
In general, when you set a heap size, the JVM will run a major garbage collection before you fill it up. Exactly when that happens depends on the garbage collector that you chose. The CMS and G1 collectors tend to play it safer and run long before the heap fills up. The default collector might let more fo the heap fill up. The unused heap space typically ends up in swap because it it is rarely, if ever, used (sort of wasted memory space).
Thanks for your reply.
I'm interested in the OS (RHEL564bit) and JVM cielings.
Just looking for hard specification limits.
>>Just looking for hard specification limits.
Do you mean the hard limit for a 64-bit JVM or the hard limit for RHEL?
The 64-bit JVM accepts a long value for max heap size, so look up Long.MAX_VALUE.
According to this page, RHEL running on a 64-bit Intel chip (not Itanium) accepts 1TB or RAM.
Of course, this is absolutely useless information (unless you have a motherboard than has enough memory slots for 1TB) - your pratical limit is the amount of RAM you have.