News for hackers. Stuff that matters.
Re:Tuning Java Servers (2014) by nailer on Wednesday September 02, 2015 @08:38AM (#10158760)
Re: GC tuning, one investment bank simply disabled the GC during the trading day: purchasing massive amounts of RAM is cheap, having the GC non-deterministically kick in when you're making a decision or executing a trade is expensive. (Yes, Java isn't the most performant language but lots of developers know it and it's great for testing algos quickly)
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?
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.

Re:Tuning Java Servers (2014) by cam- on Wednesday September 02, 2015 @03:57PM (#10161542)
Agree, you want the GC sipping constantly, not gulping, or embarrassingly pulling up its pants.
Re:Tuning Java Servers (2014) by SourPatch on Wednesday September 02, 2015 @11:04AM (#10159694)
I assume that was a custom VM. As far as I know, there is no way to disable GC in the official Oracle JVM.
Re:Tuning Java Servers (2014) by nradov on Wednesday September 02, 2015 @12:09PM (#10160181)
Can you do this with real-time Java? I understand that it allows you to do all your memory allocation first, then switch into real-time mode with no GC. http://www.oracle.com/technetwork/articles/java/nilsen-realt...
Re:Tuning Java Servers (2014) by nailer on Wednesday September 02, 2015 @11:26AM (#10159848)
I'm pretty sure it was a custom VM: I wasn't on the team, but my own group (Unix) was playing with custom IP stacks with the same goal (reducing latency, increasing determinism).
Re:Tuning Java Servers (2014) by hemapani on Wednesday September 02, 2015 @11:12PM (#10163181)
With collectors like CMS, you can control after what percentage of the GC is filled GC will kick in. I think you can use that get the same effect. This is only for old gen.
Re:Tuning Java Servers (2014) by LoneWolf on Wednesday September 02, 2015 @11:11AM (#10159740)
I too would like to know that was the VM and how it was disabled.
Re:Tuning Java Servers (2014) by hemapani on Wednesday September 02, 2015 @11:10AM (#10159734)
You could get the same effect through off heap memory allocation.
Re:Tuning Java Servers (2014) by needusername on Wednesday September 02, 2015 @12:17PM (#10160258)
> disabled the GC

Disabled the entire GC or just the old gen GC?