spion / hashtable-latencies

Latency of a web service that stores a large hashtable, in multiple languages
43 stars 8 forks source link

Improved latency in Go's next version (1.8) #13

Open ngrilly opened 8 years ago

ngrilly commented 8 years ago

Today, I reran the benchmark using Go current master branch (golang/go@78c46581f4da82473f3efcbbe1f3b48625f88471).

Go's latency is now similar and even better than OCaml:

histogram

Here is the related issue: https://github.com/golang/go/issues/16293.

And here is the commit fixing the latency: https://github.com/golang/go/commit/cf4f1d07a189125a8774a923a3259126599e942b.

Please note that using valyala/fasthttp is not required anymore. The latency stays low even with the standard library package net/http.

I suggest we'll rerun the benchmark after Go 1.8 release in a few months, and update the results, and maybe README's conclusion:

Want to build low-latency, memory-intensive services in a GCed language? Use Go or OCaml (or Reason if you prefer the syntax).

:-)

spion commented 8 years ago

Sounds good. Though I have to say, the quicker rise of Go's latency as it approaches a high percentile is slightly concerning. Nevertheless I'll re-run the tests in a few months and re-investigate 😀

ngrilly commented 8 years ago

Though I have to say, the quicker rise of Go's latency as it approaches a high percentile is slightly concerning.

On the contrary, it's a good thing. It means that "stop the world pauses" are rare, and never last more than 15 ms. Outside of the "stop the world pauses", the latency is very low (around 1 or 2 ms). Moreover, the horizontal axis scale is not linear, which gives this feeling of a latency increasing suddenly.

Carrotman42 commented 6 years ago

I'd love to see this updated for Go 1.10!