~/talk

There and Back Again: Disable and re-enable garbage collector at Instagram

Talkat PyCon 2018 · on Sunday, 2018-05-13· [python]

Instagram measures the problem with perf profiling, finds garbage collection causes page faults that trigger copy‑on‑write and costs about 150 MB per process saved when GC is disabled, with CPU throughput up ~10% and memory utilization down ~15%. Disabling GC leaks ~600 MB after ~3,000 requests, so Instagram implements a GC.freeze API and a workflow that full‑collects and freezes pre‑fork objects then enables GC in children; the change lands in upstream Python (3.6/3.7) and works.

AI-written summary · about

  1. 0:00Intro
  2. 0:30ACENDA
  3. 1:07MEMORY MANACEMENT IN PYTHON
  4. 2:53COPY-ON-WRITE SEMANTIC
  5. 3:42INSTACRAM TECH STACK
  6. 4:37OBSERVATION
  7. 5:38PROFILINC
  8. 6:16WHY GARBACE COLLECTION?
  9. 8:31DISABLE CC
  10. 12:23AFTER ONE YEAR
  11. 13:44REDESIGN CC HEAD
  12. 15:28POINTERS TAHE SPACE
  13. 16:15FREEZE OBJECTS
  14. 18:18MEMORY POOL
  15. 19:19RESULTS
  16. 20:16WRAP UP
~/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.