▲ | pengaru 5 days ago | |||||||||||||||||||||||||||||||||||||||||||
I too knew someone in HFT ages ago that spoke of using java even in the hot path. He told me they disabled GC altogether in combination with not generating garbage in the hot path, with large enough machines to not OOM before markets closed for the day. From what I saw poking at the development trading boxes they over-provisioned both cpu ghz and ram to a ridiculous level. The machines looked nearly idle at their busiest. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | renewiltord 5 days ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||||||||
Disabling GC is wildly inefficient without making sure you don't have garbage because allocation will slow down the application to human scale. The magic is more in the no-allocation code than in the disable GC side. It is very annoying in Java because any non-primitive is boxed type. Object pools etc. Problem is it's easy to start in Java, but then you hit a wall. JNI has huge overhead. Exasperating. But hard to argue, sometimes if you don't start in Java you never get the problem because you never manage to bootstrap. | ||||||||||||||||||||||||||||||||||||||||||||
▲ | sshine 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
I worked with low-latency trading with C# in the hot path; they had started with C++ and eventually migrated to C# and just kept tight control of allocations. Later they’d go back to using C++ for training deep neural nets. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
▲ | perihelions 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
> "large enough machines to not OOM before markets closed for the day" Reminded of that missile defense system that was designed to be software-reset once a day, except the design assumptions changed (a war started) and it was ordered to be left running nonstop, as an emergency measure; after being left on for a week, failed, causing a large number of deaths. That one had some kind of integrator that accumulated floating-point roundoff over time. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
▲ | anonymousDan 5 days ago | parent | prev | next [-] | |||||||||||||||||||||||||||||||||||||||||||
Yeah it always felt like they were jumping through hoops to basically write C code through Java. I expect some of this might shift to Rust.. | ||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
▲ | potato3732842 5 days ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||||||||
It's a vicious cycle between provisioning more server and devs figuring out how to get more speed by using the resources for pre-computation. |