News for hackers. Stuff that matters.
Re:Modern garbage collection by LeanderK on Tuesday December 20, 2016 @08:16AM (#13219494)
But why does Go prioritise low latency? I would think that low latency is not super important for web-servers since there are various other factors adding up to the total latency (what i mean here: time spent between call of the http request to finished receiving all bytes).
Re:Modern garbage collection by Jabbles on Tuesday December 20, 2016 @08:28AM (#13219556)
Consider jitter, rather than latency. If you're building a video calling service. You don't want random 10ms gaps between your frames.

Also consider fan-out. GC pauses add to the long-tail of latency. If your service depends on many backend services, your overall latency may well depend on the maximum of all your backends.

Re:Modern garbage collection by DannyB2 on Tuesday December 20, 2016 @10:21AM (#13220535)
Processing video in a GC system is best handled like some other things that are continuous ongoing processing without doing a GC.

1. Allocate all your structures up front.

2. Your main video processing loop (or compression, encryption, signal processing, etc) does not do any memory allocation.

This is also like writing games in Java.

Re:Modern garbage collection by stuckagain on Tuesday December 20, 2016 @12:44PM (#13222056)
It prioritizes latency because it's written by Googlers, and Google prioritizes latency. I don't think we need any more complicated explanation.
Re:Modern garbage collection by davecb on Wednesday December 21, 2016 @10:43AM (#13229927)
From thew point of view of a capacity planner and performance engineer, one goes for low latency first, because for many algorythms, the best throughput is seen when latency is lowest. Some cases will be different, but starting with removing time wasted sitting in a queue is A Universal Good (;-))
Re:Modern garbage collection by user5994461 on Tuesday December 20, 2016 @06:30PM (#13225368)
... because a typical Google service will have to call many other services to process a request (keyword: fan-out). The effective latency is badly impacted by the _worst_ latencies of these services.
Re:Modern garbage collection by hashmal on Tuesday December 20, 2016 @08:45AM (#13219659)
the world of computing isn't just web servers. besides, the vast majority of language implementations already favor throughput over latency when it comes to GC. when latency is a requirement for your project you have no choice but fall back on languages like C. it would be nice to have a viable alternative with managed memory.
Re:Modern garbage collection by pjmlp on Tuesday December 20, 2016 @08:57AM (#13219760)
There is still hope for a Modula-3 replacement with the ongoing work on Swift, .NET Native, D, Nim.

Even if it still isn't quite here today.

Re:Modern garbage collection by bogomipz on Tuesday December 20, 2016 @04:25PM (#13224171)
I know you are being facetious but is there actually a connection between Modula-3 and Swift, .NET Native, D, Nim?
Re:Modern garbage collection by pjmlp on Tuesday December 20, 2016 @05:08PM (#13224615)
Just a set of common features.

Memory safe system programming languages[0] with a GC by default, value types which can be allocated on global data/stack/registers, generic programming, ability to have more control over resource management than just finalizers, allocate memory outside GC control when performance requires it.

[0] .NET Native is not yet there, but is incrementally getting a few of the System C# features

Re:Modern garbage collection by LeanderK on Tuesday December 20, 2016 @08:56AM (#13219754)
yeah, but when i hear go i think of web servers ;)
Re:Modern garbage collection by skykooler on Tuesday December 20, 2016 @11:16AM (#13221146)
It sounds like the Go GC would be well optimized for video games, where a 20ms pause would cause a dropped frame.