~/talk

From OCaml 4 to 5 and from Parmap to Effects: A legacy code transition story

Talkat FUN OCaml 2025 · 2025-09-15..09-16· [concurrency]
links:none on file
name:Nat Mote
links:none on file
slides:none on file

Migrating a ~3M LoC OCaml codebase from process-based Parmap forks to multicore Eio and domains, using memtrace and TSan to find issues, produces concrete wins: a small open-source dynamic GC adjusts space_overhead (tuned between ~15–40) by heap size, an eio.submit path behind an experimental flag replaces fork/parmap, and domain-local storage (with “one domain per fiber” discipline) avoids races. Benchmarks and A/B customer dry runs show dramatic RSS reduction and about 10–15% faster scans; rollout is successful and reversible.

AI-written summary · about

  1. 0:00Introduction and speaker setup
  2. 0:47What is SEGP and its use cases
  3. 2:18Why upgrade to OCaml 5
  4. 3:42Challenges in OCaml 4 to 5 migration
  5. 6:54Debugging memory issues with memtrace
  6. 8:18Tuning the garbage collector
  7. 11:12Dynamic GC tuning solution
  8. 12:17Validation and rollout of OCaml 5
  9. 14:09Overview of SEGP’s parallelism model
  10. 16:18Problems with fork-based parallelism
  11. 19:28Memory spikes in fork-based scans
  12. 20:32Moving to multicore with EIO
  13. 21:57First step: adding EIO run loop
  14. 22:39Switching from fork to EIO submit
  15. 23:45Handling mutable state in multicore
  16. 26:16Domain local storage solution
  17. 28:41Rolling out multicore parallelism
  18. 29:43Results and performance gains
  19. 30:12Q&A session
~/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.