~/talk

Simulating a real-world system in Go

Talkat dotGo 2017 · on Monday, 2017-11-06· [go, frontend-architecture]
slides:none on file

A Go simulator models a coffee shop as four 1 ms stages and measures latency and throughput concretely it reports 1 ms per stage and 250 lattes/sec per CPU and shows the ideal sequential worker scales linearly until contention on a single grinder forces throughput to plateau at ~1000 lattes/sec The code reveals a data race flagged by the race detector caught data races experiment fixes include per‑machine mutexes, buffered channels (sizes 1 and 10), pipelined workers and adding machine replicas which restore parallelism and change the bottleneck to CPUs

AI-written summary · about

  1. 0:00Intro
  2. 3:46An ideal latte
  3. 4:15The ideal function
  4. 5:24Reality strikes
  5. 5:59Lesson: Use the race detector
  6. 8:02Fine-grain locking performance
  7. 8:21Lesson: Minimize locked duration
  8. 9:05Structural limits
  9. 10:32Two sets of machines
  10. 10:57Multi machine performance
  11. 11:10Lesson: Identify the limiting factor
  12. 12:50A coffee pipeline
  13. 13:19Pipeline vs. locking Median latency (ms)
  14. 15:02Buffered vs. unbuffered
  15. 15:20Major vs. minor optimizations
  16. 16:22Many more scenarios
  17. 17:28Get the simulator
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.