3 ms·
Could you maybe elaborate more on how to achieve this with Java, i.e., run an entire week and never get GCed? I would imagine that using immutable types is one
by giu 7y ago
Could you maybe elaborate more on how to achieve this with Java, i.e., run an entire week and never get GCed? I would imagine that using immutable types is one of the tricks used in such a scenario.
- Pepe1vo 7y agoYou would (among other techniques) use something like Stormpot to maintain Object pools to release and acquire instances from. Object pools typically can't match the GC on latency and throughput, however they do provide a lot more predictable and stable performance.
- mlrtime 7y agoYou basically write Java as C++, you don't use any builtins, write everything yourself from pure java.
- dirtydroog 7y agoAnd I'd imagine sun.misc.Unsafe is used quite often too.
- spugody 7y agoI know you said "almost" but you don't have to re-write huge amounts to achieve zero gc and very low latency. There are open source tools, eg. agrona, aeron, that get you a lot of the way there.