3 ms·
> Go GC since 1.6 openly claims <=10ms STW pauses. Does any open source Java GC offers that? Yes. HotSpot has had configurable max pause times for years and y
by pcwalton 11y ago
>
Go GC since 1.6 openly claims <=10ms STW pauses. Does any open source Java GC offers that?
Yes. HotSpot has had configurable max pause times for years and years [1]. If you want less than 10ms, set MaxGCPauseMillis to 10ms. It also has a state-of-the-art generational GC, which is very important for throughput, as bump allocation in the nursery is essentially impossible to beat with a traditional malloc implementation.
[1]: https://docs.oracle.com/cd/E40972_01/doc.70/e40973/cnf_jvmgc.htm https://docs.oracle.com/cd/E40972_01/doc.70/e40973/cnf_jvmgc...
- geodel 11y agoFrom the link I see: > The following example JVM settings are recommended for most production engine tier servers: -server -Xms24G -Xmx24G -XX:PermSize=512m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=20 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=70 So Oracle mentions 200ms for most prod use. I am not sure how you are able to deduct ~10ms pause from that link. And just because one can configure ~10ms does not mean at JVM will start respecting it. There is nothing in any official document by Oracle about max GC pause time. The results Google threw are mostly around ~150ms as min pause. > It also has a state-of-the-art generational GC. And it needs something like http://www.amazon.com/Java-Performance-Charlie-Hunt/dp/0137142528 http://www.amazon.com/Java-Performance-Charlie-Hunt/dp/01371... to do what JVM can do in theory. In practice as a java users I am used to seeing ~20-30 sec pauses for Full GC. The only effort in open for sub 10ms GC for large heaps is Project Shenandoah: http://openjdk.java.net/jeps/189 http://openjdk.java.net/jeps/189 and it is long way from availability.
- pcwalton 11y agoYou can ask for 10ms latency and you will get it. This is basic functionality of any incremental/concurrent GC. The throughput will suffer if you do that. But HotSpot's GC is far beyond that of Go in regards to throughput, for the simple fact that it's generational. Nongenerational GC pretty much always without exception loses to generational in heavily GC'd languages like Java and Go. There is no silver bullet for GC; it requires lots of hard engineering work, and HotSpot is way ahead.