Re:Tuning Java Servers (2014)
by tootie on Wednesday September 02, 2015 @09:01AM
(#10158872)
Isn't that just risking a crash? Why not just allocate a 300GB heap and hope GC kicks in rarely?
[ Parent
| on HN ]
Re:Tuning Java Servers (2014)
by papercrane on Wednesday September 02, 2015 @10:10AM
(#10159226)
Hoping the GC kicks in rarely is not a great strategy. Usually when I see something like this the developers have gone out of their way to write garbage-free code (see Coral Blocks for an example of this.)
Re:Tuning Java Servers (2014)
by rainhacker on Wednesday September 02, 2015 @11:10AM
(#10159733)
If a code is truly garbage free (not sure how practical this is) won't it be independent of the heap size ? I know some teams do claim to write garbage free code to prevent GC from ever kicking of.
Re:Tuning Java Servers (2014)
by papercrane on Wednesday September 02, 2015 @11:26AM
(#10159859)
Yeah, actually I think you're right. I don't think you can actually disable the GC in JVM unless you patch it.
Truly garbage free is probably not practical 99% of the time. Normally you should just generally try to either have objects that are short-lived or practically permanent.