4 ms·
I don't think it's "having to know what to set it to up front" - its more experimentation and seeing what has the best performance. Too big heap and poor code,
by rs 17y ago
I don't think it's "having to know what to set it to up front" - its more experimentation and seeing what has the best performance. Too big heap and poor code, you might end up having really, really long GC pauses. Too small heap and you'll be out of heap space.
I like it as there's only so much physical memory on a server, and there's only so much virtual memory a kernel can provide. Swapping is not a good idea if you're looking into performance, and hence limiting the heap size can turn out to be a good strategy to ensure that your application does perform within expected boundries.