Earlier quoted context omitted.
Also, Azul Systems solved that issue - the proprietary C4 GC has no pauses, and the heap can be huge, like hundreds of GB. If that tech would become common place, maybe this discussion would be obsolete. But I think C4 requires kernel support, and the first attempt to get a patch accepted didn't go well.
To clarify, Azul's Zing does have pauses, but they optimized the crap out of them (the pauses are more time-to-safepoint rather than GC pauses). GC time wrt application stopped time is constant regardless of heap size. (I'm an Azul customer and Zing user)
Go GC: Solving the Latency Problem in Go 1.5
111–120 of 132 posts
Re: Go GC: Solving the Latency Problem in Go 1.5
#112Earlier quoted context omitted.
No, why should I? In Go I've finally found a language that's pragmatic, both fast to run and fast to think and write in. While evreyone's discussing its obvious shortcomings, I'm churning out working code faster than ever. Now somebody who isn't me is putting in big resources into making the language even better. Where's the reason to complain?
The reason to complain for the other commenters is that you're criticizing something you've never used, while being familiar with only one method of doing things. Your criticism is not legitimate.
Re: Go GC: Solving the Latency Problem in Go 1.5
#113I've worked with garbage collected languages (ruby, Java, Objective-C in the bad old days), automatic reference counting (Objective-C and Swift), in the Rust model and manual reference counting/ownership in C over about 15 years now. Having thought about this a lot, I just don't really understand why people continue to work on garbage collection. Non-deterministic lifecycle of objects/resources, non-deterministic pau…
Re: Go GC: Solving the Latency Problem in Go 1.5
#114Re: Go GC: Solving the Latency Problem in Go 1.5
#115Earlier quoted context omitted.
To clarify, Azul's Zing does have pauses, but they optimized the crap out of them (the pauses are more time-to-safepoint rather than GC pauses). GC time wrt application stopped time is constant regardless of heap size. (I'm an Azul customer and Zing user)
Thanks, the marketing implies its pause-less. What are typical application stop times?
Re: Go GC: Solving the Latency Problem in Go 1.5
#116Re: Go GC: Solving the Latency Problem in Go 1.5
#117Earlier quoted context omitted.
Can you point me to the source of your claim about memory overhead? The Go team specifically states their goals for the 1.5 garbage collector as follows: "Hardware provisioning should allow for in-memory heap sizes twice as large as reachable memory and 25% of CPU cycles". http://llvm.cc/t/go-1-4-garbage-collection-plan-and-roadmap-... As far as I know, that collector is not a copying collector. I also know that all…
They are still using a simple and slow GC, non-copying, tri-color M&S, but at least incremental. So they need to scan the complete heap, while a good copying collector (e.g. a two-finger Cheney with forwarding pointers) would only need to scan the stack and some roots. My GC needs ~4ms on normal heap sizes, the fastest M&S GC's need ~150ms. But I haven't found a good version besides the Azul one, which works fine thr…
Do you have any idea what could make the Go folks ask for "in-memory heap sizes twice as large as reachable memory"? This seems to be completely at odds with what you are saying.
Re: Go GC: Solving the Latency Problem in Go 1.5
#118Earlier quoted context omitted.
They are still using a simple and slow GC, non-copying, tri-color M&S, but at least incremental. So they need to scan the complete heap, while a good copying collector (e.g. a two-finger Cheney with forwarding pointers) would only need to scan the stack and some roots. My GC needs ~4ms on normal heap sizes, the fastest M&S GC's need ~150ms. But I haven't found a good version besides the Azul one, which works fine thr…
>Memory overhead: A non-copying GC has none Do you have any idea what could make the Go folks ask for "in-memory heap sizes twice as large as reachable memory"? This seems to be completely at odds with what you are saying.
Re: Go GC: Solving the Latency Problem in Go 1.5
#119Earlier quoted context omitted.
They are easier with GC, yes. But hazard pointers work reasonably well as a substitute. (Note that you need generics for lock-free data structures to be ergonomic.)
... and I'll ask you the same question I always do: in that case, adding predictable, low latency arenas to GC languages is much easier than using hazard pointers (which are really a form of GC) to non-GC languages. Why should RC ever be the default?
I disagree with that. I haven't seen "opt-out GC" work that well in practice. People use memory pools in GC'd environments to work around slow GCs, sure, but they're limited and have poor safety/ergonomics, as nobody wants to have to explicitly free data. They also don't really provide one of the greatest advantages of manual memory management, which is the ability to use stack allocation aggressively. (By "aggressively" I mean "in ways that an intraprocedural analysis with no knowledge of data lifetimes—i.e. an escape analysis—could not prove safe".)
Hazard pointers are a small feature, localized to exactly where you need them (concurrent data structures). Those who need concurrent data structures have to pay for the feature; those who don't don't have to. A pervasive GC, however, imposes its costs and benefits on the entire language ecosystem.
Re: Go GC: Solving the Latency Problem in Go 1.5
#120I've worked with garbage collected languages (ruby, Java, Objective-C in the bad old days), automatic reference counting (Objective-C and Swift), in the Rust model and manual reference counting/ownership in C over about 15 years now. Having thought about this a lot, I just don't really understand why people continue to work on garbage collection. Non-deterministic lifecycle of objects/resources, non-deterministic pau…
> I'm curious, is there something I'm missing? Working in large teams with disparate skill levels and high attrition, e.g. typical corporate jobs. Manual memory management never works, because there is always someone that does the wrong thing that leads either to blow ups or security exploits, that take experts days to weeks to track down. ARC is one step up, but requires deep knowledge of the code, where to place we…
This only applies to unsafe manual memory management. Not all manual memory management is unsafe.
> Lifecyle of resources is very deterministic in GC languages, provided one uses the proper language constructs, such as using/with/try/scope/defer or high order functions.
Only for objects that have lexically scoped lifetimes. It doesn't help with prompt reclamation of objects with dynamic lifetimes (e.g. a file that two threads are holding onto, which you want to close when both threads shut down).