News for hackers. Stuff that matters.
Re:Sub-millisecond GC pauses in Go 1.8 by gok on Friday October 28, 2016 @10:15PM (#12822265)
"typical worst-case"

So... not worst-case. :)

Regardless, very impressive achievement, especially given that they've been able to do it without a JIT or exotic tricks like Azul.

Re:Sub-millisecond GC pauses in Go 1.8 by dpark on Friday October 28, 2016 @10:39PM (#12822343)
Of course not. You can't put absolute worst case times on code in practice. Worst case might be that someone managed to load 80PB of RAM on a CPU underclocked to 50 MHz. Or that the OS suspended the process in the middle of GC and was promptly frozen for a week while VMs were migrated across the country in the cup holder of someone's Toyota.

Worst case in absolute time always requires ignoring pathological cases.

Re:Sub-millisecond GC pauses in Go 1.8 by taeric on Friday October 28, 2016 @11:25PM (#12822480)
This feels very wrong to me. Qualifying it with some sort of analysis is fine. Just saying "typical" is borderline negligent and is why nobody just uses naive quicksort in production systems where runtime can actually matter.
Re:Sub-millisecond GC pauses in Go 1.8 by klodolph on Saturday October 29, 2016 @02:05AM (#12822826)
What's the alternative?

We don't care about worst-case latency in practice, and average case is often ignored as well. We look at 99.9% latency numbers or things like that. Worst-case is for people designing pacemakers or rockets, that's not what we are doing here.

Re:Sub-millisecond GC pauses in Go 1.8 by kuschku on Saturday October 29, 2016 @03:32AM (#12823031)
> that's not what we are doing here.

Considering this code will likely be used in IoT, yes, this is what we’re doing here.

Re:Sub-millisecond GC pauses in Go 1.8 by grogenaut on Saturday October 29, 2016 @05:22AM (#12823259)
Pretty sure web enabled cameras are NOT pacemakers NOR rockets... heck they can't even put a different password on each device by printing on a sticker.

Nor is my sous vide machine or anything else I've seen as an IoT device. I wouldn't call say my oscilliscope an IoT device even if it can connect to wifi. It's a scientific device with cloud upload.

Re:Sub-millisecond GC pauses in Go 1.8 by kuschku on Saturday October 29, 2016 @06:44AM (#12823420)
You do realize pacemakers nowadays have WiFi and Bluetooth and run on the same platform as other IoT devices?

There was an interesting talk at the Chaos Communications Congress a few years back.

Re:Sub-millisecond GC pauses in Go 1.8 by grogenaut on Saturday October 29, 2016 @03:51PM (#12825974)
I'm well aware of this. I'm also aware that people are hacking these devices left and right. But a cow is a mammal and a mammal isn't a cow.

Gp post was not talking about security we're talking about Real time computing. If it's running on IoT hardware, eg rpi running linux, it's likely not doing real time os stuff because linux isn't really a real time os.

And I still don't classify pacemakers as IoT. Just because you want to slap a vague acyronym on any and every "connected" embedded device doesn't mean I agree.

Re:Sub-millisecond GC pauses in Go 1.8 by kuschku on Saturday October 29, 2016 @05:16PM (#12826440)
But that's the thing, there's now a trial for implanted, smart, insulin pumps, running on node.js, connecting to its app via WiFi.

That stuff is IoT in every definition of the word.

Re:Sub-millisecond GC pauses in Go 1.8 by kpil on Sunday October 30, 2016 @08:52AM (#12829509)
I know a few software developers that have diabetes, and they seem to be reluctant to automatic pumps.

Monitoring might be fine, but installing something in the body that can kill you and then running it on node.js doesn't seem like a good idea.

Re:Sub-millisecond GC pauses in Go 1.8 by voidlogic on Saturday October 29, 2016 @02:10PM (#12825391)
>Just saying "typical" is borderline negligent

Pretty harsh for an informal post on a mailing list, its not like this was a formal proposal or an announcement.

Talking about why "typical" lacks meaning is fair, but calling the OP negligent is not.

Re:Sub-millisecond GC pauses in Go 1.8 by taeric on Saturday October 29, 2016 @02:15PM (#12825430)
Completely fair point and one I should have acknowledged. I was not intending to call the OP negligent. From what I saw, they did a full analysis and are preparing the full numbers. I was just irked by this idea that "typical" is all one needs.
Re:Sub-millisecond GC pauses in Go 1.8 by dr_zoidberg on Saturday October 29, 2016 @07:32AM (#12823539)
It depends on how it's been determined that it's the "typical worst case"

...maybe an anonymous usage program?

...maybe their typical use case? (which is definitely not everyone elses)

...maybe the typical use case of Google employees using Go for their single-computer tasks? (which would be closer to a "typical user" as in people who read HN)

...an average of those three, or perhaps even more, use cases? wighted in some way?

But if done correctly, optimizing the 90% typical problem by 20%, gives you a general 18% improvement, far more than even making disappear the least important 10% of the runtime (which some bad optimization efforts tend to focus on...).

Making software faster is always about knowing where to work, and then focusing exactly on that. Nothing wrong in attacking the "typical [anything] case".

Re:Sub-millisecond GC pauses in Go 1.8 by nickpsecurity on Saturday October 29, 2016 @09:18AM (#12823803)
Sure you can. It's standard in embedded software. Called WCET analysis. There's also real-time GC's. Go team has simply not done either of these in their design. So, they can't give a worst-time estimate.
Re:Sub-millisecond GC pauses in Go 1.8 by countingteeth on Saturday October 29, 2016 @09:28PM (#12827568)
Indeed. If there's no worst case time, that eliminates use in hard-real-time, certifiable embedded, e.g. aerospace, medical, etc.

You can't very well tolerate an "atypical" GC pause when you're firing a laser or radiation pulse, doing engine control, or even updating a display in a flight instrument setting.

Re:Sub-millisecond GC pauses in Go 1.8 by eternalban on Saturday October 29, 2016 @07:54AM (#12823590)
What does JIT have to do with GC?
Re:Sub-millisecond GC pauses in Go 1.8 by gok on Saturday October 29, 2016 @12:15PM (#12824611)
A JIT can do better escape analysis, eliminating allocations. A JIT can also be more clever about safe point insertion. And when a JIT detects that code isn't being called concurrently, it can emit much cheaper read/write barriers.
Re:Sub-millisecond GC pauses in Go 1.8 by kodfodrasz on Saturday October 29, 2016 @04:06AM (#12823113)
This is what amortized analysis is about.
Re:Sub-millisecond GC pauses in Go 1.8 by countingteeth on Saturday October 29, 2016 @09:30PM (#12827576)
You can't amortize in real-time. You don't get a mulligan for missing a deadline because you can do twice as much work in the next frame.
Re:Sub-millisecond GC pauses in Go 1.8 by lomnakkus on Monday October 31, 2016 @05:27PM (#12841057)
Wait, what?

In my, admittedly maybe lacking, understanding amortization doesn't really work that way. "Amortized worst case" (for example) means that you can still bound the worst case[1], but it's just not necessarily going to be a very accurate bound. Obviously, amortized complexity doesn't tell you "<X ms" right off the bat since it deals in abstract "operations", but if you have known worst case bounds for all the "operations", then an amortized bound for a given operation will give you something equivalent to "<X ms".

[1] I mean, it's a common proof technique to actually have a non-negative cost function (+ invariant) and postulate/derive an upper bound on that, so... what gives? What's your reasoning here?

Re:Sub-millisecond GC pauses in Go 1.8 by countingteeth on Tuesday November 01, 2016 @08:33AM (#12845094)
No. The entire premise of amortized analysis is to get a more optimistic "eventually O" number. "Eventually" is not good enough for real time. Yes you can get a real hard worst-case number, but that's a different analysis from amortized analysis. Unless all of your amortized operations are happening between deadlines, it's useless--worse, dangerous--for safety. And amortized analysis is almost never used that way. You don't have language run-times that reinitialize between every deadline.
Re:Sub-millisecond GC pauses in Go 1.8 by lomnakkus on Thursday November 03, 2016 @03:25PM (#12867132)
You're right.

I somehow confused myself by thinking of it in terms of one of the proof techniques for amortized worst case where you derive a fixed upper bound for any "n". Of course this is a much stronger property than needed.